Correct multitenancy design
Hello!
I wonder what would be the correct way do design a multi-tenant system for hundreds (maybe thousands) of customers. As far as I can see there are two ways:
1. Have customer_id in every table. Add "WHERE customer_id=..." to every query.
2. Have multiple schemas - one per customer.
What would be advantages and pitfalls of these methods?
Thanks!
Michael
I wonder what would be the correct way do design a multi-tenant system for hundreds (maybe thousands) of customers. As far as I can see there are two ways:
1. Have customer_id in every table. Add "WHERE customer_id=..." to every query.
2. Have multiple schemas - one per customer.
What would be advantages and pitfalls of these methods?
Thanks!
Michael
0
Comments
But i would go for multiple schema approach!
Why ?
But i would go for multiple schema approach!
Why ?
Thanks for your answer! Do you know what are resource limitations of the second method, like what number of schemas can be created on one node/whole database?
Thanks,
Michael
https://my.vertica.com/docs/7.0.x/HTML/index.htm#Authoring/SQLReferenceManual/SystemLimits.htm?Highl...