Chapter 14. DML and Transaction ManagementPL/SQL is tightly integrated with the Oracle database via the SQL language. From within PL/SQL, you can execute any Data Manipulation Language (DML) statementsspecifically INSERTs, UPDATEs, DELETEs, and, of course, queries.
You can also join multiple SQL statements together logically as a transaction, so that they are either saved ("committed" in SQL parlance) together, or rejected in their entirety ("rolled back"). This chapter examines the SQL statements available inside PL/SQL to establish and manage transactions To appreciate the importance of transactions in Oracle, it helps to consider the "ACID" principle: a transaction has Atomicity, Consistency, Isolation, and Durability. These concepts are defined as follows:
A transaction can either be saved by performing a COMMIT or erased by requesting a ROLLBACK. In either case, the affected locks on resources are released (a ROLLBACK TO might release only some locks). The session can then start a new transaction. The default behavior in a PL/SQL program is that there is one transaction per session, and all changes that you make are a part of that transaction. By using a feature called autonomous transactions |
Friday, October 30, 2009
Chapter 14. DML and Transaction Management
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment