K
K
konstantin_levin2015-05-23 15:53:27
MySQL
konstantin_levin, 2015-05-23 15:53:27

What are the disadvantages when building SaaS services in the approach “for each account - a separate copy of the database schema”?

If we consider such systems as, for example, cloud CRM - why not create a separate database for each account (mysql is of interest)? The advantages are obvious at first glance: -
an additional level of data protection (there is no chance that, in case of an error in the software part, the user will see "foreign" data)
- it is easier to scale by sharding - further spread the database of different accounts across servers
- the software part is simplified - it is not necessary in every request add project_id
- easier to manage indexes - when placing indexes on disk, the effect will be the same as when creating partitions indexes for each account (if not right, please explain)
It is clear that you will need a separate scheme for general data - accounts, billing, etc. .d.
What are the disadvantages of such an approach?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
sim3x, 2015-05-23
@sim3x

-additional level of data protection (there is no chance that in case of an error in the software part, the user will see "foreign" data)
No
- it's easier to scale with sharding - further spread the database of different accounts across servers
most users will never need this
- the program part is simplified - it is not necessary to add the project_id to each request
it all depends on the architecture - in the general case there is no such problem
- easier management of indexes - when placing indexes on disk, the effect will immediately be the same as when creating partitions indexes for each account
which will lead to additional frames - which is not very profitable for the service

P
Puma Thailand, 2015-05-23
@opium

Often it is, but what exactly is your problem?

X
xeops, 2016-12-08
@xeops

And in the superadmin panel over SaaS accounts, how will you collect statistics?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question