SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Hybrid View

  1. #1
    SitePoint Addict
    Join Date
    Jul 2000
    Location
    North Central AR
    Posts
    231
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Obviously I am new to PHP and MySQL. Currently I have a php banner rotation script which uses MySQL to store the data. My question is: I want to start implimenting more scripts, which will use a Database.
    I could of course make new tables for the new applications, but would this slow proformance or speed? Being that the database is growing. Or should I have a new databse for each application?

    Hope this is'nt to dumb a question. We all have to learn somewhere huh?

    Any feedback would be appreciated.

    ronnie

  2. #2
    SitePoint Author Kevin Yank's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne, Australia
    Posts
    2,571
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    The decision of whether to use a single database or multiple databases for your site is really a matter of personal preference. I'm pretty sure it will have little or no effect on the performance of your site.

    The only factor I could see affecting this decision (besides your own personal preference, of course) is that global backups are easier to do with a single database. You can back up an entire database with a single execution of mysqldump, whereas with multiple databases you'd need to run it repeatedly -- once for each database.

    In case you're curious, SitePoint.com keeps all its content data (including articles, tip feed tips, etc.) in a single database. Separate databases are only used for programs/applications that were not custom-built and thus install their own databases.


    ------------------
    -Kevin Yank.
    http://www.SitePoint.com/
    Helping Small Business Grow Online!

  3. #3
    SitePoint Addict
    Join Date
    Jul 2000
    Location
    North Central AR
    Posts
    231
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you Kevin, that answers my question perfectly.

    Once other question then, I use phpMyAdmin to work with my database. Is it possible to add say a blank feild to seperate the different tables? This would be more for apperance, so everything is'nt right on top of each other.
    I want to have say one table for my banner rotation, another for links on my site. Plus I have four domains, so keeping them seperate to the eye would help.

  4. #4
    SitePoint Author Kevin Yank's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne, Australia
    Posts
    2,571
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Bad idea. A better idea would be to use a naming convention for your tables. For example, all tables that are related to ads could begin with ADS_. That way you'd end up with a list like this:

    ADS_BANNERS
    ADS_CLICKS
    ADS_LINKS
    ARTICLES_ARTICLES
    ARTICLES_CATEGORIES
    ARTICLES_CATLOOKUP
    LINKS_CATEGORIES
    LINKS_CATLOOKUP
    LINKS_LINKS
    LINKS_SUBMITTERS

    You get the idea.


    ------------------
    -Kevin Yank.
    http://www.SitePoint.com/
    Helping Small Business Grow Online!


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
  •