Informed options needed concerning the merits of flat file database. I am thinking about utilizing a flat file database plan to handle data for any custom blog. It might be used on Linux OS variant and designed in Java.
Do you know the possible disadvantages or positives regarding performance for reading through and writing of both articles and comments?
Would article retrieval garbage out due to it as being a flat file as opposed to a RDBMS whether it would get slash-doted? (Unrealistic)
I am not against utilizing a RDBMS, just asking the city their opinion around the stability of these an application architecture plan.
Follow-up: Within the situation of the question I'd see “Flat file == file system–based” For instance each blog entry and it is associated metadata could be in one file. Creating many files organized by date structure from the file folders (blogstestblog2200812 1) == 12/01/2008
(answer replicated and modified from here)
I'd advise against utilizing a flat apply for anything besides read-only access, because then you'd suffer from concurrency issues like ensuring just one process is conntacting the file at the same time. Rather, I suggest SQLite, a completely functional SQL database that's saved inside a file. SQLite already has generated-in concurrency, so it's not necessary to be worried about such things as file securing, and it is fast for reads.
If, however, you do plenty of database changes, it is best to do them all at one time in the transaction. This can only write the alterations towards the file once, instead of each time an change totally released. This significantly boosts the speed to do multiple changes.
Whenever a change totally released, be it in the tranasction or otherwise, the entire database is locked until that question finishes. Which means that very large transactions could negatively modify the performance of other processes simply because they must wait for a transaction to complete before they are able to access the database. Used, I've not found this to become that noticeable, but it is always beneficial practice to try and minimize the amount of database modifying queries you problem, and it is certainly faster then trying to utilize a flat file.