Isolation is a guarantee against partial reads

Last Updated on Jan 26, 2021

Isolation is one of the four safety guarantees that databases provide to handle certain error scenarios and concurrency issues.

In databases that guarantee isolation, transactions are prevented from interfering with each other's execution. From a transaction's point of view, it will seem as if it is the only one running in the entire database, and the rest of the database is static for the duration of the transaction.

In combination with Atomicity, isolation means that applications do not have to worry about accidentally reading partial data changes. They can safely assume that all readable data will be permanently available.

Without isolation, a transaction may end up reading data that is eventually not committed if the other transaction is aborted. If the transaction takes decisions based on this in-transit data, it can lead to data corruption.

Databases provide this guarantee at various levels depending on the context. For transactions happening in real-time, isolation can mean that transactions will only be able to read data committed by the time the transaction started. In situations where a database has to be captured as it was at a point in time (taking backups, for example), isolation can mean taking a snapshot of the entire database.

© 2022 Ambitious Systems. All Rights Reserved.