Data consistency is a measure of uniformity of data as it moves across a network and between various applications on a computer. This uniformity in data maintains the accuracy and integrity of information stored on the computer or across a network and ensures that the data does not violate application or network rules for valid data.
Database consistency is one of the four attributes that define ACID transactions alongside atomicity, isolation and durability. There are three types of data consistency. These include the point-in-time consistency, transaction consistency and application consistency.
Point-in-time consistency ensures that all the elements of a system are uniform at a specific moment in time. It prevents loss of data during system crashes and improper shutdowns. Transaction consistency refers to the consistency of a section of data across a working transaction within the computer. This type of consistency ensures that systems are able to detect incomplete transactions when powered on and undo or roll them back. Application consistency refers to the state in which related files and databases are consistent between several applications.
To ensure there is no loss or corruption of data as it travels through a computer network, each network must utilize all the three types of consistency. Database programs enforce data consistency through utilizing transactional models that block concurrent application instances from modifying the same data at the same time.