Exercise: Transactions and Concurrency Control
Explore practical exercises that reinforce your understanding of transaction management and concurrency control. Learn to execute transactions involving insert, update, and rollback operations while maintaining data integrity. Verify changes and adjust transaction isolation levels to control database concurrency behavior effectively.
We'll cover the following...
Let’s get some hands-on practice!
Question 1
Given the following structure of the Categories table:
Field | Type |
|
|
|
|
Where CategoryID is the primary key. The table contains information about categories of products.
Start a transaction, insert a new category named Office Supplies into the Categories table. Then, immediately roll back the transaction. Finally, verify that the Office Supplies category was not permanently added.
If you’re stuck, click the “Show Solution” button.
Question 2
Given the following structure of the Customers table:
Field | Type |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|