
Answer-first summary for fast verification
Answer: Partition data by tenant ID and use row-level security to enforce data access controls.
Partitioning data by tenant ID and utilizing row-level security is the most effective method to ensure data isolation and maintain query performance in a multi-tenant system. This strategy allows for each tenant's data to be isolated within the same database, ensuring efficient access and security. Row-level security further ensures that tenants can only access their own data, providing a robust security measure. Alternatives such as creating a shared database with tenant ID columns (Option D) may not scale well, leading to performance degradation. Implementing separate databases for each tenant (Option A) or using a single table with row-level encryption (Option B) introduces unnecessary complexity and potential performance overhead, making them less ideal solutions.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
When designing a data model for a multi-tenant application in a lakehouse, what strategies can you employ to ensure both data isolation and optimal query performance across different tenants?
A
Implement a separate database for each tenant, duplicating the schema.
B
Use a single table for all tenants, applying encryption at the row level based on tenant ID.
C
Partition data by tenant ID and use row-level security to enforce data access controls.
D
Create a shared database with a tenant ID column in each table to filter queries.