Reply
To use or not to use a database?
Old 07-04-2005, 08:12 PM To use or not to use a database?
Junior Talker

Posts: 1
First of all, I know very little about databases in general so this might be a dull question.

I am trying to write a CMS written in PHP mainly for a blog type of page that isn't updated extensively (maybe 10-20 updates a day at MAX). Because it is not updated so often it will serve static pages most of the time (until there is actually a change on the page, I see little reasons to make it dynamic all the time). The page will very extensively use XHTML, XMLHttpRequest and a lot of Javascript. The picture I have in my mind is to have all the data in XML files as opposed to a database. The main reason for this is as I know almost nothing about databases (or MySQL) and I think I was given advice that databases are not neccessary for a site like that as the only advantage they have in my case is speed.

As I said I know almost nothing about databases so please fill me in what you think about this. I know there are some CMS's that use text files for data, but I haven't heard anything about how they do in real life. I suppose for a forum you might need a database but I'm not so sure about the type of site I want to make. I imagine I larger site would cripple in a system like this when there are 5 or more requests per second, but as I said I would make the page semi-dynamic (is there a word for this?) when there are only updates every n seconds/minutes. Something like Slashdot. If the traffic is low, maybe even an update per comment/post/whatever.


Please feel free to give me any advice or more info about this, as I don't know exactly how this would work in reality.

Thanks.
Grishnackh is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
Old 07-05-2005, 07:45 AM
ibbo's Avatar
Super Spam Talker

Posts: 880
Location: Leeds UK
You are probably been informed of some XML based technology for thetext approach which to be quite honest is no harder or difficult for the programmer to deal with.

The only problem been how easy would it be for someone who has little experience of such technologues.

Here I would point them in a DB direction as adding and retreiving data is simpler than parsing XML (yea I dont have php5 on my ISP, nor will many so far I think).

I think the DB route would win hands down for most, plus if you start to pick up traffic you have your Dbase all sorted out and ready for it.

That does not meen a text file approach is not going to be a better idea, but reading and wrinting to files (to me anyway) is a pain especially when you have many files. You have to lock em then read em then release them or your data getes corrupted whereas a DB approach removes all this nonsense from you. Not to mention setting the correct permisions for them too.

Ibbo
__________________
www.nationalclubgolfer.com www.sportspub.co.uk www.bespokecc.co.uk www.centralmarquees.co.uk
Linux user #349545 :
(GNU/Linux)iD8DBQBAzWjX+MZAIjBWXGURAmflAKCntuBbuKCWenpm XoA7LNydllVQOwCf
ibbo is offline
Reply With Quote
View Public Profile Visit ibbo's homepage!
 
Reply     « Reply to To use or not to use a database?
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.13671 seconds with 12 queries