|
You could do that but then supposing you need to cross reference data, count how many users submitted a form within a 24 hour period etc? You'd need to open up possibly thousands of files (consuming system memory) and then loop through every single one, store things in an array (using more memory) etc etc.
With a database you just run a query, the database does it all in a memory efficient way and returns only the data you need and in a fraction of the time.
I speak from personal experience. I avoided databases like they were the plague - for years on end. I used text files for several projects and all you end up doing is chasing your own tail around, debugging why things don't work, why did that bit of data get wiped etc. It really is far easier to use a database and it really isn't as hard as you think either.
|