Real World Example of Consistency
Let’s look at the real world example of how a transaction is made in a bank to ensure data consistency across both the accounts.
Step-1: Before transaction 1, the total amount in Account-A is 1000 and in Account-B is also 1000.S
Step-2: After Transaction 1, the total amount in Account-A will be 800 and in Account-B its 1200. As 200 is sent to Account-B in Transaction-1.
Step-3: Similar steps happen in Transaction-2.
What is Database Consistency?
Database consistency governs the most crucial aspects of the database, availability of correct information at the right time by the validation rules specified in the beginning is what decides the data integrity, and accuracy of the data stored.
In this article, we’ll be exploring consistency in the context of a relational database, why it’s crucial to be maintained, its real-world examples, and what features of an RDBMS help maintain a consistent database.