INSTITUTO SUPERIOR TÉCNICO Administração e optimização de Bases de Dados

Size: px
Start display at page:

Download "INSTITUTO SUPERIOR TÉCNICO Administração e optimização de Bases de Dados"

Transcription

1 INSTITUTO SUPERIOR TÉCNICO Administração e optimização de Bases de Dados Exam 1 - Solution 1 June The duration of this exam is 2,5 Hours. You can access your own written materials, but the exam is to be done individually. You are not allowed to use computers, tablets, nor mobile phones. The maximum grade of the exam is 20 pts. Write your answers below the questions. Write your number and name at the top of each page. Present all calculations performed. After the exam starts, you can leave the room one hour after delivering the exam. The following table is be used by instructors, ONLY: SUM

2 1. (4 vals) Data Indexing 1.1. (2,5 pts). Consider the following B+ tree structure: Assume that when a leaf node is split, two values are copied to the left node and three to the right left node. Show the intermediate trees resulting from inserting the entry with key 42, and then deleting the entry with key 16. Insert 42: and then, delete 16: 2

3 1.2. (1 pt) Taking into account the original tree, indicate a sequence of five search key values such that when inserting them in the considered order, and then deleting them in the opposite order (i.e., insert a, insert b, delete b, delete a) results in the original tree. Justify your choice. Insert 13, 15, 23, 25, 28. The first four will make no change to the number of nodes in the tree, because they will fill empty slots in leaf nodes. Inserting 28 will cause the leaf node (24, 25, 27, 29) to split into: (24, 25,, ) and (27, 28, 29, ) and then to split the parent node into (13, 17,, ) and (27, 30,, ) and add a new root node (24,,,, ). When we delete in the opposite order: - deleting 28 makes no difference in the number of nodes - deleting 25 causes merging the two leaf nodes into (24, 27, 29, ) and also to merge the parent nodes into (13, 17, 24, 30) leading to the original tree (0,5 pt) Taking into account the original tree, indicate a sequence of five search key values such that when inserting them in the considered order, and then deleting them in the opposite order (i.e., insert a, insert b, delete b, delete a) results in a tree different from the original one. Justify your choice. Insert 13, 15, 23, 28, 42. It is enough to look into the solution of question 4.1. to understand why deleting the entries in the opposite order does not lead to the original tree. 3

4 2. (4 pts) Query Processing and Optimization 2.1. (2,5 pts) Consider the following database relations: student(id, name, master-program, avg-grade) takes(id, course, semester, year, grade) The student relation has 5,000 tuples and 1 page accommodates 50 tuples. The takes relation has 10,000 tuples and 1 page accommodates 25 tuples. Answer the following questions, assuming the size of the memory available is 11 pages: a) What is the cost, in terms of I/O, of joining student and takes using the merge join algorithm? b) What is the cost, in terms of I/O, of joining the same tables using the hash join algorithm? Student: 5,000 tuples => 5,000/50 = 100 pages = b student Takes: 10,000 tuples => 10,000/25 = 400 pages = b takes M = 11 a) Merge join: Cost = b student + b takes + cost(sorting student) + cost(sorting takes) We are assuming none of the relations is sorted by id (you could assume student is, because id is the primary key, but you could not assume the same for takes). Cost(sorting student) = b student * (2*ceiling(log M-1 b student /M) +1) = 300 Cost(sorting takes) = b takes * (2*ceiling(log M-1 b takes /M) +1) = 2000 Cost = ,000 = 2,800 b) Hash join: build relation: student number of partitions = 100/11 = 9.1 < 11, so it is not necessary to perform partitioning. Cost = 3*( b student + b takes ) = 1,500 4

5 2.2. (1 pt). Suppose that, before applying the join operation of Question 2.1, a selection is applied to the takes relation, filtering out students with grade less than or equal to 12. Assuming you have no statistical information about the relations, other than the one presented in Question 2.1, estimate the number of tuples resulting from the join operation. Justify. σ grade <= 12 (takes) X student Since we do not have any statistical information about the selection, the estimated number of tuples produced is equal to the nb of tuples of takes /2 = 5,000. Let us call takes the result of the selection. Takes is one of the inputs of the join operation. The attribute in common between takes and student is ID which a foreign key in takes referencing student. So, the estimated number of tuples produced by the join is equal to the number of tuples of takes which is 5, (0,5 pt) What would be the answer to Question 2.2 if the selection condition was grade = 18 and if we know that the number of distinct values that the grade attribute can take in relation takes is 20. In this case, the number of tuples produced by the selection is equal to nb tuples of takes/v(grade, takes) = 10,000/20 = 500, where V(grade, takes) is the number of distinct values grade can take in relation takes. For the same reason explained in 2.2., the estimated number of tuples produced by the join is

6 3. (4 pts) Concurrency Control 3.1. (2,5 pts) Consider a relation with the schema shopping-cart(name, price), and consider the following two transactions: T1: begin transaction Q1: insert into shopping-cart values ( milk, 10) Q2: update shopping-cart set price = price + 5 Commit T2: begin transaction Q3: insert into shopping-cart values ( butter, 5) Q4: select sum(price) from shopping-cart Commit Suppose the table shopping-cart is initially empty. a) If both transactions execute successfully till the end with isolation level SERIALIZABLE, what are the possible values returned by Q4? b) If both transactions execute successfully till the end with isolation level READ UNCOMMITTED, what are the possible values returned by Q4? c) If both transactions execute with isolation level SERIALIZABLE, T2 commits, but T1 rolls back at some point before it commits, what are the possible values returned by query Q4? d) If both transactions execute with isolation level READ UNCOMMITTED, T2 commits, but T1 rolls back at some point before it commits, what are the possible values returned by query Q4? e) If both transactions execute successfully till the end, T1 uses isolation level REPEATABLE READ and T2 uses isolation level READ UNCOMMITTED, what are the possible values returned by query Q4? a) T1 then T2, Q4: 20 T2 then T1, Q4: 5 b) Q4: 5, 15, 20, 25 c) Q4: 5 d) Q4: 5, 15, 20, 25 e) Q4: 5, 15, 20. 6

7 3.2. (1 pt) Consider the following schedule for three concurrent transactions: T1 T2 T R(A) R(C) W(A) W(B) W(B) W(C) a) Indicate whether it is a serializable schedule and justify. b) Is it possible to add lock and unlock requests to the individual operations, such that the schedule satisfies the 2-Phase Locking Protocol? Justify. a) Precedence graph: T1 -> T3 -> T2 -> T1 is cyclic, so the schedule is not serializable. b) It is not possible that the schedule satisfies the 2PL protocol because T3 would have to unlock_s(a) before T2 obtains the lock_x(a), and then request a lock_x(c) (0,5 pt) Consider the schedule of Question 3.2 and indicate whether it is possible under the timestamp-based protocol. Justify. When T1 tries to write B, its timestamp TS(T1) < W_timestamp(B) = TS(T2) so T1 is rolled back. 7

8 4. (4 pts) Recovery Management Consider the execution shown in the following transaction log, and assume that the system crashed after the last instruction shown in the transaction log. Assume also that the Dirty Page Table (DPT) and the Active Transaction Table (TT) are both empty when the checkpoint is written to the log, at LSN 1. LSN LOG RECORD 1 Checkpoint 2 Update : T1 writes P3 3 Update : T2 writes P5 4 T2 abort 5 Update : T1 writes P2 6 Update : T3 writes P5 7 Update : T1 writes P4 8 T1 abort Explain how the system would recover from the crash, using the ARIES recovery algorithm. Be precise about what happens in each step of the recovery algorithm, answering the following questions: 4.1. (2,5 pts) Regarding the recovery with the ARIES algorithm, state explicitly: (i) What is done during the ANALYSIS phase of the algorithm, and (ii) What is done during the REDO phase of the algorithm. Explain exactly how each of these steps is executed over the transaction log shown above. The analysis stage should start by determining that the last checkpoint was at LSN 1. In the following explanation, the active transaction table records are denoted as (transid, lastlsn, status), and the DPT records are denoted as (pageid, reclsn) sets. The analysis phase runs until the last LSN shown in the log record, and does the following: LSN 2 : Adds (T1, 2, Active) to TT and (P3,2) to DPT. LSN 3 : Adds (T2, 3, Active) to TT and (P5,3) to DPT. LSN 4 : Changes (T2, 3, Active) to (T2, 4, Aborted) on the TT. LSN 5 : Adds (P2, 5) to DPT and Changes (T1, 2, Active) to (T1, 5, Active) in the TT. LSN 6 : Adds (T3, 6, Active) to TT. Does not change the P5 entry in the DPT. LSN 7 : Adds (P4, 7) to the DPT and Changes (T1, 2, Active) to (T1, 7, Active) in the TT. LSN 8 : Changes (T1, 7, Active) to (T1, 8, Aborted) on the TT. 8

9 After the analysis, the Active Transaction Table has three entries: (T1, 8, Aborted), (T2, 4, Aborted) and (T3, 6, Active). After the analysis, the Dirty Page Table has four entries: (P2,5), (P3,2), (P5,3) and (P4, 7). After the analysis stage, the REDO stage of the ARIES algorithm performs the following actions, starting from LSN 2 (i.e., the least reclsn in the DPT) LSN 2 : P3 is retrieved and its pagelsn is checked. If the page had been written to disk before the crash (i.e. if pagelsn >= 2), nothing is redone, otherwise the changes are redone. LSN 3 : P5 is retrieved and its pagelsn is checked. If the page had been written to disk before the crash (i.e. if pagelsn >= 3), nothing is redone, otherwise the changes are redone. LSN 4 : No action LSN 5 : P2 is retrieved and its pagelsn is checked. If the page had been written to disk before the crash (i.e. if pagelsn >= 5), nothing is redone, otherwise the changes are redone. LSN 6 : P5 is retrieved and its pagelsn is checked. If the page had been written to disk before the crash (i.e. if pagelsn >= 6), nothing is redone, otherwise the changes are redone. LSN 7 : P4 is retrieved and its pagelsn is checked. If the page had been written to disk before the crash (i.e. if pagelsn >= 7), nothing is redone, otherwise the changes are redone. LSN 8 : No action (1 pt) After answering the first question, explain what is done during the UNDO phase of the ARIES recovery algorithm, and show the resulting log when the recovery procedure is complete, including all prevlsn and undonextlsn values in the records that have, eventually, been added to the log. The UNDO stage starts at LSN 8 (i.e., the highest lastlsn in the active transaction table). Initially, the ToUndo list consists of LSNs 8, 6 and 4, for transactions T1, T3 and T2, respectively. LSN 8 : Remove 8 from the ToUndo. Adds LSN 7 to the ToUndo. ToUndo = (7, 6, 4). LSN 7 : Remove 7 from the ToUndo. Undoes the change on P4 and adds a CLR indicating this Undo (LSN 9, undonextlsn = 5). ToUndo = (6, 5, 4). LSN 6 : Undo the change on P5 and adds a CLR indicating this Undo (LSN 10, undonextlsn = null). ToUndo = (5, 4, 2). LSN 5 : Remove 5 from the ToUndo. Undoes the change on P2 and adds a CLR indicating this Undo (LSN 11, undonextlsn = 2). ToUndo = (4, 2). LSN 4 : Remove 4 from the ToUndo. Undoes the change on P5 and adds a CLR indicating 9

10 this Undo (LSN 12, undonextlsn = null). ToUndo = (2). LSN 2 : Remove 2 from the ToUndo. Undo the change on P3 and adds a CLR indicating this Undo (LSN 13, undonextlsn= null). In the end, the log would contain the following records: LSN LOG RECORD 1 Checkpoint 2 Update: T1 writes P3 3 Update: T2 writes P5 4 T2 commit 5 Update: T1 writes P2 6 Update: T3 writes P5 7 Update: T1 writes P4 8 T1 abort 9 CLR : Undo T1 (page=p4, undonextlsn = 5) 10 CLR : Undo T3 (page=p5, undonextlsn = null) 11 CLR : Undo T1 (page=p2, undonextlsn = 2) 12 CLR : Undo T2 (page=p5, undonextlsn = null) 13 CLR : Undo T1 (page=p3, undonextlsn = null) 4.3. (0,5 pt) When executing the operations that are registered in the log, and latter on when performing the recovery with the ARIES algorithm, imagine that the buffer pool was always large enough, so that uncommitted data would never be forced to disk. In this scenario, would the UNDO stage still be necessary? How about the REDO stage? Justify your answers. The UNDO stage would not be required, because uncommitted data would never be written to disk (notice, however, that we would have to ensure that, when performing the REDO stage of a recovery procedure, uncommitted data would again never be forced to disk). The REDO stage would still be required, because some committed data might have not been written to disk yet. 10

11 5. (4 pts) Miscelaneous 5.2. (1 pt) Consider the following simple query, whose performance within a given DBMS is not satisfactory. SELECT NAME, SALARY FROM EMPLOYEE WHERE SALARY / 12 = 4000; Assume that there are few other operations being executed concurrently with the query, and assume that there is a non-clustering B+Tree index on the SALARY attribute. Indicate two possible reasons for the poor performance of the query, and indicate how you would address these two particular problems. Justify your answer. Three possible reasons for the poor performance would be: (i) The non-clustering B+Tree index on SALARY is not being used to answer the query, because of the arithmetic operation corresponding to "SALARY / 12". On some systems, the query optimizer may not be able to replace the condition "SALARY / 12 = 4000" by the condition "SALARY = 4000 * 12", this way failing to use the available index. One can address this issue by rewriting the query, replacing the condition "SALARY / 12 = 4000" by the condition "SALARY = 4000 * 12". (ii) The selection condition "SALARY / 12 = 4000" may still return many tuples from the original table, and this way the non-clustering B+Tree index is not particularly useful (i.e., we would still need to follow many pointers, in order to retrieve the NAME attribute from the tuples of the table). This issue could be addressed by using a clustered index instead, or by suggesting to query optimizer the usage of an execution plan involving instead a full-table scan (depending on the number of attributed returned by the selection predicate, this may be preferable to using the non-clustered index). (iii) The non-clustering B+Tree index may still not provide the required level of performance and for an equality query, it may be more interesting to use a Hash-based index, instead of a B+Tree. This strategy would be particularly useful if the condition "SALARY / 12 = 4000" is highly selecting (see the explanation associated to the second possible reason). 11

12 5.3. (1 pt) Consider a relational database, where a table storing EMPLOYEE data is stored on a DISK1, a table storing CUSTOMER data is stored on a DISK2, and the recovery log is on DISK2 as well. The EMPLOYEE table is smaller than the CUSTOMER table, but it is accessed more often. The applications using both these tables are essentially read-only, and they involve many scans. Through the usage of a profiling tool, you noticed that the operations also involve many disk seeks (i.e., many random accesses), besides scans. In terms of the hardware specifications, you known that DISK2 should be particularly efficient for random accesses, and it also supports more than twice the I/O rate of DISK1. Consider also that the owner of the database is not willing to buy a new disk. What would you do to tune the performance of the database, in terms of how the data in stored on the different physical storage units (i.e., on DISK1 and DISK2). Justify. Several ideas could apply. Probably the best thing to do is to change the way through which the data is stored, putting the recovery log on DISK1, and the data from both tables on DISK2. The log should work better in this case (i.e., without being stored on the same disk where the data is stored as well), given that it is essentially a sequential storage medium for keeping recovery information. The data files would also be stored on the disk that is faster. Given that the applications essentially perform scans on the tables, and given that there is still a significant amount of random accesses to data on the disks, you can also consider reorganizing the data files on the disks, so as to occupy large sequential portions of the disk. You can also raise the prefetching levels and increase the page utilization. All these aspects should reduce the seek time, and the number of random disk accesses. Given that the EMPLOYEE table is accessed more often, a partially correct answer to the exercise could involve placing this table in DISK2 (i.e., the fastest disk), instead of leaving it on DISK 1, instead placing the CUSTOMER table on DISK1. Notice, however, that it is a better idea to keep the log separately from the data. 12

13 5.3. (1 pt) Recall the invited talk where a Engineer from NovaBase discussed practical DBMS performance tuning issues, and consider the main differences between mission critical databases of type "Rally" and of type "Formula 1". For each of the following tuning options, indicate and justify on what type of system (i.e., Rally or Formula 1) would it make more sense to consider the option: (i) Tuning the locking granularity and adjusting the isolation level. (ii) Creating more indexes over the tables, in order to improve query efficiency. Option 1 would make more sense for Rally systems, given that for these systems we should focus on improving concurrent access to the data (i.e., they combine concurrent reads with concurrent updates). Option 2 would make more sense for F1 systems, given that for these systems we should focus on improving query performance. Rally systems, on the other hand, involve both a large number of insertions/updates and often complex queries, and adding more indexes would likely decrease performance for the updates (1 pt) In the context of RAID storage systems, explain the concept of striping, and explain how does it affect I/O performance? In case of DBMS where table data is stored on RAID systems, on what type of query will striping produce the greatest performance improvement? Justify your answers. Striping concerns with segmenting logically sequential data (e.g., a database file), so that consecutive segments are stored on different physical storage devices. In some RAID configurations, striping is used as a way to boost read performance (i.e., multiple, independent requests to data pages can be serviced in parallel by separate disks, decreasing the queueing time seen by I/O requests). Striping will produce the greatest performance improvement for queries involving scans to very large tables, given that through striping one can perform the reads in parallel over the different storage units. 13

INSTITUTO SUPERIOR TÉCNICO Administração e optimização de Bases de Dados

INSTITUTO SUPERIOR TÉCNICO Administração e optimização de Bases de Dados -------------------------------------------------------------------------------------------------------------- INSTITUTO SUPERIOR TÉCNICO Administração e optimização de Bases de Dados Exam 1 - solution

More information

INSTITUTO SUPERIOR TÉCNICO Administração e optimização de Bases de Dados

INSTITUTO SUPERIOR TÉCNICO Administração e optimização de Bases de Dados -------------------------------------------------------------------------------------------------------------- INSTITUTO SUPERIOR TÉCNICO Administração e optimização de Bases de Dados Exam 1 16 June 2014

More information

Last time. Started on ARIES A recovery algorithm that guarantees Atomicity and Durability after a crash

Last time. Started on ARIES A recovery algorithm that guarantees Atomicity and Durability after a crash ARIES wrap-up 1 Last time Started on ARIES A recovery algorithm that guarantees Atomicity and Durability after a crash 2 Buffer Management in a DBMS Page Requests from Higher Levels BUFFER POOL disk page

More information

Slides Courtesy of R. Ramakrishnan and J. Gehrke 2. v Concurrent execution of queries for improved performance.

Slides Courtesy of R. Ramakrishnan and J. Gehrke 2. v Concurrent execution of queries for improved performance. DBMS Architecture Query Parser Transaction Management Query Rewriter Query Optimizer Query Executor Yanlei Diao UMass Amherst Lock Manager Concurrency Control Access Methods Buffer Manager Log Manager

More information

Crash Recovery. The ACID properties. Motivation

Crash Recovery. The ACID properties. Motivation Crash Recovery The ACID properties A tomicity: All actions in the Xact happen, or none happen. C onsistency: If each Xact is consistent, and the DB starts consistent, it ends up consistent. I solation:

More information

COURSE 4. Database Recovery 2

COURSE 4. Database Recovery 2 COURSE 4 Database Recovery 2 Data Update Immediate Update: As soon as a data item is modified in cache, the disk copy is updated. Deferred Update: All modified data items in the cache is written either

More information

Crash Recovery. Chapter 18. Sina Meraji

Crash Recovery. Chapter 18. Sina Meraji Crash Recovery Chapter 18 Sina Meraji Review: The ACID properties A tomicity: All actions in the Xact happen, or none happen. C onsistency: If each Xact is consistent, and the DB starts consistent, it

More information

Name Class Account UNIVERISTY OF CALIFORNIA, BERKELEY College of Engineering Department of EECS, Computer Science Division J.

Name Class Account UNIVERISTY OF CALIFORNIA, BERKELEY College of Engineering Department of EECS, Computer Science Division J. Do not write in this space CS186 Spring 2001 Name Class Account UNIVERISTY OF CALIFORNIA, BERKELEY College of Engineering Department of EECS, Computer Science Division J. Hellerstein Final Exam Final Exam:

More information

Atomicity: All actions in the Xact happen, or none happen. Consistency: If each Xact is consistent, and the DB starts consistent, it ends up

Atomicity: All actions in the Xact happen, or none happen. Consistency: If each Xact is consistent, and the DB starts consistent, it ends up CRASH RECOVERY 1 REVIEW: THE ACID PROPERTIES Atomicity: All actions in the Xact happen, or none happen. Consistency: If each Xact is consistent, and the DB starts consistent, it ends up consistent. Isolation:

More information

Database Administration and Tuning

Database Administration and Tuning Department of Computer Science and Engineering 2013/2014 Database Administration and Tuning Mini- Project 2 - solution 2nd semester Question 1 Equivalence Between Relational Algebra Expressions Consider

More information

Introduction. Storage Failure Recovery Logging Undo Logging Redo Logging ARIES

Introduction. Storage Failure Recovery Logging Undo Logging Redo Logging ARIES Introduction Storage Failure Recovery Logging Undo Logging Redo Logging ARIES Volatile storage Main memory Cache memory Nonvolatile storage Stable storage Online (e.g. hard disk, solid state disk) Transaction

More information

UNIT 9 Crash Recovery. Based on: Text: Chapter 18 Skip: Section 18.7 and second half of 18.8

UNIT 9 Crash Recovery. Based on: Text: Chapter 18 Skip: Section 18.7 and second half of 18.8 UNIT 9 Crash Recovery Based on: Text: Chapter 18 Skip: Section 18.7 and second half of 18.8 Learning Goals Describe the steal and force buffer policies and explain how they affect a transaction s properties

More information

A tomicity: All actions in the Xact happen, or none happen. D urability: If a Xact commits, its effects persist.

A tomicity: All actions in the Xact happen, or none happen. D urability: If a Xact commits, its effects persist. Review: The ACID properties A tomicity: All actions in the Xact happen, or none happen. Logging and Recovery C onsistency: If each Xact is consistent, and the DB starts consistent, it ends up consistent.

More information

CSE 444, Winter 2011, Midterm Examination 9 February 2011

CSE 444, Winter 2011, Midterm Examination 9 February 2011 Name: CSE 444, Winter 2011, Midterm Examination 9 February 2011 Rules: Open books and open notes. No laptops or other mobile devices. Please write clearly. Relax! You are here to learn. An extra page is

More information

Review: The ACID properties. Crash Recovery. Assumptions. Motivation. More on Steal and Force. Handling the Buffer Pool

Review: The ACID properties. Crash Recovery. Assumptions. Motivation. More on Steal and Force. Handling the Buffer Pool Review: The ACID properties A tomicity: All actions in the Xact happen, or none happen. Crash Recovery Chapter 18 If you are going to be in the logging business, one of the things that you have to do is

More information

ACID Properties. Transaction Management: Crash Recovery (Chap. 18), part 1. Motivation. Recovery Manager. Handling the Buffer Pool.

ACID Properties. Transaction Management: Crash Recovery (Chap. 18), part 1. Motivation. Recovery Manager. Handling the Buffer Pool. ACID Properties Transaction Management: Crash Recovery (Chap. 18), part 1 Slides based on Database Management Systems 3 rd ed, Ramakrishnan and Gehrke CS634 Class 20, Apr 13, 2016 Transaction Management

More information

Database Recovery Techniques. DBMS, 2007, CEng553 1

Database Recovery Techniques. DBMS, 2007, CEng553 1 Database Recovery Techniques DBMS, 2007, CEng553 1 Review: The ACID properties v A tomicity: All actions in the Xact happen, or none happen. v C onsistency: If each Xact is consistent, and the DB starts

More information

CAS CS 460/660 Introduction to Database Systems. Recovery 1.1

CAS CS 460/660 Introduction to Database Systems. Recovery 1.1 CAS CS 460/660 Introduction to Database Systems Recovery 1.1 Review: The ACID properties Atomicity: All actions in the Xact happen, or none happen. Consistency: If each Xact is consistent, and the DB starts

More information

Crash Recovery Review: The ACID properties

Crash Recovery Review: The ACID properties Crash Recovery Review: The ACID properties A tomicity: All actions in the Xacthappen, or none happen. If you are going to be in the logging business, one of the things that you have to do is to learn about

More information

Introduction to Database Systems CSE 444

Introduction to Database Systems CSE 444 Introduction to Database Systems CSE 444 Lectures 11-12 Transactions: Recovery (Aries) 1 Readings Material in today s lecture NOT in the book Instead, read Sections 1, 2.2, and 3.2 of: Michael J. Franklin.

More information

Transaction Management: Crash Recovery (Chap. 18), part 1

Transaction Management: Crash Recovery (Chap. 18), part 1 Transaction Management: Crash Recovery (Chap. 18), part 1 CS634 Class 17 Slides based on Database Management Systems 3 rd ed, Ramakrishnan and Gehrke ACID Properties Transaction Management must fulfill

More information

some sequential execution crash! Recovery Manager replacement MAIN MEMORY policy DISK

some sequential execution crash! Recovery Manager replacement MAIN MEMORY policy DISK ACID Properties Transaction Management: Crash Recovery (Chap. 18), part 1 Slides based on Database Management Systems 3 rd ed, Ramakrishnan and Gehrke CS634 Class 17 Transaction Management must fulfill

More information

AC61/AT61 DATABASE MANAGEMENT SYSTEMS JUNE 2013

AC61/AT61 DATABASE MANAGEMENT SYSTEMS JUNE 2013 Q2 (a) With the help of examples, explain the following terms briefly: entity set, one-to-many relationship, participation constraint, weak entity set. Entity set: A collection of similar entities such

More information

ARIES (& Logging) April 2-4, 2018

ARIES (& Logging) April 2-4, 2018 ARIES (& Logging) April 2-4, 2018 1 What does it mean for a transaction to be committed? 2 If commit returns successfully, the transaction is recorded completely (atomicity) left the database in a stable

More information

Crash Recovery CMPSCI 645. Gerome Miklau. Slide content adapted from Ramakrishnan & Gehrke

Crash Recovery CMPSCI 645. Gerome Miklau. Slide content adapted from Ramakrishnan & Gehrke Crash Recovery CMPSCI 645 Gerome Miklau Slide content adapted from Ramakrishnan & Gehrke 1 Review: the ACID Properties Database systems ensure the ACID properties: Atomicity: all operations of transaction

More information

CSE 544 Principles of Database Management Systems. Fall 2016 Lectures Transactions: recovery

CSE 544 Principles of Database Management Systems. Fall 2016 Lectures Transactions: recovery CSE 544 Principles of Database Management Systems Fall 2016 Lectures 17-18 - Transactions: recovery Announcements Project presentations next Tuesday CSE 544 - Fall 2016 2 References Concurrency control

More information

6.830 Problem Set 3 Assigned: 10/28 Due: 11/30

6.830 Problem Set 3 Assigned: 10/28 Due: 11/30 6.830 Problem Set 3 1 Assigned: 10/28 Due: 11/30 6.830 Problem Set 3 The purpose of this problem set is to give you some practice with concepts related to query optimization and concurrency control and

More information

Chapter 17: Recovery System

Chapter 17: Recovery System Chapter 17: Recovery System! Failure Classification! Storage Structure! Recovery and Atomicity! Log-Based Recovery! Shadow Paging! Recovery With Concurrent Transactions! Buffer Management! Failure with

More information

Failure Classification. Chapter 17: Recovery System. Recovery Algorithms. Storage Structure

Failure Classification. Chapter 17: Recovery System. Recovery Algorithms. Storage Structure Chapter 17: Recovery System Failure Classification! Failure Classification! Storage Structure! Recovery and Atomicity! Log-Based Recovery! Shadow Paging! Recovery With Concurrent Transactions! Buffer Management!

More information

Outline. Purpose of this paper. Purpose of this paper. Transaction Review. Outline. Aries: A Transaction Recovery Method

Outline. Purpose of this paper. Purpose of this paper. Transaction Review. Outline. Aries: A Transaction Recovery Method Outline Aries: A Transaction Recovery Method Presented by Haoran Song Discussion by Hoyt Purpose of this paper Computer system is crashed as easily as other devices. Disk burned Software Errors Fires or

More information

Database Recovery. Lecture #21. Andy Pavlo Computer Science Carnegie Mellon Univ. Database Systems / Fall 2018

Database Recovery. Lecture #21. Andy Pavlo Computer Science Carnegie Mellon Univ. Database Systems / Fall 2018 Database Recovery Lecture #21 Database Systems 15-445/15-645 Fall 2018 AP Andy Pavlo Computer Science Carnegie Mellon Univ. 2 CRASH RECOVERY Recovery algorithms are techniques to ensure database consistency,

More information

COMPSCI/SOFTENG 351 & 751. Strategic Exercise 5 - Solutions. Transaction Processing, Crash Recovery and ER Diagrams. (May )

COMPSCI/SOFTENG 351 & 751. Strategic Exercise 5 - Solutions. Transaction Processing, Crash Recovery and ER Diagrams. (May ) COMPSCI/SOFTENG 351 & 751 Strategic Exercise 5 - Solutions Transaction Processing, Crash Recovery and ER Diagrams (May 23 2016) Exercise 1 : Multiple-Granularity Locking: Use the Database organization

More information

Aries (Lecture 6, cs262a)

Aries (Lecture 6, cs262a) Aries (Lecture 6, cs262a) Ali Ghodsi and Ion Stoica, UC Berkeley February 5, 2018 (based on slide from Joe Hellerstein and Alan Fekete) Today s Paper ARIES: A Transaction Recovery Method Supporting Fine-Granularity

More information

Transaction Management. Readings for Lectures The Usual Reminders. CSE 444: Database Internals. Recovery. System Crash 2/12/17

Transaction Management. Readings for Lectures The Usual Reminders. CSE 444: Database Internals. Recovery. System Crash 2/12/17 The Usual Reminders CSE 444: Database Internals HW3 is due on Wednesday Lab3 is due on Friday Lectures 17-19 Transactions: Recovery 1 2 Readings for Lectures 17-19 Transaction Management Main textbook

More information

6.830 Lecture Recovery 10/30/2017

6.830 Lecture Recovery 10/30/2017 6.830 Lecture 14 -- Recovery 10/30/2017 Have been talking about transactions Transactions -- what do they do? Awesomely powerful abstraction -- programmer can run arbitrary mixture of commands that read

More information

Carnegie Mellon Univ. Dept. of Computer Science /615 - DB Applications. Administrivia. Last Class. Faloutsos/Pavlo CMU /615

Carnegie Mellon Univ. Dept. of Computer Science /615 - DB Applications. Administrivia. Last Class. Faloutsos/Pavlo CMU /615 Carnegie Mellon Univ. Dept. of Computer Science 15-415/615 - DB Applications C. Faloutsos A. Pavlo Lecture#23: Crash Recovery Part 2 (R&G ch. 18) Administrivia HW8 is due Thurs April 24 th Faloutsos/Pavlo

More information

Problems Caused by Failures

Problems Caused by Failures Problems Caused by Failures Update all account balances at a bank branch. Accounts(Anum, CId, BranchId, Balance) Update Accounts Set Balance = Balance * 1.05 Where BranchId = 12345 Partial Updates - Lack

More information

CSE 190D Spring 2017 Final Exam

CSE 190D Spring 2017 Final Exam CSE 190D Spring 2017 Final Exam Full Name : Student ID : Major : INSTRUCTIONS 1. You have up to 2 hours and 59 minutes to complete this exam. 2. You can have up to one letter/a4-sized sheet of notes, formulae,

More information

CompSci 516 Database Systems

CompSci 516 Database Systems CompSci 516 Database Systems Lecture 17 Transactions Recovery (ARIES) Instructor: Sudeepa Roy Duke CS, Fall 2017 CompSci 516: Database Systems 1 Announcements Midterm report due on Wednesday, 11/01 HW3

More information

Database Applications (15-415)

Database Applications (15-415) Database Applications (15-415) DBMS Internals- Part XIII Lecture 21, April 14, 2014 Mohammad Hammoud Today Last Session: Transaction Management (Cont d) Today s Session: Transaction Management (finish)

More information

The transaction. Defining properties of transactions. Failures in complex systems propagate. Concurrency Control, Locking, and Recovery

The transaction. Defining properties of transactions. Failures in complex systems propagate. Concurrency Control, Locking, and Recovery Failures in complex systems propagate Concurrency Control, Locking, and Recovery COS 418: Distributed Systems Lecture 17 Say one bit in a DRAM fails: flips a bit in a kernel memory write causes a kernel

More information

6.830 Lecture Recovery 10/30/2017

6.830 Lecture Recovery 10/30/2017 6.830 Lecture 14 -- Recovery 10/30/2017 Have been talking about transactions Transactions -- what do they do? Awesomely powerful abstraction -- programmer can run arbitrary mixture of commands that read

More information

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Database Systems: Fall 2008 Quiz I

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Database Systems: Fall 2008 Quiz I Department of Electrical Engineering and Computer Science MASSACHUSETTS INSTITUTE OF TECHNOLOGY 6.830 Database Systems: Fall 2008 Quiz I There are 17 questions and 10 pages in this quiz booklet. To receive

More information

CSE 190D Spring 2017 Final Exam Answers

CSE 190D Spring 2017 Final Exam Answers CSE 190D Spring 2017 Final Exam Answers Q 1. [20pts] For the following questions, clearly circle True or False. 1. The hash join algorithm always has fewer page I/Os compared to the block nested loop join

More information

Database Management Systems Paper Solution

Database Management Systems Paper Solution Database Management Systems Paper Solution Following questions have been asked in GATE CS exam. 1. Given the relations employee (name, salary, deptno) and department (deptno, deptname, address) Which of

More information

Lecture 16: Transactions (Recovery) Wednesday, May 16, 2012

Lecture 16: Transactions (Recovery) Wednesday, May 16, 2012 Lecture 16: Transactions (Recovery) Wednesday, May 16, 2012 CSE544 - Spring, 2012 1 Announcements Makeup lectures: Friday, May 18, 10:30-11:50, CSE 405 Friday, May 25, 10:30-11:50, CSE 405 No lectures:

More information

Final Review. May 9, 2017

Final Review. May 9, 2017 Final Review May 9, 2017 1 SQL 2 A Basic SQL Query (optional) keyword indicating that the answer should not contain duplicates SELECT [DISTINCT] target-list A list of attributes of relations in relation-list

More information

CS 564 Final Exam Fall 2015 Answers

CS 564 Final Exam Fall 2015 Answers CS 564 Final Exam Fall 015 Answers A: STORAGE AND INDEXING [0pts] I. [10pts] For the following questions, clearly circle True or False. 1. The cost of a file scan is essentially the same for a heap file

More information

Review: The ACID properties. Crash Recovery. Assumptions. Motivation. Preferred Policy: Steal/No-Force. Buffer Mgmt Plays a Key Role

Review: The ACID properties. Crash Recovery. Assumptions. Motivation. Preferred Policy: Steal/No-Force. Buffer Mgmt Plays a Key Role Crash Recovery If you are going to be in the logging business, one of the things that you have to do is to learn about heavy equipment. Robert VanNatta, Logging History of Columbia County CS 186 Fall 2002,

More information

Final Review. May 9, 2018 May 11, 2018

Final Review. May 9, 2018 May 11, 2018 Final Review May 9, 2018 May 11, 2018 1 SQL 2 A Basic SQL Query (optional) keyword indicating that the answer should not contain duplicates SELECT [DISTINCT] target-list A list of attributes of relations

More information

6.830 Lecture 15 11/1/2017

6.830 Lecture 15 11/1/2017 6.830 Lecture 15 11/1/2017 Recovery continued Last time -- saw the basics of logging and recovery -- today we are going to discuss the ARIES protocol. First discuss two logging concepts: FORCE/STEAL Buffer

More information

CSE 444 Midterm Exam

CSE 444 Midterm Exam CSE 444 Midterm Exam November 13, 2009 Name Question 1 / 24 Question 2 / 22 Question 3 / 22 Question 4 / 12 Question 5 / 20 Total / 100 CSE 444 Midterm, Nov. 13, 2009 Page 1 of 8 Question 1. SQL (24 points,

More information

Transactions and Recovery Study Question Solutions

Transactions and Recovery Study Question Solutions 1 1 Questions Transactions and Recovery Study Question Solutions 1. Suppose your database system never STOLE pages e.g., that dirty pages were never written to disk. How would that affect the design of

More information

Database Tuning and Physical Design: Execution of Transactions

Database Tuning and Physical Design: Execution of Transactions Database Tuning and Physical Design: Execution of Transactions Spring 2018 School of Computer Science University of Waterloo Databases CS348 (University of Waterloo) Transaction Execution 1 / 20 Basics

More information

CMPS 181, Database Systems II, Final Exam, Spring 2016 Instructor: Shel Finkelstein. Student ID: UCSC

CMPS 181, Database Systems II, Final Exam, Spring 2016 Instructor: Shel Finkelstein. Student ID: UCSC CMPS 181, Database Systems II, Final Exam, Spring 2016 Instructor: Shel Finkelstein Student Name: Student ID: UCSC Email: Final Points: Part Max Points Points I 15 II 29 III 31 IV 19 V 16 Total 110 Closed

More information

Database Management Systems (COP 5725) Homework 3

Database Management Systems (COP 5725) Homework 3 Database Management Systems (COP 5725) Homework 3 Instructor: Dr. Daisy Zhe Wang TAs: Yang Chen, Kun Li, Yang Peng yang, kli, ypeng@cise.uf l.edu November 26, 2013 Name: UFID: Email Address: Pledge(Must

More information

Homework 6 (by Sivaprasad Sudhir) Solutions Due: Monday Nov 27, 11:59pm

Homework 6 (by Sivaprasad Sudhir) Solutions Due: Monday Nov 27, 11:59pm CARNEGIE MELLON UNIVERSITY DEPARTMENT OF COMPUTER SCIENCE 15-445/645 DATABASE SYSTEMS (FALL 2017) PROF. ANDY PAVLO Homework 6 (by Sivaprasad Sudhir) Solutions Due: Monday Nov 27, 2017 @ 11:59pm IMPORTANT:

More information

Database Systems ( 資料庫系統 )

Database Systems ( 資料庫系統 ) Database Systems ( 資料庫系統 ) January 7/9 07 Happy New Year 1 Announcement Final exam covers chapters [8 13,14.4,16,17.1~17.4] The exam will be on 1/14/08 7:~: pm Place: CSIE 2/4 Closed book 2 1 Crash Recovery

More information

CSEP 544: Lecture 07. Transactions Part 2: Concurrency Control. CSEP544 - Fall

CSEP 544: Lecture 07. Transactions Part 2: Concurrency Control. CSEP544 - Fall CSEP 544: Lecture 07 Transactions Part 2: Concurrency Control CSEP544 - Fall 2015 1 Announcements Homework 4 due next Tuesday Simple for you, but reflect on TXNs Rest of the quarter (revised!): Today:

More information

CS122 Lecture 18 Winter Term, All hail the WAL-Rule!

CS122 Lecture 18 Winter Term, All hail the WAL-Rule! CS122 Lecture 18 Winter Term, 2014-2015 All hail the WAL-Rule! 2 Write- Ahead Logging Last time, introduced write- ahead logging (WAL) as a mechanism to provide atomic, durable transactions Log records:

More information

Final Exam CSE232, Spring 97

Final Exam CSE232, Spring 97 Final Exam CSE232, Spring 97 Name: Time: 2hrs 40min. Total points are 148. A. Serializability I (8) Consider the following schedule S, consisting of transactions T 1, T 2 and T 3 T 1 T 2 T 3 w(a) r(a)

More information

Implementing a Demonstration of Instant Recovery of Database Systems

Implementing a Demonstration of Instant Recovery of Database Systems Implementing a Demonstration of Instant Recovery of Database Systems Gilson Souza dos Santos Database and Information Systems University of Kaiserslautern gilson.s.s@gmail.com Abstract. We present a Web

More information

ARIES. Handout #24. Overview

ARIES. Handout #24. Overview Handout #24 ARIES Overview Failure Model Goals CLRs Data Structures Normal Processing Checkpoints and Restart Media Recovery Nested Top Actions Design Decisions CS346 - Transaction Processing Markus Breunig

More information

User Perspective. Module III: System Perspective. Module III: Topics Covered. Module III Overview of Storage Structures, QP, and TM

User Perspective. Module III: System Perspective. Module III: Topics Covered. Module III Overview of Storage Structures, QP, and TM Module III Overview of Storage Structures, QP, and TM Sharma Chakravarthy UT Arlington sharma@cse.uta.edu http://www2.uta.edu/sharma base Management Systems: Sharma Chakravarthy Module I Requirements analysis

More information

CPSC 310: Database Systems / CSPC 603: Database Systems and Applications Final Exam Fall 2005

CPSC 310: Database Systems / CSPC 603: Database Systems and Applications Final Exam Fall 2005 CPSC 310: Database Systems / CSPC 603: Database Systems and Applications Final Exam Fall 2005 Name: Instructions: 1. This is a closed book exam. Do not use any notes or books, other than your three 8.5-by-11

More information

IMPORTANT: Circle the last two letters of your class account:

IMPORTANT: Circle the last two letters of your class account: Spring 2011 University of California, Berkeley College of Engineering Computer Science Division EECS MIDTERM I CS 186 Introduction to Database Systems Prof. Michael J. Franklin NAME: STUDENT ID: IMPORTANT:

More information

CS122 Lecture 19 Winter Term,

CS122 Lecture 19 Winter Term, CS122 Lecture 19 Winter Term, 2014-2015 2 Dirty Page Table: Last Time: ARIES Every log entry has a Log Sequence Number (LSN) associated with it Every data page records the LSN of the most recent operation

More information

CS 245: Database System Principles

CS 245: Database System Principles CS 245: Database System Principles Review Notes Peter Bailis CS 245 Notes 4 1 Isn t Implementing a Database System Simple? Relations Statements Results CS 245 Notes 1 2 Course Overview File & System Structure

More information

Overview of Transaction Management

Overview of Transaction Management Overview of Transaction Management Chapter 16 Comp 521 Files and Databases Fall 2010 1 Database Transactions A transaction is the DBMS s abstract view of a user program: a sequence of database commands;

More information

Carnegie Mellon Univ. Dept. of Computer Science /615 - DB Applications. Last Class. Today s Class. Faloutsos/Pavlo CMU /615

Carnegie Mellon Univ. Dept. of Computer Science /615 - DB Applications. Last Class. Today s Class. Faloutsos/Pavlo CMU /615 Carnegie Mellon Univ. Dept. of Computer Science 15-415/615 - DB Applications C. Faloutsos A. Pavlo Lecture#23: Crash Recovery Part 1 (R&G ch. 18) Last Class Basic Timestamp Ordering Optimistic Concurrency

More information

Question 1 (a) 10 marks

Question 1 (a) 10 marks Question 1 (a) Consider the tree in the next slide. Find any/ all violations of a B+tree structure. Identify each bad node and give a brief explanation of each error. Assume the order of the tree is 4

More information

Introduction to Data Management. Lecture #26 (Transactions, cont.)

Introduction to Data Management. Lecture #26 (Transactions, cont.) Introduction to Data Management Lecture #26 (Transactions, cont.) Instructor: Mike Carey mjcarey@ics.uci.edu Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 1 Announcements v HW and exam

More information

Assignment 6 Solutions

Assignment 6 Solutions Database Systems Instructors: Hao-Hua Chu Winston Hsu Fall Semester, 2007 Assignment 6 Solutions Questions I. Consider a disk with an average seek time of 10ms, average rotational delay of 5ms, and a transfer

More information

Relational DBMS Internals Solutions Manual. A. Albano, D. Colazzo, G. Ghelli and R. Orsini

Relational DBMS Internals Solutions Manual. A. Albano, D. Colazzo, G. Ghelli and R. Orsini Relational DBMS Internals Solutions Manual A. Albano, D. Colazzo, G. Ghelli and R. Orsini February 10, 2015 CONTENTS 2 Permanent Memory and Buffer Management 1 3 Heap and Sequential Organizations 5 4

More information

Database Systems CSci 4380 Final Exam May 19, 2016

Database Systems CSci 4380 Final Exam May 19, 2016 Write your answers in the boxes provided only. Do not write on the back or outside the box. Database Systems CSci 4380 Final Exam May 19, 2016 RCS ID: @rpi.edu Name: RIN # : Rules. The exam is 120 minutes

More information

XI. Transactions CS Computer App in Business: Databases. Lecture Topics

XI. Transactions CS Computer App in Business: Databases. Lecture Topics XI. Lecture Topics Properties of Failures and Concurrency in SQL Implementation of Degrees of Isolation CS338 1 Problems Caused by Failures Accounts(, CId, BranchId, Balance) update Accounts set Balance

More information

ROEVER ENGINEERING COLLEGE

ROEVER ENGINEERING COLLEGE ROEVER ENGINEERING COLLEGE ELAMBALUR, PERAMBALUR- 621 212 DEPARTMENT OF INFORMATION TECHNOLOGY DATABASE MANAGEMENT SYSTEMS UNIT-1 Questions And Answers----Two Marks 1. Define database management systems?

More information

UNIVERSITY OF CALIFORNIA Department of EECS, Computer Science Division. Final Exam: Introduction to Database Systems

UNIVERSITY OF CALIFORNIA Department of EECS, Computer Science Division. Final Exam: Introduction to Database Systems CS186 Spring 2010 UNIVERSITY OF CALIFORNIA Department of EECS, Computer Science Division Final Exam: Introduction to Database Systems Hellerstein Final Exam Solutions are in red. Correct answers intended

More information

CS 186 Databases. and SID:

CS 186 Databases. and SID: Prof. Brewer Fall 2015 CS 186 Databases Midterm 3 Print your name:, (last) (first) I am aware of the Berkeley Campus Code of Student Conduct and acknowledge that academic misconduct will be reported to

More information

CompSci 516: Database Systems

CompSci 516: Database Systems CompSci 516 Database Systems Lecture 16 Transactions Recovery Instructor: Sudeepa Roy Duke CS, Fall 2018 CompSci 516: Database Systems 1 Announcements Keep working on your project Midterm report due on

More information

Database Systems Management

Database Systems Management Database Systems Management Instructor - Russ Wakefield GTA Shivani Dave On Campus and Distance Learning What is CS430 / CS430dl? Instructor (Russ) and GTA (Shivani) Homework assignments 4-5 Lab assignments

More information

Databases - Transactions

Databases - Transactions Databases - Transactions Gordon Royle School of Mathematics & Statistics University of Western Australia Gordon Royle (UWA) Transactions 1 / 34 ACID ACID is the one acronym universally associated with

More information

Homework 2: Query Processing/Optimization, Transactions/Recovery (due February 16th, 2017, 9:30am, in class hard-copy please)

Homework 2: Query Processing/Optimization, Transactions/Recovery (due February 16th, 2017, 9:30am, in class hard-copy please) Virginia Tech. Computer Science CS 5614 (Big) Data Management Systems Spring 2017, Prakash Homework 2: Query Processing/Optimization, Transactions/Recovery (due February 16th, 2017, 9:30am, in class hard-copy

More information

Concurrency Control & Recovery

Concurrency Control & Recovery Transaction Management Overview CS 186, Fall 2002, Lecture 23 R & G Chapter 18 There are three side effects of acid. Enhanced long term memory, decreased short term memory, and I forget the third. - Timothy

More information

Database Management Systems Written Exam

Database Management Systems Written Exam Database Management Systems Written Exam 07.0.011 First name Student number Last name Signature Instructions for Students Write your name, student number, and signature on the exam sheet and on every solution

More information

Physical DB design and tuning: outline

Physical DB design and tuning: outline Physical DB design and tuning: outline Designing the Physical Database Schema Tables, indexes, logical schema Database Tuning Index Tuning Query Tuning Transaction Tuning Logical Schema Tuning DBMS Tuning

More information

Transaction Management Overview. Transactions. Concurrency in a DBMS. Chapter 16

Transaction Management Overview. Transactions. Concurrency in a DBMS. Chapter 16 Transaction Management Overview Chapter 16 Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 1 Transactions Concurrent execution of user programs is essential for good DBMS performance. Because

More information

Transaction Management Overview

Transaction Management Overview Transaction Management Overview Chapter 16 CSE 4411: Database Management Systems 1 Transactions Concurrent execution of user programs is essential for good DBMS performance. Because disk accesses are frequent,

More information

CHAPTER 3 RECOVERY & CONCURRENCY ADVANCED DATABASE SYSTEMS. Assist. Prof. Dr. Volkan TUNALI

CHAPTER 3 RECOVERY & CONCURRENCY ADVANCED DATABASE SYSTEMS. Assist. Prof. Dr. Volkan TUNALI CHAPTER 3 RECOVERY & CONCURRENCY ADVANCED DATABASE SYSTEMS Assist. Prof. Dr. Volkan TUNALI PART 1 2 RECOVERY Topics 3 Introduction Transactions Transaction Log System Recovery Media Recovery Introduction

More information

T ransaction Management 4/23/2018 1

T ransaction Management 4/23/2018 1 T ransaction Management 4/23/2018 1 Air-line Reservation 10 available seats vs 15 travel agents. How do you design a robust and fair reservation system? Do not enough resources Fair policy to every body

More information

Distributed Systems

Distributed Systems 15-440 Distributed Systems 11 - Fault Tolerance, Logging and Recovery Tuesday, Oct 2 nd, 2018 Logistics Updates P1 Part A checkpoint Part A due: Saturday 10/6 (6-week drop deadline 10/8) *Please WORK hard

More information

IMPORTANT: Circle the last two letters of your class account:

IMPORTANT: Circle the last two letters of your class account: Fall 2001 University of California, Berkeley College of Engineering Computer Science Division EECS Prof. Michael J. Franklin FINAL EXAM CS 186 Introduction to Database Systems NAME: STUDENT ID: IMPORTANT:

More information

CSE 544, Winter 2009, Final Examination 11 March 2009

CSE 544, Winter 2009, Final Examination 11 March 2009 CSE 544, Winter 2009, Final Examination 11 March 2009 Rules: Open books and open notes. No laptops or other mobile devices. Calculators allowed. Please write clearly. Relax! You are here to learn. Question

More information

Database Systems CSci 4380 Final Exam May 19, 2016 SOLUTIONS

Database Systems CSci 4380 Final Exam May 19, 2016 SOLUTIONS Database Systems CSci 4380 Final Exam May 19, 2016 SOLUTIONS Question 1 (10 points). You are given the schedule below. List all conflicts. Draw the conflict graph. Discuss whether it is serializable or

More information

University of Waterloo Midterm Examination Sample Solution

University of Waterloo Midterm Examination Sample Solution 1. (4 total marks) University of Waterloo Midterm Examination Sample Solution Winter, 2012 Suppose that a relational database contains the following large relation: Track(ReleaseID, TrackNum, Title, Length,

More information

Advances in Data Management Transaction Management A.Poulovassilis

Advances in Data Management Transaction Management A.Poulovassilis 1 Advances in Data Management Transaction Management A.Poulovassilis 1 The Transaction Manager Two important measures of DBMS performance are throughput the number of tasks that can be performed within

More information

Transaction Management and Concurrency Control. Chapter 16, 17

Transaction Management and Concurrency Control. Chapter 16, 17 Transaction Management and Concurrency Control Chapter 16, 17 Instructor: Vladimir Zadorozhny vladimir@sis.pitt.edu Information Science Program School of Information Sciences, University of Pittsburgh

More information

Transactions. Transaction. Execution of a user program in a DBMS.

Transactions. Transaction. Execution of a user program in a DBMS. Transactions Transactions Transaction Execution of a user program in a DBMS. Transactions Transaction Execution of a user program in a DBMS. Transaction properties Atomicity: all-or-nothing execution Consistency:

More information

CS186 Final Exam Spring 2016

CS186 Final Exam Spring 2016 Name: Account: CS186 - CS186 Final Exam Spring 2016 You should receive 1 double-sided answer sheet and a 21-page exam. There are a total of 147 Points. Mark your name and login on both sides of the answer

More information

Concurrency Control & Recovery

Concurrency Control & Recovery Transaction Management Overview R & G Chapter 18 There are three side effects of acid. Enchanced long term memory, decreased short term memory, and I forget the third. - Timothy Leary Concurrency Control

More information