Flat DBs?

OwlMan

New member
I've encountered several flat file database driven scripts and never really used them in a production site that received much traffic so I didn't get a chance to put them to the test. From my understanding, these scripts have the advantage of not having to deal with SQL resources which is good for smaller sites but I have a particular doubt, are they really beneficial once you have a lot of traffic?
 
Flatfile is good but be sure you're making a backup! ;) Last thing you need is the file to get corrupted because it was trying to read and write at the same time. This is where MySQL would be helpful as the table is locked during the write process. Depending on what flatfile system you're using you can lock the database there too.

Years ago, and I mean years, maybe 10, I wrote a CGI troubleticket system for a large corporation and it was built on flat file CSV database. It worked very well. So well infact that while it was ment for a temporary solution while their IT department built a robust system (designed for 3 months operation), that the system is still in place today!

Flatfiles are good, but it depends on the information you're pulling. Also, flat file are not relation tables (unless you're doing multiple files). It's pretty difficult to write a Many-To-Many script using flat files.

With the speed of MySQL Idon't even think about it when I'm making scripts these days.
 
Wow Conor that is very impressive! You wrote some script that is still in play over 10 years later? I think that is amazing. Sadly I doubt I will ever be writing any script but if I ever did I wouldn't expect that much of a success!
 
hhehe.. I have older scripts still in production, but so much stuff changed during the Y2K issue that many scripts were re-written or scrapped for new languages.

Definitely any new scripts these days I don't see having a shelf life of more than 4 or 5 years on the outside without major rewrites. Languages move so fast.

I still have an accounting/membership program that was written for a church in BASIC back in the early 90's that is still in use on a weekly basis. Many people are reluctant to change.
 
Back
Top