Mysql – Database setup/design for multiple services

database-designMySQL

I am working on a new MySQL database that will store orders/customer information for around 15 different services. 7 of the services are similar in regards to the information that is stored with a few of the 7 services requiring an additional piece of information. There other 7-8 services are similar to each other as well but not as similar the the first 7. So my question is how should I break this down into a MySQL database?

Should each service have its own table? If this is true, what is the best way to link tables? Any advice is greatly appreciated!

Also, here is a sample of the type of info that will be stored:

enter image description here

Best Answer

good lord, no.

  1. read up on multi-tenancy http://msdn.microsoft.com/en-us/library/aa479086.aspx

  2. read up on the Party Model http://www.tdan.com/view-articles/5014/

  3. read up on Table Inheritance http://www.martinfowler.com/eaaCatalog/singleTableInheritance.html

Then go read the data modeling books by Fowler, Silverston, or Hay.