4 ms·
So where are the definitions of those terms, actually? The article merely complains that Tkachenko's personal definitions of those two terms do not match Aphyr'
by pgaddict 11y ago
So where are the definitions of those terms, actually? The article merely complains that Tkachenko's personal definitions of those two terms do not match Aphyr's, but that's merely a personal opinion.
I'd argue that "corrupted" is usually used in cases when the data get messed up due to external circumstances (say, disk error corrupting a page of data) or because of a clear bug (say, writing to incorrect place), while "consistency" is usually used for data violating some invariants (foreign keys, check constraints, unique constraints, or global constraints like "total sum of money is X").
But in the end this is utterly irrelevant because the database failed to provide correct data (to the extend implied by the advertised guarantees like isolation level, for example). For the user the end result is pretty much the same.
And actually, corrupted data tend to be detected much sooner, because when you can't read the disk pace you know there's an error and can address it. The inconsistency is often creepy and takes very long until someone spots that.
- fipar 11y agoI don't know if there is some official definition, but my experience talking to others working with databases daily tells me they have the same concepts as I do, and a 5 second google search on "data corruption" followed by "data consistency" yield wikipedia articles in the top 3 results for both queries, showing concepts that, also, match those that I have.
- dsp1234 11y agoIf I sat down at one of our database consoles and fired off a few queries and saw that hundreds of thousands of dollars had appeared out of nowhere, I'd tell my boss that the database was corrupt. However, for the purposes of Aphyr's original article, it's a moot point specifically because Aphyr replaced the symbol with the substance[0]. He specifically states the conclusion, and in detail explains why it happened and what the ramifications are. Any quibbling about the word corruption is a distraction, because the underlying fault of the system is still present. The system claims to support snapshot isolation, but does not, and the result of that fact is that data will not be correct for users expecting snapshot isolation. [0] - http://lesswrong.com/lw/nv/replace_the_symbol_with_the_substance/ http://lesswrong.com/lw/nv/replace_the_symbol_with_the_subst...