Beruflich Dokumente
Kultur Dokumente
Table 1.0
Current State of Departments table.
CS352-DBMS2-MAS Page 1
NAME: MICHAEL JORDAN A. PASCUAL COURSE: BSCS
TITLE: Applying Database Transaction USN ID: 20160008916
MACHINE ACTIVITY NO. 2 DATE: 12-05-2019
7. After inserting values in No. 6. Check the changes made to the table by issuing
the SELECT * command.
8. Rolled back to the savepoint you have created in No. 3.
ROLLBACK TO DELETE_NULL;
9. After Rolling back to the savepoint created in No. 3 check the departments table
by issuing SELECT * command.
10. After checking the changes made. What Happen to the delete statement made at
No. 3 as well as the Insert statement made at No. 6. Why is that so?
The delete statement was not rollback because the savepoint executed is
after deleting the MANAGER_ID IS NULL and the VALUES ADDED in No. 6
was also rollback to the savepoint DELETE_NULL the savepoint is before
the No. 6 item.
11. Create a new table name as Parts with the following structure as shown below.
CS352-DBMS2-MAS Page 2
NAME: MICHAEL JORDAN A. PASCUAL COURSE: BSCS
TITLE: Applying Database Transaction USN ID: 20160008916
MACHINE ACTIVITY NO. 2 DATE: 12-05-2019
VALUES(‘AT95’,’OVEN’,10,1402);
13. View the records both for Departments and Parts table by issuing SELECT *
command?
14. Discard all the changes performed by issuing ROLLBACK statement.
ROLLBACK;
15. What happens to the Departments table? Is creating a new Table Parts affect the
departments table? Why and why not.
What happens to the Parts table is adding values successful? Why and why not.
DEPARTMENTS TABLE IS STILL IN THE COMMAND LINE BECAUSE
AUTOMATIC COMMIT EXECUTED ONCE YOU CREATED A NEW TABLE.
17. After new record to Parts table. Exit the SQLPLUS (by clicking ex button located
at the upper right corner). After closing open again the SQLPLUS and view both
Departments and Parts table by issuing SELECT * statement.
18. What happen to the Parts table? Is abnormal exit of oracle causes any problem?
Is the insertion maid at No. 16 is saved? Explain in detail why and why not. What
happens to the Parts table is adding values successful? Why and why not.
PARTS TABLE VALUES IS DELETED BECAUSE OF AUTOMATICALLY
ROLLBACK BACK CLOSING THE COMMAND LINE USING THE X BUTTON.
CS352-DBMS2-MAS Page 3
NAME: MICHAEL JORDAN A. PASCUAL COURSE: BSCS
TITLE: Applying Database Transaction USN ID: 20160008916
MACHINE ACTIVITY NO. 2 DATE: 12-05-2019
21. Check the departments table by issuing SELECT * command? What happens to
departments table? Are there still values in it? Why and Why not?
THE VALUES IN DEPARTMENTS TABLE IS DELETED BECAUSE OF USING
TRUNCATE STATEMENT.
22. Truncate and Drop Statement are said to the limitation of Database Transaction.
Explain the reason why.
TRUNCATE AND DROP CANNOT BE ROLLED BACK.
23. Count the number of transactions performed. How many transaction made?
4 TRANSACTIONS
24. What is the difference in using ROLLBACK TO SAVEPOINT to ROLLBACK?
ROLLBACK TO SAVEPOINT TRANSACTION IS USED IF YOU WANT TO
ROLLBACK YOUR DATABASE INFORMATION INTO THE SAVEPOINT
NAME YOU CREATED.
CS352-DBMS2-MAS Page 4
NAME: MICHAEL JORDAN A. PASCUAL COURSE: BSCS
TITLE: Applying Database Transaction USN ID: 20160008916
MACHINE ACTIVITY NO. 2 DATE: 12-05-2019
25. Provide a screen capture of the current state of both Departments and Parts
table by issuing SELECT * statement.
(Add the current state of your 2 tables here)
DEPARTMENTS TABLE
PARTS TABLE
CS352-DBMS2-MAS Page 5