Operational semantics of transactions

时间:2026-01-15

Mathematics is forcing towards a consistent framework of theory development. Computer Science is an engineering discipline and sometimes suffers from ad-hoc definitions. Transactions are a concept that is commonly used in the database area. It is often def

Operational Semantics of Transactions

Andreas Prinz Bernhard Thalheim

DResearch Digital Media GmbH,Computer Science Institute Otto-Schmirgal-Str.3,Brandenburg University of Technology at Cottbus D-10319Berlin,Germany PostBox101344,D-03013Cottbus Email prinz@DResearch.de Email thalheim@informatik.tu-cottbus.de

Abstract

Mathematics is forcing towards a consistent frame-work of theory puter Science is an engineering discipline and sometimes suffers from ad-hoc definitions.Transactions are a concept that is commonly used in the database area.It is often defined in the form:given a syntactic construct in an abstract form and declare a number of properties an engine should support which is not specified and invisible.

This paper aims in providing an operational se-mantics for transactions.A DBMS implementation is then considered to be a faithful refinement of the operational semantics.

1Introduction

Transactions are one of the fundamental frameworks in the information systems area.It is necessary to define the notion of“transaction”that is robust ac-cording to the following requirements:

•Logical semantics must coincide with operational semantics for transactions.

•Parallel execution of transactions must be defin-able inside the operational semantics used for transactions.

•One refinement of the transaction model is the implementation of transaction execution by a DBMS.

•Arbitrary order of execution:Transactions can be executed in any order as long as they are not competing for resources.

•Rigid punch:Transaction execution leaves traces in the database whenever the effect of the trans-action does not contradict the database.

1.1Variety of Definitions

“Definitions are a matter of luck”is a humorous statement often made by A.N.Kolmogoroffand H. Thiele.The transaction definition made in a variety of books and papers seems to be a good example of this claim:

TA as obligation(Embley1998):“A transaction is a program unit that accesses the database;it re-trieves and may update data.A database system has the responsibility of executing a transaction Copyright c 2003,Australian Computer Society,Inc.This pa-per appeared in the Fourteenth Australasian Database Con-ference(ADC2003),Adelaide,Australia.Conferences in Re-search and Practice in Information Technology,Vol.17.Xi-aofang Zhou and Klaus-Dieter Schewe,Ed.Reproduction for academic,not-for profit purposes permitted provided this text is included.

so that it is both atomic and correct....A trans-action is a program unit that preserves correct-ness and atomicity.”

TA as an agent(Garcia-Molina et al.2000):“A trans-action,like any program,executes a number of steps in sequence;often several of these steps will modify the database.Each transaction has

a state,which represents what has happened so

far in the transaction.The state includes the current place in the transaction’s code being exe-cuted and the values of any local variables of the transaction that will be needed later on.”

TA as special program(Codd1990):“A transaction is a collection of activities involving changes to the database,all of which must be executed suc-cessfully if the changes are to be committed to the database,and none of which may be committed if any one or more of the activities fail.Normally, such a collection of activities is represented by a sequence of relational commands.The beginning of the sequence is signaled by a command such as BEGIN or BEGIN TRANSACTION.Its termination is signaled by a command such as END or COMMIT-or,if it is necessary to abort the transaction,ABORT.”

Two views on TA’s(Hsu1998):“An end user com-municates with a database through a mechanism called a transaction.A transaction can be de-fined from the user viewpoint and from the sys-tem viewpoint.The end user(the operator,the system administrator,etc.)sees a transaction as a request/reply unit expressed in the form of

a source program.The system sees a transac-

tion as a sequence of operations(reads,writes, etc.)on the data elements.The user conveys a change to the DBMS via a transaction and awaits

a reply from the system.The DBMS then imple-

ments the set of operations(defined in the trans-action)on a subset of data elements by execut-ing the transaction under a set of the changes through a“successful”execution of the transac-tion.The DBMS guarantees the incorporation of the changes through a“successful”execution of the transaction.We will refer to such execution of a transaction as“commit”.

A transaction T must possess a set of well-

defined properties to be able to correctly reflect in the database the changes to the part of the real world.In executing a transaction,the sys-tem guarantees that all the changes proposed in the transaction,not only a part of them,are in-corporated correctly in the database.”

TA as concurrent operation(Elmasri/Navathe2000):“The execution of a program that accesses or changes the contents of the database is called

a transaction.The transaction submitted by

various users may execute concurrently and may

…… 此处隐藏:3252字,全部文档内容请下载后查看。喜欢就下载吧 ……
Operational semantics of transactions.doc 将本文的Word文档下载到电脑

精彩图片

热门精选

大家正在看

× 游客快捷下载通道(下载后可以自由复制和排版)

限时特价:4.9 元/份 原价:20元

支付方式:

开通VIP包月会员 特价:19元/月

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信:fanwen365 QQ:370150219