









Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Main points of this past exam are: Transaction Management, Consultant, National Institute, Technical Architect, Two-Phase Locking Protocol, Cascading Aborts, Andacle, Exclusive Locks, Serializable, Brief Description
Typology: Exams
1 / 16
This page cannot be seen from the preview
Don't miss anything!
College of Engineering Department of EECS, Computer Science Division CS186 J. Hellerstein Spring 2001 Final Exam Final Exam: Introduction to Database Systems This exam has seven problems, each worth a different amount of points. Each problem is made up of multiple questions. You should read through the exam quickly and plan your time-management accordingly. Before beginning to answer a question, be sure to read it carefully and to answer all parts of every question! Good luck! Transaction Management and Locking
a. “Because we use the Two-Phase Locking protocol (2PL) in JCN , deadlocks can never occur in our system.” Wrong Right b. “ Notacle uses Strict Two Phase Locking Protocol, and therefore we can ensure there will be no cascading aborts.” Wrong Right c. “Our lock manager in Andacle uses shared and exclusive locks, which guarantees that all schedules in our system are serializable.” Wrong Right
Functional Dependencies and Decomposition
a. Analysis. Do analysis to correctly fill out the Transaction and Dirty Page Tables. You may find that you’re scratching things out as you go…please try to be neat so we can read the final state of the tables. b. Redo. Perform redo to repeat history. Put a mark in the rightmost column of the log next to each update log record that you must redo in the database during this phase. c. Undo. Perform undo. For your answer, please add the appropriate log entires while undo is being performed, but do not modify the tables you filled in for Analysis (so that we can see what you did in part (a)). d. At the end of Undo, what would the real transaction table have in it?
a) Provide CREATE TABLE statements for the tables ShoppingCarts and CartContents. You may assign types as you see fit. Be sure that integrity constraints are maintained. Also, ensure that all the common transactions are able to run to completion (i.e. they don’t have to be aborted)! (over → )
b) Assume that each transaction works as follows: an existing customer creates a cart, adds five existing products to the cart, generates a checkout page, and deletes the cart. Given this workload, for each of the following indexes say whether they should be built (YES/NO), and justify why or why not. Be sure to justify all the details of the indexes you think should be built!
d) In fact, Postgres has other advantages over MySQL as well. One additional advantage is that Postgres supports row-level locking (i.e. its transaction manager sets locks on individual rows), while MySQL only supports table-level locking (it sets locks on entire tables). Hence in principle Postgres can provide higher concurrency than MySQL in many scenarios. Your friend loves MySQL, and tries to convince you that its locking technique is not a problem for your workload. One of his main arguments is that your “checkout page” query is a “killer query” that will effectively force both MySQL and Postgres to run one user at a time to guarantee the ACID properties. Explain why your friend is wrong.