MySQL or Flat Files
Hello everyone!
I am looking for some expert oppinions here since I've only been working with PHP for about 6 months now.
I have a couple websites that I'm redesigning using PHP.
The first one is a fairly large site (600+ pages currently). I was planning to use a SQL database so that visitors will be able to submit their artwork and information and the database would be able to keep up with the amount of data.
The second one is a small site (only about 20 pages). I'm using PHP simply to create "editor" pages for the client so they can update their own text and artwork whenever they want. I am planning to use flat files for storage because there won't be that much info and I already know how to script for flat files.
My question is... Am I right in thinking that the larger site should be done with a SQL database? Is there any reason I shouldn't use flat file storage for the smaller site? (the files won't be readable from the browser of course... just the script)
Like I said, I'm new to PHP and could use all the advice I can get.
gotta finish redesigning my sites so I can show them again.
The purpose of education is... to get more jokes!
WebsiteDistrict posted this at 01:59 — 30th July 2004.
They have: 4 posts
Joined: Jul 2004
You're in the right direction.
While for smaller sites a flat file would be good if you are not expecting it to grow that much. The safest way is to use XML though if you don't want to use MySQL. That way, in case the site grows it would be easy to migrate the data stored in it to a database and convert the site to a fully DB driven website.
Wish you luck...
John Vincent Mombay
Website District
Web Hosting that understands your needs.
http://www.websitedistrict.net
KarenArt posted this at 18:06 — 3rd August 2004.
She has: 354 posts
Joined: May 2001
Thank you so much for the advice!
I didn't even think of XML. I'll definately be looking into that now.
I've got sooooooo much to learn about databases... any help is very appreciated!
gotta finish redesigning my sites so I can show them again.
The purpose of education is... to get more jokes!
Busy posted this at 22:20 — 3rd August 2004.
He has: 6,151 posts
Joined: May 2001
You might want to check with your host first. A lot of web hosts don't allow flat file db as they suck up so much recources.
MYSQL for both is better IMO, for one it gives you practice, two the contents can be compressed (even less file space used), three, is faster and four, if you did use flat file and it got to big, you'd have to swap over anyways.
Think BIG
KarenArt posted this at 13:51 — 6th August 2004.
She has: 354 posts
Joined: May 2001
Thanks so much for the advice Busy!
Sorry, I didn't mean to ignore you.
I am working on making some test pages to learn how to really work with MSQL. Ahhhh... more learning.
gotta finish redesigning my sites so I can show them again.
The purpose of education is... to get more jokes!
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.