Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This assignment will demonstrate the use of transactions. Specifically, changes will be rolled back to a previous state prior to performing a commit. The assignment

This assignment will demonstrate the use of transactions. Specifically, changes will be rolled back to a previous state prior to performing a commit. The assignment will be composed of SQL Plus DML and DCL statements. Write a script that performs the following.

  1. Login to SQL Plus as user SCOTT
  2. Issue a statement to display the employee number, employee name and salary from the "emp" table
  3. Issue a statement to begin a transaction
  4. Issue statement(s) to insert 4 new records into the "emp" table.
  5. Issue a statement that repeats Step 2 (to verify that all changes have been added).
  6. Issue a statement to rollback the changes
  7. Issue a statement that repeats Step 2 ( to verify that all changes have been undone)

Notes:

1. The Oracle Universal Installer (OUI) creates the EMP, DEPT, .BONUS, SALGRADE, CUSTOMER, ORD, ITEM, and PRODUCT.

2. The following query will display all tables defined in a user's schema.

SELECT table_name FROM user_tables;

3. The EMP table has a FK constraint on the DEPTNO field (i.e. that value must exist in the DEPT table)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2015 Porto Portugal September 7 11 2015 Proceedings Part 3 Lnai 9286

Authors: Albert Bifet ,Michael May ,Bianca Zadrozny ,Ricard Gavalda ,Dino Pedreschi ,Francesco Bonchi ,Jaime Cardoso ,Myra Spiliopoulou

1st Edition

3319234609, 978-3319234601

More Books

Students also viewed these Databases questions