One database or many?

Posted by dsims on Stack Overflow See other posts from Stack Overflow or by dsims
Published on 2008-08-21T15:53:23Z Indexed on 2010/04/26 15:43 UTC
Read the original article Hit count: 142

I am developing a website that will manage data for multiple entities. No data is shared between entities, but they may be owned by the same customer. A customer may want to manage all their entities from a single "dashboard". So should I have one database for everything, or keep the data seperated into individual databases? Is there a best-practice? What are the positives/negatives for having a:

  • database for the entire site (entity has a "customerID", data has "entityID")
  • database for each customer (data has "entityID")
  • database for each entity (relation of database to customer is outside of database)

Multiple databases seems like it would have better performance (fewer rows and joins) but may eventually become a maintenance nightmare.

© Stack Overflow or respective owner

Related posts about best-practices

Related posts about Performance