January 14, 2014 at 4:09 am
Hello All,
I'm just wondering about the semantics here, so that I get this clear in my mind.
What is the difference (if any) between a corrupt database and a database that is inconsistent.
Are people using these words interchangeably or should we be more careful how we use them?
Many thanks,
Dave.
Dave Morris :alien:
"Measure twice, saw once"
January 14, 2014 at 4:57 am
Corruption is when something is actually wrong with the database. For example a page is corrupt and cannot be read anymore from disk.
Inconsisteny is a problem within the data itself and the way it has been modelled. But the database itself can still be perfectly fine.
For example, two tables store customer information. Dave has been stored twice with the same email address. One table is updated and the email address gets a new value. The database is now inconsistent, because Dave now has two possible email addresses, but which one is correct? The risk for inconsistency can be minimized by correctly normalizing the model. Another important factor for inconsistency are transactions. If a transactions fails halfway through and doesn't roll back, it can leave the database in an inconsistent state. That's why transactions need to adhere to the ACID model, where the C stands for consistency.
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
January 14, 2014 at 5:54 am
Hi Koen,
Thanks very much for the reply. Your clear explanation has helped me understand this.
Your point that data modeling is one cause of inconsistency within the data as well as transactions is very helpful. I can see how the ACID concept fits into this whole idea too.
Thanks again,
Dave.
Dave Morris :alien:
"Measure twice, saw once"
January 14, 2014 at 5:56 am
Of course, database corruption can lead to inconsistency.
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
January 15, 2014 at 7:33 am
Point noted 🙂
Thanks again.
Dave Morris :alien:
"Measure twice, saw once"
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply