Re: tiniest SQL + tiniest app-server
On Mon, 11 Jan 2010, Arne Vajh?j wrote:
On 08-01-2010 14:09, Tom Anderson wrote:
However, i would seriously question your need for a relational
database. They're the default choice for data storage these days, but
for no goodreason. You only actually need one when (a) you have strong
requirements about data integrity, concurrency, transactionality, etc,
*and* (b) you need a highly general query interface. For a situation
where one process appends records to a log, and another reads from it,
you don't.
Personally, i'd stick with a text (which could mean CSV of XML) file,
or possibly a directory full of text files. Less disk footprint, less
memory and processor overhead, and honestly no harder to write. You can
still write a webapp to browse the data, but back it with the
filesystem. Plus, you can look at the data with a text editor, grep,
etc, which eases development and gives you flexibility.
Even if a database is not needed, then I would suggest one unless good
reasons exists not to use a database.
Database is a lot more extendable if more features are needed later
*and* it really does not matter much.
I wouldn't give up the easy manual inspection, greppability, lack of
dependencies, etc that i get from flat files unless i had a concrete
reason to do so.
Or to put it another way: if the CPU/memory/IO overhead by using a
database is too high, then flat files is out of the question.
Huh? You think a database is *faster* than flat files?
tom
--
Transform your language.