PDA

View Full Version : FlatFile DataBases yes or no?



Alejandro
10-30-2003, 10:57 AM
Hello everyone,

I make several applications in perl, I store all the data in flat file data bases (a simple text file), I usually don't store much data but this time I'm making an application that keeps 5 values for about 900 records, I've never done something this big and I dont think there may be a problem but I've seen that when large databases are used the people uses something else like MySql, so I was wondering, does anyone know why? Is just because it is easyer or is there a technical reason that I must be aware of? Is there a limit (or recommended limit) when using FFDB's ???

Thank you !

Alejandro

wildjokerdesign
10-31-2003, 07:07 AM
Not sure on the limit of a flat file db but do now that if they get to big it can be a problem. I have one account that is a community for puppeteers that runs on a flat file. It has well over 300 members and 1000s of posted records for the users. The databases are broken down in diffrent files and "mimics' what you have in MySql. I have been planning on converting it not because of problems but like you to avoid future problems if any.

For me MySql is still a bit daunting so I have been looking at phpBB2 and using phpMyAdmin to see how things are set up and working in order to get a handle on it. Also have a big fat book I have been reading. :)

Don't know if that answers your question but thought I would relay my experiances with the issue.

Shawn

FZ
10-31-2003, 10:31 AM
I'd recommend using mySQL for something of that size. A flatfile DB would just become unwieldy. Another thing to consider is that mySQL would probably be a faster and more efficient solution to this - it's made for this sort of thing! Also, as Shawn said, with PhpMyAdmin you have an easy way to keep track of everything (e.g. different tables, the values in your tables, number of rows, the size of tables, etc. etc.) - there is just so much more managability and functionality associated with using mySQL (and PhpMyAdmin). And mySQL is pretty simple to use as well...

Alejandro
11-01-2003, 10:47 AM
Thank you Shawn and Fayez,

Until now the only thing I'd been thinking is wrong with ffdb's (when too large) is that to get a record I usually have to read the entire file... the file used by Shawn is much bigger than mine so I guess that if can't learn MySql in the 3 days I have left for that little app I wont have a big problem, but as Fayez says thats what mysql is for... so I have to get a big fat book too. Thank you!

wildjokerdesign
11-01-2003, 12:53 PM
...the file used by Shawn is much bigger than mine so I guess that if can't learn MySql in the 3 days I have left for that little app I wont have a big problem, but as Fayez says thats what mysql is for... so I have to get a big fat book too. Thank you!

Remember that the script I use is designed to break all those files down into different flatfile DBs. There are about 20 in all flatfiles that are being used so each is kept fairly small... but I do think you will be ok for now.