0

I have to make an email marketing app for one of my clients and in this app each customer will need to manage around 100k average for their list of contacts.

So, for each customer i should create a db and replicate the schema or combine all customers in a single db. For example: All the contacts in one table and difference them with the customer_id

I want to know what is the best recommendation to make a web app where each customer will need to manage a lot of registers.

Also is possible that some customers (big companies) require a private installation of the app.

Please tell me your experience in this kind of app.

Thank you.

  • This question should be asked on [Programmers Stack Exchange](http://programmers.stackexchange.com/) as it is not directly code related. You will find better answers there. – phpPhil Apr 15 '15 at 04:17
  • 1
    As this already has an answer, if you intend to have it be on Programmers.SE, please flag it for migration rather than reposting. That said, it would likely be closed as a duplicate of one of the many questions on multi tenancy (for example [500 databases or 1 database with 500 tables or just 1 table with all the records?](http://programmers.stackexchange.com/q/260798/40980) or [Supporting multitenancy](http://programmers.stackexchange.com/q/109629/40980)). –  Apr 15 '15 at 04:21
  • 1
    You might also want to check [tag:multi-tenant] here. There is a *lot* of material to look through. –  Apr 15 '15 at 04:43

2 Answers2

0

A shared centralized database is almost always the best route. It is a nightmare to try to handle even a moderate number of customers separately. Think of code updates, patches, fixes, etc.. Databases these days are powerhouses and can easily handle the number of records you are referring to so don't worry about that. I have been building these types of systems since the late '90s and have pondered this exact situation more than once. Single, shared DB for sure. Best of luck!

brianc
  • 455
  • 2
  • 21
0

My recommendation is to use one fast, relational database so the data is centralized and ready to query. I would further recommend Postgres, as it has nice features like UID's, audit triggers, and table partitioning.

Keeping all clients and customers in the same database will also give you the opportunity to easily perform big data analysis on trends throughout your clients. Compare that to running analytics for each customer on an individual database..that would be a nightmare.

Postgres also has a convenient way of organizing your tables into "schemas". You could have a schema for your clients and all client related information, a schema for your customers and all customer related information, a schema for billing information, a schema for you data analytics results, etc.

nivix zixer
  • 1,611
  • 1
  • 13
  • 19