SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Zealot
    Join Date
    Jul 2004
    Location
    London
    Posts
    145
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Multiple databases?

    I have the following tables:

    contributors
    interviews
    reviews
    galleries
    genres
    labels
    artists
    features
    events

    Now, I'm not too well versed in database structuring. Is it best to keep all these tables under one database, or spread them out a little for safety/optimization?

    Probably an ignorant question, but help appreciated none the less!

    Thanks,
    Carl

  2. #2
    Non-Member DaveMichaels's Avatar
    Join Date
    Nov 2004
    Location
    US
    Posts
    535
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    safety/optimization
    That's really no reason for splitting up tables into different databases. It'd be a big pain doing cross-database queries (but I hear Oracle can). Use a different database for each different app. Or, many people simply prefix table names and put a bunch of different apps (like phpads, a CMS, mail, etc.) all in one database (I don't like that approach).

  3. #3
    SitePoint Zealot
    Join Date
    Jul 2004
    Location
    London
    Posts
    145
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for clearing that up.

    Wasn't quite certain for some reason

    Carl

  4. #4
    SitePoint Addict phpster's Avatar
    Join Date
    Feb 2005
    Location
    Toronto, Canada
    Posts
    374
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    keep related items like that in one db. If you start to offer another product then you can perhaps use another db.

    safety is more an issue of backups and how often you take them and how easily it can be restored.
    phpster

    I wish my computer would do what I want it to.
    Not what I tell it to do...

  5. #5
    Feel my RewiredMind KMxRetro's Avatar
    Join Date
    Jan 2001
    Location
    Exeter, Devon, UK
    Posts
    477
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I was always told that having to jump between databases (using mysql_select_db in PHP) was a big resource hog. Don't know if that still applies or if it applies to your system, but may be something to bear in mind.


Bookmarks

Posting Permissions

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