
Answer-first summary for fast verification
Answer: Create a single database with a tenant_id column in each table and implement row-level security using a filter predicate.
Option B is the correct answer. Creating a single database with a tenant_id column in each table and implementing row-level security using a filter predicate is an efficient way to enforce data access control for multi-tenant applications. This approach allows you to filter the data at the row level based on the tenant_id, ensuring that each tenant can only access their own data. Option A is incorrect because creating a separate database for each tenant is not scalable and does not provide row-level security. Option C is incorrect because creating a stored procedure for each tenant is not efficient and does not provide a consistent security model. Option D is incorrect because RBAC at the database level does not provide row-level security.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
You are designing a data access control system for a multi-tenant application using Azure SQL Database. Which of the following approaches should you use to implement row-level security?
A
Create a separate database for each tenant and implement role-based access control (RBAC) at the database level.
B
Create a single database with a tenant_id column in each table and implement row-level security using a filter predicate.
C
Implement row-level security by creating a stored procedure for each tenant that filters the data based on the tenant_id.
D
Use Azure Active Directory (AAD) to manage user authentication and implement RBAC at the database level.
No comments yet.