0% found this document useful (0 votes)
57 views

DP 18 1 Practice

Uploaded by

Sukuna Vessel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
57 views

DP 18 1 Practice

Uploaded by

Sukuna Vessel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Database Programming with SQL

18-1: Database Transactions


Practice Activities
Objectives
• Define the COMMIT, ROLLBACK, and SAVEPOINT statements as they relate to data
transactions
• List three advantages of COMMIT, ROLLBACK, and SAVEPOINT statements
• Explain why it is important, from a business perspective, to be able to control the flow of
transaction processing

Vocabulary
Identify the vocabulary word for each definition below

Ends the current transaction making all pending data changes


permanent

Enables the user to discard changes made to the database

Creates a marker in a transaction, which divides the transaction


into smaller pieces

guarantees a consistent view of the data by all users at all times

Mechanisms that prevent destructive interaction between


transactions accessing the same resource that can be granted to
the user

a collection of DML statements that form a logical unit of work

Copyright © 2020, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.
Try It / Solve It

1. Define the COMMIT, ROLLBACK, and SAVEPOINT statements as they relate to data
transactions.

2. What data will be committed after the following statements are issued?

INSERT INTO R values (5, 6);


SAVEPOINT my_savepoint_1;
INSERT INTO R values (7, 8);
SAVEPOINT my_savepoint_2;
INSERT INTO R values (9, 10);
ROLLBACK TO my_savepoint_1;
INSERT INTO R values (11, 12);
COMMIT;

3. Construct a SQL statement for the DJs on Demand D_SONGS table that deletes the song “All
These Years,” inserts a new Country song called ‘Happy Birthday Sunshine’ by “The Sunsets” with
a duration of 4 min and an ID = 60. Make sure that all data can be recovered before any changes
to the table are made.

4. Write an SQL statement that will issue an automatic commit.

5. Give two examples of businesses other than banks that rely on transaction control processes.
Describe why each business needs transaction processing control.

Copyright © 2020, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.

You might also like