本文主要是介绍数据库的事物处理ISOLATION LEVEL,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
Serializable
Repeatable read
Read committed
Read uncommitted
Repeatable read
Read committed
Read uncommitted
Serializable
This level prohibits the following types of reads:
– Dirty reads: A transaction reads a database row containing uncommitted
changes from a second transaction.
– Nonrepeatable reads: One transaction reads a row, a second transaction
changes the same row, and the first transaction rereads the row and gets
a different value.
– Phantom reads: One transaction reads all rows that satisfy an SQL
WHERE condition, a second transaction inserts a row that also satisfies
the WHERE condition, and the first transaction applies the same WHERE
condition and gets the row inserted by the second transaction.
This level prohibits the following types of reads:
– Dirty reads: A transaction reads a database row containing uncommitted
changes from a second transaction.
– Nonrepeatable reads: One transaction reads a row, a second transaction
changes the same row, and the first transaction rereads the row and gets
a different value.
– Phantom reads: One transaction reads all rows that satisfy an SQL
WHERE condition, a second transaction inserts a row that also satisfies
the WHERE condition, and the first transaction applies the same WHERE
condition and gets the row inserted by the second transaction.
Repeatable read
This level prohibits dirty reads and nonrepeatable reads, but it allows
phantom reads.
This level prohibits dirty reads and nonrepeatable reads, but it allows
phantom reads.
Read committed
This level prohibits dirty reads, but allows nonrepeatable reads and phantom
reads.
Read uncommitted
This level allows dirty reads, nonrepeatable reads, and phantom reads.
This level prohibits dirty reads, but allows nonrepeatable reads and phantom
reads.
Read uncommitted
This level allows dirty reads, nonrepeatable reads, and phantom reads.
这篇关于数据库的事物处理ISOLATION LEVEL的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!