SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Member
    Join Date
    Feb 2005
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Whole site in MySQL db's?

    I posted this question in the PHP forum, but i think this is the right place.
    I know a little PHP/MySQL. I've done image galleries, basic search scripts, news modules on small to medium websites.
    Now I need to develope a website with a complex structure tree, with a lot of static pages, but still I have to put news, articles, search, etc.
    My question is:
    Should I put all contents in MySQL db's, so I could search easily, update, link the site sections with related news,etc?
    Or should I separate the static contents in HTML pages and leave the db's just for dynamic content? If I do this, how can I search thru this pages?

    Thank you!

  2. #2
    I have an opinion...
    Join Date
    Sep 2001
    Location
    Barrie, Ontario
    Posts
    324
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Put it all in the DB. This has severel benefits, and unless your site exceeds abotu 10GB of data, not many bad things...

    1) Easy to structure/restructure the site whenever desired
    2) Easy to controll access to content based on login, date, etc
    3) Same interface for creating/editing all the site's content
    -----

    The list goes on an on...
    Egotist: A person more interested in himself than in me.
    KodeKrash - Eidix - Barrie LUG

  3. #3
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,347
    Mentioned
    63 Post(s)
    Tagged
    3 Thread(s)
    Quote Originally Posted by KodeKrash
    Put it all in the DB.
    except the images

    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  4. #4
    I have an opinion...
    Join Date
    Sep 2001
    Location
    Barrie, Ontario
    Posts
    324
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah, I agree -- don't BLOB the images... It's so incredible to me that people would actually do it that I forget to mention that... nice catch r937!
    Egotist: A person more interested in himself than in me.
    KodeKrash - Eidix - Barrie LUG

  5. #5
    SitePoint Member
    Join Date
    Feb 2005
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you guys.
    Yes, I've decided to put everything in the DB. Working this way, creating the structure of the site is so intuitive. I'd recommend it to anyone who is beginning a site from scratch.
    I won't BLOB the images, i will use URLs to do it.
    As i said in the first post, i asked this same question on the PHP forum. If someone is interested, this can be viewed here: http://www.sitepoint.com/forums/showthread.php?t=231744


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
  •