Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are there any difference between data integrity and data consistency?

I'm a little confused about data consistency and data integrity. From Oracle Database Concepts:

data integrity -------------- Business rules that dictate the standards for acceptable data. These rules are applied to a database by using integrity constraints and triggers to prevent invalid data entry. 

From Wikipedia

Consistency ----------- Consistency states that only valid data will be written to the database. 

So what's the difference between data consistency and data integrity?

Thanks in advance.

like image 442
Just a learner Avatar asked Feb 03 '11 05:02

Just a learner


People also ask

What is data integrity and consistency?

Data integrity refers to the accuracy and consistency (validity) of data over its lifecycle. Each time data is replicated or transferred, it should remain intact and unaltered between updates. - Digital Guardian. Sounds simple, right? In theory maybe, but in practice it's definitely not that easy.

Is integrity the same as consistency?

Integrity means that the data is correct. Consistency means that the data format is correct, or that the data is correct in relation to other data.

What is the difference between data consistency and data inconsistency?

The main difference between data redundancy and data inconsistency is that data redundancy is a condition that occurs when the same piece of data exists in multiple places in the database whereas data inconsistency is a condition that occurs when the same data exists in different formats in multiple tables.

What is the difference between data integrity and data redundancy?

The main difference between data integrity and data redundancy is that data integrity is the process of ensuring that the data is accurate and consistent over its whole life cycle while data redundancy is a condition that can cause the same piece of data to be stored in multiple places of a database or a storage device ...


1 Answers

They are not only different, they are orthogonal.

Inconsistency:
A DB that reported employee Joe Shmoe's department as Sales but that didn't list Joe Shmoe among the employees in the Sales department would be inconsistent.
It's a logical property of the DB, independent of the actual data.

Integrity:
A DB that reported jOe SaleS to be a member of the Shmoe department would lack integrity.
jOe SaleS isn't a valid employee name and Shmoe isn't a valid department.
That's not logically invalid, but it is invalid relative to the rules that govern data content.

like image 173
Jim Balter Avatar answered Sep 21 '22 17:09

Jim Balter