Results 1 to 8 of 8
  1. #1
    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

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    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

  3. #3
    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.

  4. #4
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    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

  5. #5
    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

  6. #6
    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?

  7. #7
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    12,532
    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 on the Tiger 800 or the Norton

  8. #8
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •