数据库复习总结(19)-锁模型
Posted mhq-martin
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了数据库复习总结(19)-锁模型相关的知识,希望对你有一定的参考价值。
锁:防止其它人员的误操作
例如:
先执行:

--锁:防止其它人员的误操作
select * from UserInfo
begin tran
update UserInfo set UserName=‘456‘ where UserId=3
View Code
然后在新建一个窗口(模拟别人)
执行:
结果

当执行:

begin tran
update UserInfo set UserName=‘456‘ where UserId=3
rollback tran
View Code
时
即可操作
以上是关于数据库复习总结(19)-锁模型的主要内容,如果未能解决你的问题,请参考以下文章
java并发线程锁技术的使用
python 复习—并发编程——线程锁threading.local线程池生产者消费者模型线程安全
Cg入门19:Fragment shader - 片段级模型动态变色
树分治 复习总结
ReentrantReadWriteLock场景应用
《数据库原理与应用》复习总结