mac100;10994628 wrote:Flat-Files are simple and great for some applications, but it does seem that in this case they could create unreliabilty, as nothing Ive read so far seems to guarantee reliabilty ?
It's not the fact that you're storing data in flat files (hey, even MySQL has to store it's data in files on the disk, too), but more along the lines of it's totally up to your application to handle things like concurrency and data integrity. This isn't always easy to do.
mac100;10994628 wrote:If I use MySQL: Will this guarantee reliability ?
I don't know if I would say guarantee, but it could significantly improve reliability... assuming it's used correctly.
For example, if data integrity is really a concern here, then I would suggest using MySQL's InnoDB engine since it is ACID-compliant (it provides transactions; MyISAM does not) among other things.
Of course, MySQL itself is only one of many RDBMSs out there; more experienced DB gurus might be able to comment on why they prefer (Oracle, PostgreSQL, etc.) over MySQL for various reasons. I myself am no such guru. :p
EDIT: Just to clarify this:
bradgrafelman wrote:I don't know if I would say guarantee, ...
I was trying to refrain from using such strong language in a subject that I would label myself an "intermediate" rather than an expert/guru.
For the application you've described above, it's likely that MySQL's InnoDB engine provides all the safety you need in the form of transactions. Search around for a couple of good articles/explanations on what SQL transactions are and how they ensure data consistency even if an application fails mid-transaction for some reason or another.
EDIT2: Okay, I'll stop inundating you with info after this edit, but one more thing...
I just realized I focused on the wrong concerns. As far as concurrency goes (e.g. the case of multiple buyers modifying a single supplier at once), InnoDB also supports row-level locking, so you'd want to LOCK the relevant suppliers and buyers rows before performing the UPDATE query to increment/decrement the relevant counters.