Operational semantics of transactions(10)
时间:2026-01-15
时间: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
This large variety becomes completely confus-ing if rule triggering is considered.Except (Schewe/Thalheim1998),rule triggering is not well-understood in the database community.The SQL standard allows one event per trigger and an arbi-trary number of triggers per event.This approach is used in DB2,MS SQL,Sybase SQL Anywhere and partially in Informix.Ingres and Oracle do not limit the number of events per trigger.Sybase uses the op-posite approach:only one trigger per event is allowed but the number of events per trigger is not limited. It can be shown that the Sybase approach leads to better programming.
The SQL’99approach suffers from a number of pitfalls:
Local definition without global understanding.
Trigger avalanches.
Unknown implications.
Swinging transaction systems.
Constraint modification anomaly.
A better approach is the derivation of such a specialization of a given basic operation which pre-serves the integrity constraint.We may use the great-est consistent specialization(Schewe/Thalheim1999) as such specialization.(Link2002)provides a nice framework for applying this approach to tailored re-finements.
The transaction models discussed above at the conceptual level can be refined by combining the trig-ger execution frame with the state transition diagram of a transaction.
The state model uses additional structures of the working space:
Immediate constraints are either checked at the row or at the statement level.There are two activation modes:
Check before execution for constraints mode is ‘immediate’and whose activation time is
‘before’.
Check after execution for constraints which are checked after execution of a statement or
after modification of a tuple.
Deferred constraints are checked at the end.They re-place the setΣin the READY2COMMIT state.
Using queues instead of sets of constraints models the order of constraint check which is different in current DBMS.
The state model in Figure4is extended by the states Prepare4RunNext,ApplicationOfImmedi-ateTrigger,and Ready4Next.Due to paper length we do not elaborate the application of these options.
5Conclusion
Transactions are specified at the logical level as atomic operations which preserve consistency of a database.They can be potentially executed in par-allel if they are not competing for resources or if the competition can be resolved.The logical level does not consider specific details of implementation op-tions.Implementation options depend on the support of the computation and main-memory engine,on the solutions for the isolation of competing transactions and on the consistency enforcement mode.
This paper proposes both a logical semantics and an operational semantics for transactions which can be refined in dependence on the options.References
Biskup,J.(1995),Foundations of information systems,Vieweg, Braunschweig,(in German).
Codd, E.F.(1990),The relational model for database manage-ment-Version2Addison-Weslay.
Elmasri R.&Navathe,S.B.(2000),Fundamentals of database systems,Benjamin/Cummings Publ.
Embley,D.(1998),Object database development,Addison-Wesley.
Gottlob,G.,Kappel,G.&Schrefl,M.(1982),‘Semantics of object-oriented data models:The evolving algebra approach’,in LNCS504,Springer,144-160.
Garcia-Molina,H.,Ullman,J.D.&Widom,J.(2000),Database system implementation,Prentice-Hall.
Gurevich,J.,Soparkar,N.&Wallace, C.(1997),Formalizing database recovery,Journal of Universal Computer Science, 3,4,320-340.
Gray J.&Reuter,A.(1993),Transaction processing:Concepts and techniques,Morgan-Kaufman.
Gurevich,Y.(May1997),Draft of the ASM Guide.Technical Report,Univ.of Michigan EECS Department,CSE-TR-336-
97.
Available from the ASM website via http://www.eecs.umich.edu/gasm/
Gurevich,Y.(2000),Sequential abstract-state machines capture sequential algorithms.ACM Transactions on Computa-tional Logic,1,1,77-111.
Haerder T.&Reuter,A.(1998),Principles of transaction-oriented database recovery,in(Hsu/Kumar1998),16-55.
Hsu M.&Kumar,V.(1998),Introduction to database recovery,in (Hsu/Kumar1998),6-15.
ISO International Standard:Database language SQL-Part2: Foundation(SQL Foundation).(1999),International Orga-nization for Standardization&American National Standard Institut,ANSI/ISO/IEC9075-2:99,Sept.1999.
Kumar V.&Hsu M.(eds.),(1998),Recovery mechnisms in database systems,Prentice-Hall.
Lewis,P.M.,Bernstein, A.&Kifer,M.(2002),Databases and transaction processing:An application-oriented approach, Addison-Wesley.
Levene M.&Loizou,G.(1999),A guided tour to relational databases and beyond,Springer.
Link,S.(2002),‘Towards a tailored theory of consistency enforce-ment in databases’,in Proc.FoIKS’02(eds.T.Eiter,K.-D.
Schewe),LNCS2284,Springer,160-177.
Malzew,A.I.(1970),Algebraic systems,Nauka,(in Russian).
Schewe K.-D.&Thalheim,B.(1998),‘Limitations of rule triggering systems for integrity maintenance in the context of transition specification’,Acta Cybernetica,13,277-304.
Schewe K.-D.&Thalheim,B.(1999),‘Towards a theory of consis-tency enforcement’,Acta Informatica,36,2,97-141.
St¨a rk,R.,Schmid,J.&B¨o rger, E.(2001),Java and the Java virtual machine:Definition,verification and validation, Springer.
Thalheim,B.(2000),Entity-relationship modeling–Foundations of database technology,Springer.
Thalheim,B.(2001),Abstraction layers in database structuring: The star,snowflake and hierarchical structuri …… 此处隐藏:3904字,全部文档内容请下载后查看。喜欢就下载吧 ……