If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > More Datsbases better than more tables in the same databse (in thems of speed)

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old
Registered User
 
Join Date: Sep 2011
Posts: 10
More Datsbases better than more tables in the same databse (in thems of speed)

Hi all,

is it better to have a database for each user who is introducing data in the website or have a table for each user in the same database (in terms of speed for searching)?

I'm asking that because in my server they allow me to have 100 databases and I have ten different users who will introduce data in the website. So I can create ten tables in one database or use a database for each user. In which situation will be faster the communication?

Thank you very much in advance,
Frigopie
Reply With Quote
  #2 (permalink)  
Old
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 20,000
Quote:
Originally Posted by frigopie View Post
In which situation will be faster the communication?
neither

and neither will be easy to write queries for

the best solution is one table for all users
__________________
rudy.ca | @rudydotca
Buy my SitePoint book: Simply SQL
Reply With Quote
  #3 (permalink)  
Old
Registered User
 
Join Date: Sep 2011
Posts: 10
Data from users is not correlated at all. I mean users don't need to see what others are introducing. Each one has its own website.
Reply With Quote
  #4 (permalink)  
Old
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 20,000
Quote:
Originally Posted by frigopie View Post
Data from users is not correlated at all. I mean users don't need to see what others are introducing. Each one has its own website.
oh, okay then
__________________
rudy.ca | @rudydotca
Buy my SitePoint book: Simply SQL
Reply With Quote
  #5 (permalink)  
Old
Registered User
 
Join Date: Sep 2009
Location: San Sebastian, Spain
Posts: 860
From what I am reading, each set of tables belongs to a separate website. If this is the case then I would separate them out into different databases.
__________________
Ronan Cashell
Certified Oracle DBA/Certified MySQL Expert (DBA & Cluster DBA)
http://www.it-iss.com
Reply With Quote
  #6 (permalink)  
Old
Registered User
 
Join Date: Sep 2011
Posts: 10
Yes, exactly. Each database belongs to each different user. I'll do as you said it-iss.com So when Visitors ask for information about userA they will search in DatabaseA and when they ask for userB they will search in database B

Then when visitors navigate in the website, will it be quicker for them?
Reply With Quote
  #7 (permalink)  
Old
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 12,090
either
the data is discrete (belongs to one user and one website). in which case a database per website makes sense
OR
the data is used by any / all users in which case it belongs in a single db. (although truth to be told if you are using MySQL and all the db's are on the same db server then it is possible to view all data in all dbs' on that server if required.

if you are acting as an ISP then a single db per website makes sense. if the customer moves on you can just drop that database. any admin task are done on a per db basis
__________________
I'd rather be riding my Versys or my Tiger 800 let alone the Norton
Reply With Quote
  #8 (permalink)  
Old
Registered User
 
Join Date: Sep 2011
Posts: 10
Thank you very much to all!

All databases and websites are in the same server. I'm not acting as an ISP.

the data is discrete (belongs to one user and one website). in which case a database per website makes sense <== That's my case.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On