Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

database vs file based

Status
Not open for further replies.

jlynch1

Technical User
Dec 20, 2001
100
IE
i am setting up a lyrics archive of all my favourite songs.
i have it currently implemented in html with links to each page. i want to change it to use either database vs file based approach.

In the file based approach i would use file handling to traverse the directories and geneate a table of contents and links. when i am adding lyrics i would hope to create a directory and put a text file into it with the lyrics which will be included in the main page.

Or am i better to redo the whole archive using mysql and php stoying the lyric in a databse.

which is the better approach for efficiency and ease of update. The archive isnt really that big. it would be possible to redo it

 
Well,

I've just done such a project , It hasn't been completed yet, but I got much exprience, well I used this way , because my server hadn't mySQL support I used TXT database, it was simple I put all my articles in seprated folder and I used a TAB seperated file like this:

ID-ARTICLE NAME-ARTICLE PATH ON SERVER-ARTICLE INFO-AUTHUR-COMMENTS-VISITORS-RATINGS

Ok, just read such a file in an array and explode() array by \t , there would not anything able to STOP u ...
 
If you have access to a DB (MySQL perfered), then I would strongly suggest using that over a flatfile. Your queries going to be faster, your data input easier, adding fields is eaiser, and searching more flexable.

PLUS, you will get some database experiance which is always fun and rewarding.

BUT, if you dont have access to MySQL then you will have to stick with a flatfile DB.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top