SSharebri
Blog
Engineering

How Sharebri isolates data between branches

RLS policies + composite foreign keys — the technical architecture ensuring branch-A data never leaks into branch-B.

SSharebri TeamApr 28, 2026marketing.blogPage.posts.multiBranchArchitecture.minutes min read

Multi-tenant + multi-branch are two different isolation dimensions. Tenant isolates by company, branch isolates by location within the same company.

Technically: composite foreign keys (fk_id, tenant_id) ensure every query implicitly includes tenant_id. Plus PostgreSQL RLS as a second-line defense.

The result: 4 branches running on a single database, real-time aggregated dashboard, but data never mixes — even when a developer writes a wrong query.

Ready to hand the admin work to software?

Try free for 14 days. No credit card. We help migrate your data.