B
B
balvardo2011-12-01 18:29:45
MySQL
balvardo, 2011-12-01 18:29:45

DB and its SaaS architecture

Dear colleagues, I have a question regarding the architecture of the database for SaaS.
The main problem lies in the fact that, on the one hand, no one built the available SaaS specialists, on the other hand, all the Specialists, and everyone stands on their own. I'm afraid of what will soon come to homicide. =)
I would like an alternative opinion.

So, given:
A system that allows a company to get an account, create accounts for its employees and work happily in it. Each account (application) for the company is independent from other similar accounts. At the same time, this is a single codebase, and the database structure for each account is identical. By and large, the question is how to make SaaS out of the box.

Suggested options:
DB per account (MySQL) - a separate database for each account.
One DB for all (select by account_id) - all storage in a single database, selections by account ID
Using postgresql schemas

I will be glad to any reasoned opinion.
If you need additional those. Details - I will answer in the comments.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexey, 2011-12-01
@CheatEx

Do as it is more convenient, when it stops working, redo it.

D
doom369, 2011-12-01
@doom369

If there are few clients, then it will be easier to work with one database, as you reduce the cost of configuring, configuring and maintaining different databases. + It may be necessary to integrate data between clients.

R
Renat Bugrov, 2014-12-12
@renat79

We use option 2. mysql. More than 100K users, the base flies, but a lot of steamed with optimization. From a security point of view, option 1 is probably preferable.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question