计算机软件及应用数据库课件.ppt

计算机软件及应用数据库课件.ppt

ID:59397974

大小:299.50 KB

页数:33页

时间:2020-09-19

计算机软件及应用数据库课件.ppt_第1页
计算机软件及应用数据库课件.ppt_第2页
计算机软件及应用数据库课件.ppt_第3页
计算机软件及应用数据库课件.ppt_第4页
计算机软件及应用数据库课件.ppt_第5页
资源描述:

《计算机软件及应用数据库课件.ppt》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库

1、9.ConcurrencyControlJongHoonKimDATABASESYSTEM IMPLEMENTATIONHECTORGARCIA-MOLINA JEFFRYD.ULLMAN JENIFERWIDOMGeneralprocessofassuringthattransactionspreserveconsistencywhenexecutingsimultaneously.TransactionmanagerSchedulerBuffersRead/WriterequestsReadsan

2、dwritesConcurrencyControlSchedulesCorrectnessprincipleIfexecutedinisolation,everytransactionwilltransformanyconsistentstatetoanotherconsistentstate.However,transactionsoftenrunconcurrentlywithothertransactions,sothecorrectnessprincipledoesn’tapplydirect

3、ly.schedules:time-orderedsequenceoftheactionstakenbyoneormoretransactions->guaranteeddoproducethesameresultasiftransactionsexecutedone-at-a-timeWhenstudyingconcurrencycontrol,theimportantreadandwriteactionstakeplaceinthemain-memorybuffers,notdiskT1T2REA

4、D(A,t)READ(A,s)t:=t+100s:=s*2WRITE(A,t)WRITE(A,s)READ(B,t)READ(B,s)t:=t+100s:=s*2WRITE(B,t)WRITE(B,s)theonlyconsistencyconstraintonthedatabasestateisthatA=B.eachtransaction,runinisolation,willpreserveconsistencySchedules–Ex.9.1SerialSchedules:AscheduleS

5、isserialifforanytwotransactionsTandT’,ifanyactionofTprecedesanyactionofT’,thenallactionsofTprecedesallactionsofT’T1T2AB2525READ(A,t)t:=t+100WRITE(A,t)125READ(B,t)t:=t+100WRITE(B,t)125READ(A,s)s:=s*2WRITE(A,s)250READ(B,s)s:=s*2WRITE(B,s)250T1T2AB2525READ

6、(A,s)s:=s*2WRITE(A,s)50READ(B,s)s:=s*2WRITE(B,s)50READ(A,t)t:=t+100WRITE(A,t)150READ(B,t)t:=t+100WRITE(B,t)150SerializableScheduleseveryserialschedulewillpreserveconsistencyofdatabasestateserializable:ifitseffectonthedatabasestateisthesameasthatofsomese

7、rialschedule,regardlessofwhattheinitialstateofthedatabaseisT1T2AB2525READ(A,t)t:=t+100WRITE(A,t)125READ(A,s)s:=s*2WRITE(A,s)250READ(B,t)t:=t+100WRITE(B,t)125READ(B,s)s:=s*2WRITE(B,s)250Aserializable,butserial,scheduleT1T2AB2525READ(A,t)t:=t+100WRITE(A,t

8、)125READ(A,s)s:=s*2WRITE(A,s)250READ(B,s)s:=s*2WRITE(B,s)50READ(B,t)t:=t+100WRITE(B,t)150NonerializableScheduleTheEffectofTransactionSemanticsT1T2AB2525READ(A,t)t:=t+100WRITE(A,t)125READ(A,s)s:=s*1WRITE(A,s)125READ(B,s)25s:=s*1WR

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。