我已经阅读了大约 4 个隔离级别:
Isolation Level Dirty Read Nonrepeatable Read Phantom Read
READ UNCOMMITTED Permitted Permitted Permitted
READ COMMITTED -- Permitted Permitted
REPEATABLE READ -- -- Permitted
SERIALIZABLE -- -- --
我想了解每个事务隔离对表的锁定
READ UNCOMMITTED - no lock on table
READ COMMITTED - lock on committed data
REPEATABLE READ - lock on block of sql(which is selected by using select query)
SERIALIZABLE - lock on full table(on which Select query is fired)
以下是事务隔离中可能出现的三种现象
Dirty Read - no lock
Nonrepeatable Read - no dirty read as lock on commited data
Phantom Read - lock on block of sql(通过select查询选择)
我想了解我们在哪里定义这些隔离级别:仅在 jdbc/hibernate 级别或 DB 中
PS:我已经浏览了oracle 中的隔离级别中的链接,但它们看起来很笨拙并且谈论特定于数据库的内容