db structure question.
I have a plan for several separate databases. Was thinking that keeping them separate, might be good for if/when someone may want to buy one (but not all). However, for each database, there is one table that would be/is common, in terms of its structure and content. It is called customers.
what way would you structure such a series of db's?
1. put them all into one big db
2. keep them separate and put the customers table into its own space where all dbs can relate to it
3. a third way
If you recommend putting them all into one huge db, can you point me to some search terms or tutorials on, for example, 'partitioning databases' or partitioning tables or other potential search terms.
Are these databases for separate sites?
Will the *data* in the customers table be the same in each database?
Almost every site with a database has a users table, but we don't have one megadatabase that everyone in the world connects to... need some more details as to why you're asking :)
It's a series of dbs for multiple purposes.
The users/customer data is common to each db.
i would put the users table wherever convenient
if customer 1 buys your application X and it requires a users table, and customer 2 buys your application Y and it also requires a users table, the difference in what you give them as far as the SQL is concerned is basically the same
yes, the queries might have to be tweaked as to whether the users table is in the same database or a separate database, but that's really trivial -- the basic queries will be the same
Thanks for the response.
To make sure I understand:
If customer A were to buy a book from website 1 and customer B were to buy a shirt from website 2, it's OK to have a 'customer' table outside of both dbs? That would mean 3 dbs.
Would it be better to have the 3 dbs on the same server or, at least, to have them within the same datacentre?