Skip to main content

Lukas Eder

Oct 29, 2026

15:43
You can say the client might send a select all from customers, but then the database will actually add and tenant equals whatever the
15:53
session variable is.
15:54
Instead of having a prefix on all your tables where you put the same table in multiple schemas, or you can even have different tables in the same schema with a prefix on the table name, where you completely separate the data using metadata, you can also separate the data per tenant with a column, which is a normal way to do things, right? So you have a tenant ID column, and depending on what tenant you are in your session, you can only see your own data, the data of the tenant.
16:21
And the idea of role level security, which is also implemented, by the way, by multiple databases like Oracle, Postgres have these features as well embedded in their databases.
16:30
So the idea is that when you're in some sort of session context where the tenant ID is 42 or whatever, you can only see the data for that tenant and you can only modify the data for the tenant.
16:40
You can only insert data for a tenant, et cetera.
16:44
If you're using Oracle, you're obviously going to use, if you want to pay that feature, you're going to use virtual private database, which is what the feature is called.

17 MINS LATER

33:50
It's

We value your privacy

We use cookies to understand how you use our platform and to improve your experience. Click “Accept All” to consent, or “Decline non-essential” to opt out of non-essential cookies. Read our Privacy Policy.