Indiepath
07-19-2005, 07:32 AM
This is my situation: (I'm using MySQL)
Which one should I use:
--------------------- Option #1:
TABLE structure:
- id (index)
- data
Data:
I have 100 different databases (clients), which each contains a table with 100 000 lines. I separate the clients simply by calling the database I need when I need.
--------------------- Option #2:
TABLE structure:
- clientId (index)
- id (index)
- data
Data:
I have 1 db with one table that contains 100 x 100 000 lines and uses index field ClientId to "separate" the rows.
---
If I have such a massive amount of information, should it be better to use different dbs or is it okay to use just one db (and clientId as primary index)?
Every time I call the database I will be fetching only the information for one specific client. There's no need to fetch info of client 1 and client 2 for example.
Which one should I use:
--------------------- Option #1:
TABLE structure:
- id (index)
- data
Data:
I have 100 different databases (clients), which each contains a table with 100 000 lines. I separate the clients simply by calling the database I need when I need.
--------------------- Option #2:
TABLE structure:
- clientId (index)
- id (index)
- data
Data:
I have 1 db with one table that contains 100 x 100 000 lines and uses index field ClientId to "separate" the rows.
---
If I have such a massive amount of information, should it be better to use different dbs or is it okay to use just one db (and clientId as primary index)?
Every time I call the database I will be fetching only the information for one specific client. There's no need to fetch info of client 1 and client 2 for example.
