版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
TheArchitectureofTransactionProcessingSystems2EvolutionofTransactionProcessingSystemsThebasiccomponentsofatransactionprocessingsystemcanbefoundinsingleusersystems.Theevolutionofthesesystemsprovidesaconvenientframeworkforintroducingtheirvariousfeatures.3Single-UserSystemPresentationServices-displaysforms,handlesflowofinformationto/fromscreenApplicationServices-implementsuserrequest,interactswithDBMSACIDpropertiesautomatic(isolationistrivial)ornotrequired(thisisnotreallyanenterprise)DBMSusermodulecentralizedsystemPresentationServicesApplicationServicesDB4CentralizedMulti-UserSystemusermodulecentralmachinepresentationapplicationservicesservicespresentationapplicationservicesservices•••communicationDBMSdumbterminalDB5
Two-TieredModelofTPSDBMSdatabaseservermachinepresentationapplicationservicesservicespresentationapplicationservicesservices•••clientmachinescommunicationStoredProceduresSPsDB6
Three-TieredModelofTPSDBMSdatabaseservermachinepresentationserver•••clientmachinescommunicationpresentationserverapplicationserverapplicationservermachineDB7
Three-TieredModelofTPSDBMSdatabaseservermachinepresent.server•••clientmachinescommunicationpresent.serverapplic.serverapplic.servermachinestrans.servertrans.servermachinesDB8Concurrency
of
TransactionsExecution9TransactionT1&T2T1T2localcomputationlocalvariablesbegintrans..op1,1..op1,2..commitbegintrans..op2,1..op2,2..commit多用户事务执行示例begintrans..op1,1..op1,2..commitbegintrans..op2,1..op2,2..commit10TransactionExecutionT1T2localcomputationlocalvariablessequenceofdboperationsoutputbyT1op1,1op1.2
c1op2,1op2.2
c2sequenceofdb
operationsoutputbyT2begintrans..op2,1..op2,2..commitbegintrans..op1,1..op1,2..commit11SequenceofDBop.inputtoDBMST1T2op1,1op1.2
c1op2,1op2.2
c2DBMSinterleavedsequenceofdboperationsinputtoDBMSop1,1op2,1op2.2
c2
op1.2c1受并发控制的影响,各个事务的数据库访问请求在DBMS内部的执行顺序,与它们到达DBMS的顺序不完全一样!但就单个事务而言,其操作的执行顺序是不变的!12ExecutionsequenceofDBop.inDBMST1T2op1,1op1.2
c1op2,1op2.2
c2DBMSinterleavedsequenceofdboperationsinputtoDBMSop1,1
op2,1op1.2c1op2.2
c2executionsequenceofdboperationsinDBMSop1,1op2,1op2.2
c2
op1.2c1各个事务的数据库访问操作,在DBMS中的实际执行序列,就构成这些事务之间的一个调度(Schedule或History)如上图所示,最终产生的是这两个事务之间的一个串行调度(先T1后T2)。13SerialExecutioninDBMST1T2op1,1op1.2
c1op2,1op2.2
c2DBMSinterleavedsequenceofdboperationsinputtoDBMSop1,1
op1.2c1op2,1op2.2
c2SerialExecutioninDBMST1&T2op1,1op2,1op2.2
c2
op1.2c114ConcurrentExecutioninDBMST1T2op1,1op1.2
c1op2,1op2.2
c2DBMSinterleavedsequenceofdboperationsinputtoDBMSop1,1op2,1op2.2
c2
op1.2c1如上图所示,最终产生的是这两个事务之间的一个并发调度。不正确的并发执行,可能产生错误的执行结果。DMBS并发控制的目标,是实现并发事务的可串行化调度!op1,1
op2,1op1.2c1op2.2
c2concurrentsequenceofdboperationsinDBMSTransaction(事务)‘事务’是一个非常古老的思想,一般是指要做的或所做的事情;在计算机术语中,‘事务’是指访问并可能更新数据库中数据的一个程序执行单元(unit);在传统语义学上,‘事务’就是一种转换系统状态的行为。三个层面上的‘事务’概念现实世界:一件‘事情’计算机世界:一个‘程序执行单元’数据库管理系统:一个用于访问数据库的‘执行单元’在关系数据库系统中一个事务是指由“一条SQL语句”或“一组SQL语句”所构成的一个执行过程,并具有ACID四个特性。‘事务’是恢复和并发控制的基本单位为什么要引入‘事务’概念?数据完整性(integrityofthedatabase)consistentstate影响数据完整性的因素concurrencyrecoverytransactionabortsystemcrashmediafault在数据库管理系统中引入事务处理功能,可以确保在任何情况下,都能保证数据库中数据的正确性。DB事务执行concurrencycontrolrecoverycontrolConcurrencycontroldealswithensuringthattheintegrityofthedatabaseispreservedwhenitisbeingsimultaneouslyaccessedbymorethanoneuser.Recoverycontroldealswithensuringthattheintegrityofthedatabaseispreservedevenifaabort/crash/faultshouldoccurwhilechangesarebeingmadetothedatabase.ThePropertiesofTransact
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2024年培南类抗菌药物项目合作计划书
- 沿河土石围堰施工方案
- 2024年气体制剂机械项目合作计划书
- 2024年医用光学器具仪器项目发展计划
- 公交公司装修工程施工方案
- 山东省德州市陵县2024-2025学年六上数学期末质量跟踪监视模拟试题含解析
- 2024年智能制造装备合作协议书
- 塑料 丙烯腈-苯乙烯-丙烯酸酯(ASA)、丙烯腈-(乙烯-丙烯-二烯烃)-苯乙烯(AEPDS)、丙烯腈-(氯化聚乙烯)-苯乙烯(ACS)模塑和挤出材料 第2部分:试样制备和性能测定 编制说明
- 山东省济南市平阴县2024年六年级数学第一学期期末质量跟踪监视试题含解析
- 2024年毒素类诊断抗原项目建议书
- 酒店明住宿清单(水单)
- 专题12数列的建模与探究-原卷版
- 中国各大省份及省会城市(带拼音)
- 新版北师大版七年级数学上册总复习课件ppt
- 新概念英语第3册单词表
- 3.3《不简单的杠杆》课件
- 《化妆技巧与形象设计》项目七
- RoboDK的基础操作 课件
- 数字经济导论 课件全套 第1-14章 数字经济概述-重点领域的数字经济政策
- 黎平县建筑垃圾填埋场项目环评报告
- 医疗期知识培训课件
评论
0/150
提交评论