- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
Lecture 14Transactions in SQL.ppt
Lecture 14:Transactions in SQL Monday, October 30, 2006 Outline Transactions in SQL The buffer manager Transactions Major component of database systems Critical for most applications; arguably more so than SQL Turing awards to database researchers: Charles Bachman 1973 Edgar Codd 1981 for inventing relational dbs Jim Gray 1998 for inventing transactions Why Do We Need Transactions Concurrency control Recovery Concurrency control:Three Famous anomalies Dirty read T reads data written by T’ while T’ is running Then T’ aborts Lost update Two tasks T and T’ both modify the same data T and T’ both commit Final state shows effects of only T, but not of T’ Inconsistent read One task T sees some but not all changes made by T’ Dirty Reads Lost Updates Inconsistent Read Protection against crashes Definition A transaction = one or more operations, which reflects a single real-world transition In the real world, this happened completely or not at all Examples Transfer money between accounts Purchase a group of products Register for a class (either waitlist or allocated) If grouped in transactions, all problems in previous slides disappear Transactions in SQL In “ad-hoc” SQL: Default: each statement = one transaction In a program: START TRANSACTION [SQL statements] COMMIT or ROLLBACK (=ABORT) Revised Code Transaction PropertiesACID Atomic State shows either all the effects of txn, or none of them Consistent Txn moves from a state where integrity holds, to another where integrity holds Isolated Effect of txns is the same as txns running one after another (ie looks like batch mode) Durable Once a txn has committed, its effects remain in the database ACID: Atomicity Two possible outcomes for a transaction It commits: all the changes are made It aborts: no changes are made That is, transaction’s activities are all or nothing ACID: Consistency The state of the tables is restricted by integrity constraints Account number is unique Stock amount can’t be negative Su
您可能关注的文档
- CSE115ENGR160 Discrete Mathematics031312.ppt
- CTO介入治疗:逆向导丝通过后顺向轨道建立方法.ppt
- CTS Communications ForumCIOsMay 14, 2007.ppt
- Curso de BioestadísticaParte 16Regresión lineal.ppt
- Daniel AmyotQ1817 (URN) Rapporteurdamyot@site.uottawa.ca.ppt
- Data Warehousing资料仓储.ppt
- Date 14 Oct 2004Location BrusselsAuthor Telefónica File.ppt
- December 18, 2006.ppt
- Decision Tables.ppt
- DEDUCTIVE vs. INDUCTIVE REASONING.ppt
- Lecture 16 Accelerator Design in the XUP Board.ppt
- Lecture 16 Diffraction Chp. 37.ppt
- Lecture 16Interference.ppt
- Lecture 16Object Oriented Modeling Methods.ppt
- Lecture 17 Tues., March 16.ppt
- Lecture 18 Polyelectronic Atoms.ppt
- Lecture 18 The Modeling Environment.ppt
- Lecture 18 VLIW and EPIC.ppt
- Lecture 18.ppt
- Lecture 18Globalization and Health.ppt
最近下载
- (100分)中国石油大学2022秋《红楼梦研究第二阶段在线作业.doc VIP
- 第7节货场平面布置及配置图.PDF VIP
- 8.1功与功率 (教学课件)-高中物理人教版(2019)必修第二册 .pptx VIP
- 海浦蒙特MTCC-V2A经典系列别墅电梯控制柜用户手册-中-V1.0.pdf VIP
- 塔里木油田超深气井产出剖面解释方法研究.pdf
- 2025年上海市青少年活动中心(上海市青年发展服务中心)工作人员公开招聘(第二批)笔试备考题库及答案解析.docx VIP
- 2025北京市公安局公共交通安全保卫总队勤务辅警招聘70人笔试备考试题及答案解析.docx VIP
- BRCGS 包装材料(第七版)文件清单.xlsx VIP
- 生物多样性保护与监测.pdf VIP
- 《探寻非遗漆扇之美》课件.pptx VIP
文档评论(0)