Multiple Mysql Banks?

Asked

Viewed 80 times

1

Good night.

I’m creating a PHP system that looks like a virtual shopping mall (several "stores" and each store with its products).

For this I need to store data from users, stores, businesses, products, schedules, days, orders, payments, etc, etc and such.

In addition to all this of the user interface, it would still have the Helpdesk layer, administration (on the part of the stores), system administration, settings, Analytics, statistics and etc.

So my question is this, in terms of performance x organization, compensates me to separate these layers into separate databases?

For example, a main database with the essential tables (users, stores, products...) and other banks with the auxiliaries (statistics, Helpdesk and etc).

Taking into account that it will be common to query between banks (search for a user when saving a ticket in Helpdesk and etc).

Is that feasible? Does it affect performance (all the banks on the same server)? Anyone who has done this could tell me about their experience?

Thank you.

  • 2

    Typically multiple databases are used for better scalability. If the stores are independent and each one has their own data, I believe that the best thing to do is that each store has a separate database. The advantage of this is for maintenance (you can know who uses more and less resources, move databases to another server, monitor backups), this allows stores to have different versions, ie modifies to one but not to all. But separating data that have meaning among themselves I do not consider interesting, but I have never been through any situation of this kind, so...

  • You can use postgresql with schema, for example, the common tables you mentioned would be in a general schema, and each store would have its own schema, with the tables containing information only for the specific store. So everything would be in one bank and organized.

1 answer

1

Well, I think you better use several databases, to separate information from each store, in case your system is a "shopping". That is, bank 1 to store 1, bank 2 to store 2 and so on. However if it is a virtual store, I don’t think I should create a bank for products, another bank for users, I would recommend a bank with only several tables.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.