October 22, 2024
Chicago 12, Melborne City, USA
security

What are best practices for multi-tenant database isolation?


I am developing an app that uses around 20 tables to log various attributes, comments, form data, etc within an organization. Obviously I want multiple organizations to be able to use my app, what is considered best practices for this situation?

My current working idea is to dynamically create the set of ~20 tables ewith an organizational suffix in the table name and keep users, and organizations universal. My thought is that would make searching through your organizations tables quicker, while also having a near complete isolation from other organizations, keeping each organizations data private. While if I wanted to aggregate data across organizations I can still access all tables with the correct query.

Is this a good idea? A stupid idea? What drawbacks am I missing? Scaling issues? I have struggled to find concrete answers on this issue, so any insight is greatly appreciated!



You need to sign in to view this answers

Leave feedback about this

  • Quality
  • Price
  • Service

PROS

+
Add Field

CONS

+
Add Field
Choose Image
Choose Video