When a db commits a update, its hypotetically just...
# random
u
When a db commits a update, its hypotetically just 1 bit changed in the actual disc? or the whole thing rewritten again to disc -- Im evaluating if I should use sqlite db or 1 protobuf file to persist app data (I'd only consider sqlite in a regular project, this however if very modular, so FKs cant work, since :foo cannot see :user and at that point..what the point of sqlite if there are no ref. integrity and cascade deletes etc)
g
Not 1 bit of course, but yes, it will incremental update of the file
u
Yea, thought so, thanks!
If I were to try to do that to a protobuf file, I'm basically creating a no-sql database, right? lol
g
Hmm, I don't think that it can be called no-sql database, file doesn't provide any of ACID out of the box, without additional care about it File is just a file, with protobuf, xml or raw text
u
true
m
I know that you sort of solved this, but what did you mean with “the whole thing rewritten again to disc”? the whole database, table, record? With a database, one record is normally the smallest item being saved, but depending on the underlying disk driver and also hardware the real saved data can be similar in size or much larger. SSD for example rewrites a whole hardware block that could be around 4k of data that could belong to different files. 🙂
u
yea I read that just recently, that its a sector thats the smallest item not that one column, thanks