DDL Part II
Outline • Overview of Database Transactions • Commit • Savepoint • Rollback Database Transactions A database transaction consists of one of the following: • DML statements which constitute one consistent change to the data • One DDL statement • One DCL statement Database Transactions • Begin when the first DML SQL statement is executed • End with one of the following events: – A COMMIT or ROLLBACK statement is issued – A DDL or DCL statement executes (automatic commit) – The system crashes Advantages of COMMIT and ROLLBACK Statements With COMMIT and ROLLBACK statements, you can: • Ensure data consistency • Preview data changes before making changes permanent • Group logically related operations Controling Transactions Diagram Rolling Back Changes to a Savepoint • You can create a marker in the current transaction by using the SAVEPOINT statement which divide...