McGill April 2009 Final Examination Database Systems COMP 421
|
|
- Byron Gardner
- 5 years ago
- Views:
Transcription
1 McGill April 2009 Final Examination Database Systems COMP 421 Wednesday, April 15, :00-12:00 Examiner: Prof. Bettina Kemme Associate Examiner: Prof. Muthucumaru Maheswaran Student name: Student Number: Do not answer on the exam paper. Simple calculators are allowed (no programmable calculators) You can bring 8 sheets of paper with handwritten notes. Books are NOT allowed. Dictionaries are NOT allowed (except translation dictionaries). This examination must be returned. This exam comprises 12 pages, including the cover page. You can achieve 145 points (plus 5 bonus points). 1
2 COMP Data Models (24 Points) 1. (15 Points) Below is the E/R schema of question 1 of the midterm (slightly reduced and with some correction). (a) Translate the E/R schema into the relational schema. Write the tables in the form R(A1,..., An). Indicate primary keys by underlining them. Indicate the foreign keys in each relation and show the relation to which they refer to. You do NOT need to write SQL statements. (b) The schema shows two participation constraints. One for entity-set Paper in the relationship set write (a paper must have at least one author). The other for entity-set Reviews in relationship-set writes (a review must have a reviewer).for each of these two participation constraints, indicate whether there is a way to express it with the CREATE TABLE statement, and if yes, how would you do it. (No need to show the entire SQL CREATE TABLE statement; a simple explanation or simply showing the line in the statement that indicates the constraint is enough). password Users name affiliation ISA Authors Reviewers contactflag write content post writes Paper is about Message mid Originality pid Reviews of pdf title id Presentation abstract status Detailed Comments Technical Depth Summary
3 COMP (9 Points) Assume a driving school with the following information. There are instructors. Each instructor is identified by an id. Additionally he/she has a name. There are students. Each student is identified by an id. Additionally, he/she has a name and an address. Each student is assigned a subset of the instructors (one or more). A driving lesson is at a certain date and time. It is of a certain type (city drive, country-side drive, highway drive, night drive,...). Each driving lesson is given by an instructor to a student. Only an instructor who is assigned to a student can give a driving lesson to this student. Draw the E/R diagram for this specification.
4 COMP Functional Dependencies (16 Points) 1. The E/R diagram below depicts some information to be stored in the database of a cafeteria. The cafeteria has a certain repertoire of menus it can produce. Each menu has a name and a price. Each day the cafeteria offers menus from its repertoire, and for each menu offered at a particular day, it keeps track of how often it is sold. Furthermore, a menu has a main-dish, and for this main-dish the recipe is kept in the database. menuname price day Menu MenuInstance numsold Main-Dish dishname recipe However, the designer of the database skipped the design process, and simply created one big relation Cafeteria(menuname, price, day, numsold, dishname, recipe) (a) Indicate the functional dependencies that hold in the relation Cafeteria given the textual description and the E/R schema above. (Hint: translate the E/R schema into the relational schema; that might make it easier for you to find the FDs) (b) Give an example of redundancy that can occur in Cafeteria. Give an explanation based on FDs why such redundancy can occur. 2. Given a relation R(a,b,c,d,e,f,g) and the following FDs a,b e f g a d, f Indicate the key candidate(s) of the relation R. Provide reasoning for your decision.
5 COMP Relational Algebra and SQL (30 Points) The travel agency Discover the World offers organized vacation tours. It has the following relational database schema (simplified). Below are some example records for each of the tables. Tours (TourId, type, start-date, duration, price) Specials (SpecId, name, price) Reservations (ResId, TourId, cname, caddress, cost) SpecialRes (ResId, SpecId) Tours describe the tours that can be booked. Each has a identifier (TourId), is of a certain type ( Brazil jungle, Kenia Safari,...), has a start-date, a duration, and a basic price. The Specials lists all specials that can be booked extra. This could be, for instance, a singe-room, vegetarian food, etc. Specials has an identifying attribute, a name, and a price attribute. The price gives the cost for this special per day (e.g., 20$ per day for a single room). Reservations contains information about each booked tour. It has an identifying attribute, a reference to the tour booked, and the name and address of the customer. Furthermore, it contains an attribute with the total cost of the booked tour including the full costs of all booked specials. SpecialRes contains for each reservation all the specials that are booked together with the tour. We can assume that when a special is booked it is booked for every day of the tour. Tours TourId type start-date duration price 1 Brazil jungle 16-April Brazil jungle 30-April Kenia safari 30-April Specials SpecId name price 11 single vegetarian 5... Reservations ResId TourId cname caddress cost Bettina Kemme Montreal your name your address SpecialRes ResId SpecId
6 COMP (4 Points) Write in Relational Algebra: Give the names of customers who have booked a tour of at least 21 days. 2. (4 Points) Look at the following two queries Query 1: SELECT r. cname FROM Reservations r, SpecialRes s, WHERE r.resid = s.resid Query 2: SELECT r.cname FROM Reservations r WHERE r.resid IN (SELECT s.resid FROM SpecialRes s) Although the queries seem to produce the same answers they don t. How do they differ? You can give example instances of Reservations and SpecialRes that show that these two queries can produce different answers. 3. (6 Points) Write the following query in SQL: Return ResID and cname for reservations that neither include the special vegetarian nor the special single. 4. (6 Points) Write the following query in SQL: Return the ResID and the number of specials of Reservations that have booked at least two specials. 5. (10 Points) The attribute cost of the Reservation table is a derived attribute. We assume that when a new reservation record is inserted, it contains as value for cost the price value of the corresponding tour (e.g.,, INSERT INTO Reservations (ResId, TourId, cname, caddress, cost) VALUES (x, 1, y, z, 2229)). After that, the cost attribute needs to be updated after further modifications of the database so that it always reflects the current price of all things booked within the reservation. This can be done, e.g., through triggers. (a) Indicate all events for which a trigger needs to be created. Describe shortly the actions that have to be performed within each trigger. (b) Write one of the triggers in SQL notation.
7 COMP XML (15 Points + 5 BONUS Points) The travel agency Discover the World of Question 3 might also store its data in XML format. Below an XML document that describes the same information as in Question 3. <DiscoverTheWorld> <tour TourId="1"> <type> Brazil junge </type> <start-date> 16-April </start-date> <duration> 14 </duration> <price> 2229 </price> <tour TourId="2"> <type> Brazil junge </type> <start-date> 30-April </start-date> <duration> 21 </duration> <price> 2999 </price> </tour> <tour TourId="3>> <type> Kenia safari </type> <start-date> 30-April </start-date> <duration> 21 </duration> <price> 3229 </price> </tour> <reservation ResId="541" TourId="1"> <cname> Bettina Kemme </cname> <caddress> Montreal </caddress> <cost> 2579 </cost> <special price="5"> vegetarian </special> <special price="20"> single </special> </reservation> <reservation ResId="542" TourId="2"> <cname> Your Name </cname> <caddress> Your Address </caddress> <cost> 3105 </cost> <special price="5"> vegetarian </special> </reservation> </DiscoverTheWorld>
8 COMP An incomplete DTD for this document could look as following: <!DOCTYPE DiscoverTheWorld [ <!ELEMENT DiscoverTheWorld (tour*,reservation*)> <!ELEMENT tour... > <!ELEMENT reservation...> <!ATTLIST tour... > <!ATTLIST reservation...> <!ELEMENT type (#PCDATA) > <!ELEMENT start-date (#PCDATA) > <!ELEMENT duration (#PCDATA) > <!ELEMENT price (#PCDATA) > <!ELEMENT cname (#PCDATA) > <!ELEMENT caddress (#PCDATA) > <!ELEMENT cost (#PCDATA) > <!ELEMENT special (#PCDATA) > <!ATTLIST special price CDATA #REQUIRED> ]> Complete the DTD in a way the reflects the semantics of the application. You only need to provide the four entries above that contain.... <!ELEMENT tour (type, start-date, duration, price) > <!ELEMENT reservation (cname, caddress, cost, special*)> <!ATTLIST tour TourId ID #REQUIRED > <!ATTLIST reservation ResID ID #REQUIRED TourID IDREF #REQUIRED> 2. Write an XPath expression that returns each reservation that has at least two specials. /DiscoverTheWorld/reservation[count(special) > 1] 3. Write an XQuery that returns for each reservation of the tour with TourId=1, the specials that are booked with it. for $x in document("discover.xml")/discovertheworld/reservation[@tourid = 1] let $z = $y/special 4. (5 Bouns points) Write an XQuery that returns for each reservation of a Brazil jungle trip, the specials that are booked with it. More concrete, for the document above the following should be returned
9 COMP <specials-booked> <special price="5"> vegetarian </special> <special price="20"> single </special> </specials-booked> <specials-booked> <special price="5"> vegetarian </special> </specials-booked> for $x in document("discovertheworld.xml")/discovertheworld/ /tour[type="brazil jungle"]@tourid for $y in document("discovertheworld.xml")/discovertheworld/ /reservation[@tourid = $x] let $z = $y/special return <specials-booked> $z </specials-booked>
10 COMP Query Evaluation and Optimization (35 Points) Given the relations R(a, b, c), S(d, e, f) and T(g, a, d, h). In T, a is foreign key to R, and d is foreign key to S. All attributes have data type integer and an integer has 10 Bytes. Data pages have 4K. R has around 100,000 tuples distributed over 1000 pages. For 10,000 tuples of R, attributebstores a unique name (e.g., product name) with values between [1,10000]. For the other 90,000 tuples, b contains 2000 different uniformly distributed values ranging from [10001,12000] (e.g., it stores the product type and there are 2000 different types). T has around 50,000 tuples distributed over 600 pages. Index pages are 4 KByte, a pointer in an index page has 6 Bytes, an rid has 10 Bytes. 1. (5 Points) Consider the relational algebra expression π f (σ b=10 ((S T) R)) For each of the expressions below indicate whether they are equivalent to the expression above. (a) π f (σ b=10 (R) (S π a,d (T))) (b) π f (σ b=10 (π a,b (R) (π d (S) π a,d (T)))) 2. (7 Points) Consider the following SQL query SELECT R.b, S.d FROM R, S, T WHERE R.a = T.a AND S.d = T.d AND S.e = 500 AND R.c <> T.h Give an equivalent expression in relational algebra. If your expression is not yet optimal, perform an algebraic optimization according to the rules discussed in class. There is no need to consider cardinalities. There is no need to indicate what kind of joins are going to be performed. 3. (8 Points) There is an unclustered B+-tree for the attribute b of relation R where each data entry of a leaf page can consist of a list of data entries. Leaf pages are filled around 70%. Indicate the number of data entries, the number of rids per data entry, the size of data entries, and the number of leaf pages. Give a short explanation of how you derived the numbers.
11 COMP (15 Points) Assume a clustered B+tree on attribute b of relation R, and an unclustered B+-tree on attribute a of relation T. Assume that all inner pages of indices reside in main memory and only leaf pages and data pages require I/O. Assume that you have around 50 buffer pages for sorts and block based loop. Now consider the query SELECT R.a, R.b, T.h FROM R, T WHERE R.a = T.a AND R.b <= X ORDER BY T.h (a) Provide the best execution strategies for how to execute the query if X = (b) Provide the best execution strategy if X = 50. In both cases give a rough estimation of the number of I/O for this strategy. Indicate how you have calculated your I/O estimation. This might also include estimates of the size of intermediate results (to justify that it fits into main memory or that it has to be written out to disk, etc.). You can describe the execution strategy in informal English or by giving an execution plan (as long as I understand what you meant.) If you provide a correct but expensive execution strategy then you will get points but maybe not the maximum.
12 COMP Transactions (25 Points) 1. (15 Points) Given the following schedule T1 T2 T3 w1(a) w1(b) c1 r2(b) r2(c) w2(c) c2 r3(b) w3(c) r3(b) c3 (a) Is the execution serializable? If yes, provide an equivalent serial schedule. If not, indicate the conflicting pairs that lead to the schedule not being serializable. (b) Is the schedule (i) recoverable, (ii) avoids cascading abort, (iii) strict? (c) Assume now that the figure above does not depict the final schedule but the sequence of operations submitted to the system. Now assume a DBMS that uses strict 2PL for concurrency control. Assume for shared locks the following behavior. When a shared lock is requested, and an exclusive lock is granted, then wait. If only shared locks are granted, then grant the new shared lock (even if some exclusive locks are waiting). The DBMS processes actions in the order shown. If a transaction is blocked, assume that all of its actions are queued until it is resumed; the DBMS continues with the next action (according to the listed sequence) of an unblocked transaction. i. Describe how strict 2PL handles the sequence above. Add lock S i (a) if T i acquires shared lock on a, X i (a) if T i acquires exclusive lock on object a, and unlock request U i (a) if T i releases any lock on object a to the above sequence. ii. Provide a serial schedule that is conflict-equivalent to the schedule produced under 2PL.
13 COMP (10 Points) Assume the following concurrency protocol. For any update transaction, i.e., a transaction that has at least one write operation, strict 2PL is used for all its operations. Additionally, the system uses a multi-version system. That is, each write operation of T i on x creates a new version of x i. Thus, we indicate write operation of T i on x as w i (x i ). Read-only transactions, i.e., transactions that only have read operations and no update operation, do not acquire any locks. Instead, whenever a read-only transaction T i performs a read operation r i (x) it reads the version x j such that T j was the last to write x and commit before T i started. The following figure illustrates this behavior. T i reads the version x 2 created by T 2 because T 2 is the last to write x and commit before T i started. T i does not read x 1 because T 1 is not the last to write x and commit before T i started. T i does not read x 3, although x 3 was already committed when the read takes place, as T 3 is concurrent to T i (did not commit before T i started). The figure also shows that the read of the version x 2 can take place concurrently to the write w 4 (x 4 ) of T 4 as no read lock is set and different versions are accessed. T1 w1(x1) T2 w2(x2) T3 w3(x3) T4 w4(x4) Ti ri(x2) For each of the anomalies dirty read, unrepeatable read, phantom, indicate whether read-only transactions can experience this anomaly. Provide short reasoning. Time
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 informationCSE 344 Final Examination
CSE 344 Final Examination December 12, 2012, 8:30am - 10:20am Name: Question Points Score 1 30 2 20 3 30 4 20 Total: 100 This exam is open book and open notes but NO laptops or other portable devices.
More informationCSE 414 Database Systems section 10: Final Review. Joseph Xu 6/6/2013
CSE 414 Database Systems section 10: Final Review Joseph Xu 6/6/2013 Final Exam The final exam is Monday, June 10 from 2:30-4:20 Materials:You may bring your textbook plus one sheet of 8.5x11" paper with
More informationQueen s University Faculty of Arts and Science School of Computing CISC 432* / 836* Advanced Database Systems
HAND IN Queen s University Faculty of Arts and Science School of Computing CISC 432* / 836* Advanced Database Systems Final Examination December 14, 2002 Instructor: Pat Martin Instructions: 1. This examination
More informationIMPORTANT: 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 informationMidterm 2: CS186, Spring 2015
Midterm 2: CS186, Spring 2015 Prof. J. Hellerstein You should receive a double-sided answer sheet and an 8-page exam. Mark your name and login on both sides of the answer sheet, and in the blanks above.
More informationCSE 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 informationIMPORTANT: 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 informationCISC437/637 Database Systems Final Exam
CISC437/637 Database Systems Final Exam You have from 1:00 to 3:00pm to complete the following questions. The exam is closed-note and closed-book. Good luck! Multiple Choice (2 points each; 52 total) x
More informationCISC437/637 Database Systems Final Exam
CISC437/637 Database Systems Final Exam You have from 1:00 to 3:00pm to complete the following questions. The exam is closed-note and closed-book. Good luck! Multiple Choice (2 points each; 52 total) 1.
More informationCSE 344 Midterm. November 9, 2011, 9:30am - 10:20am. Question Points Score Total: 100
CSE 344 Midterm November 9, 2011, 9:30am - 10:20am Name: Question Points Score 1 40 2 40 3 20 Total: 100 This exam is open book and open notes but NO laptops or other portable devices. You have 50 minutes;
More informationVIEW OTHER QUESTION PAPERS
VIEW OTHER QUESTION PAPERS E B4E0562 Reg No.: Name: Total Pages: 2 APJ ABDUL KALAM TECHNOLOGICAL UNIVERSITY FOURTH SEMESTER B.TECH DEGREE EXAMINATION, JULY 2017 Course Code: CS208 Course Name: PRINCIPLES
More informationCSE 444: Database Internals. Lectures Transactions
CSE 444: Database Internals Lectures 13-14 Transactions CSE 444 - Spring 2014 1 Announcements Lab 2 is due TODAY Lab 3 will be released today, part 1 due next Monday HW4 is due on Wednesday HW3 will be
More informationIntro to Transaction Management
Intro to Transaction Management CMPSCI 645 May 3, 2006 Gerome Miklau Slide content adapted from Ramakrishnan & Gehrke, Zack Ives 1 Concurrency Control Concurrent execution of user programs is essential
More informationTransaction 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 informationDatabase 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 informationAttach extra pages as needed. Write your name and ID on any extra page that you attach. Please, write neatly.
UCLA Computer Science Department Fall 2003 Instructor: C. Zaniolo TA: Fusheng Wang Student Name and ID: CS143 Final EXAM: Closed Book, 3 Hours Attach extra pages as needed. Write your name and ID on any
More informationCSE 344 MARCH 9 TH TRANSACTIONS
CSE 344 MARCH 9 TH TRANSACTIONS ADMINISTRIVIA HW8 Due Monday Max Two Late days Exam Review Sunday: 5pm EEB 045 CASE STUDY: SQLITE SQLite is very simple More info: http://www.sqlite.org/atomiccommit.html
More informationL i (A) = transaction T i acquires lock for element A. U i (A) = transaction T i releases lock for element A
Lock-Based Scheduler Introduction to Data Management CSE 344 Lecture 20: Transactions Simple idea: Each element has a unique lock Each transaction must first acquire the lock before reading/writing that
More informationIntroduction 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 informationCSE 344 Final Examination
CSE 344 Final Examination March 15, 2016, 2:30pm - 4:20pm Name: Question Points Score 1 47 2 17 3 36 4 54 5 46 Total: 200 This exam is CLOSED book and CLOSED devices. You are allowed TWO letter-size pages
More informationCSE 344 Midterm. November 9, 2011, 9:30am - 10:20am. Question Points Score Total: 100
CSE 344 Midterm November 9, 2011, 9:30am - 10:20am Name: Question Points Score 1 40 2 40 3 20 Total: 100 This exam is open book and open notes but NO laptops or other portable devices. You have 50 minutes;
More informationConflict Equivalent. Conflict Serializability. Example 1. Precedence Graph Test Every conflict serializable schedule is serializable
Conflict Equivalent Conflict Serializability 34 35 Outcome of a schedule depends on the order of conflicting operations Can interchange non-conflicting ops without changing effect of the schedule If two
More informationDatabase Systems CSE 414
Database Systems CSE 414 Lecture 27: Transaction Implementations 1 Announcements Final exam will be on Dec. 14 (next Thursday) 14:30-16:20 in class Note the time difference, the exam will last ~2 hours
More informationFinal Exam. December 5th, :00-4:00. CS425 - Database Organization Results
Name CWID Final Exam December 5th, 2016 2:00-4:00 CS425 - Database Organization Results Please leave this empty! 1.1 1.2 1.3 1.4 1.5 1.6 Sum Instructions Try to answer all the questions using what you
More informationCSE 344 Midterm. Wednesday, February 19, 2014, 14:30-15:20. Question Points Score Total: 100
CSE 344 Midterm Wednesday, February 19, 2014, 14:30-15:20 Name: Question Points Score 1 30 2 50 3 12 4 8 Total: 100 This exam is open book and open notes but NO laptops or other portable devices. You have
More informationCSE 444 Final Exam. August 21, Question 1 / 15. Question 2 / 25. Question 3 / 25. Question 4 / 15. Question 5 / 20.
CSE 444 Final Exam August 21, 2009 Name Question 1 / 15 Question 2 / 25 Question 3 / 25 Question 4 / 15 Question 5 / 20 Total / 100 CSE 444 Final, August 21, 2009 Page 1 of 10 Question 1. B+ trees (15
More informationIntroduction to Data Management CSE 414
Introduction to Data Management CSE 414 Lecture 23: Transactions CSE 414 - Winter 2014 1 Announcements Webquiz due Monday night, 11 pm Homework 7 due Wednesday night, 11 pm CSE 414 - Winter 2014 2 Where
More informationHomework 5: Miscellanea (due April 26 th, 2013, 9:05am, in class hard-copy please)
Virginia Tech. Computer Science CS 4604 Introduction to DBMS Spring 2013, Prakash Homework 5: Miscellanea (due April 26 th, 2013, 9:05am, in class hard-copy please) Reminders: a. Out of 100 points. b.
More informationCSE 344 MARCH 25 TH ISOLATION
CSE 344 MARCH 25 TH ISOLATION ADMINISTRIVIA HW8 Due Friday, June 1 OQ7 Due Wednesday, May 30 Course Evaluations Out tomorrow TRANSACTIONS We use database transactions everyday Bank $$$ transfers Online
More informationCS145 Midterm Examination
CS145 Midterm Examination Spring 2004, Prof. Widom Please read all instructions (including these) carefully. There are 9 problems on the exam, with a varying number of points for each problem and subproblem
More informationIntroduction to Data Management CSE 344
Introduction to Data Management CSE 344 Unit 7: Transactions Schedules Implementation Two-phase Locking (3 lectures) 1 Class Overview Unit 1: Intro Unit 2: Relational Data Models and Query Languages Unit
More informationINSTITUTO 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 informationOverview 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 informationPLEASE HAND IN UNIVERSITY OF TORONTO Faculty of Arts and Science
PLEASE HAND IN UNIVERSITY OF TORONTO Faculty of Arts and Science APRIL 2015 EXAMINATIONS CSC 343 H1S Instructor: Horton and Liu Duration 3 hours PLEASE HAND IN Examination Aids: None Student Number: Family
More informationQuestion 1. SQL and Relational Algebra [25 marks] Question 2. Enhanced Entity Relationship Data Model [25 marks]
EXAMINATIONS 2003 MID-YEAR COMP 302 Database Systems Time allowed: Instructions: 3 Hours Answer all questions. Make sure that your answers are clear and to the point. Calculators and foreign language dictionaries
More informationTransaction 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 informationCSE 344 Final Examination
CSE 344 Final Examination June 8, 2011, 8:30am - 10:20am Name: This exam is a closed book exam. Question Points Score 1 20 2 20 3 30 4 25 5 35 6 25 7 20 8 25 Total: 200 You have 1h:50 minutes; budget time
More informationOverview. Introduction to Transaction Management ACID. Transactions
Introduction to Transaction Management UVic C SC 370 Dr. Daniel M. German Department of Computer Science Overview What is a transaction? What properties transactions have? Why do we want to interleave
More informationGoal of Concurrency Control. Concurrency Control. Example. Solution 1. Solution 2. Solution 3
Goal of Concurrency Control Concurrency Control Transactions should be executed so that it is as though they executed in some serial order Also called Isolation or Serializability Weaker variants also
More informationDatabase Applications (15-415)
Database Applications (15-415) DBMS Internals- Part XI Lecture 19, April 2, 2014 Mohammad Hammoud Today Last Session: DBMS Internals- Part IX Query Optimization (Cont d) A Very Brief Introduction to Transaction
More informationComputer Science 304
The University of British Columbia Computer Science 304 Final Examination Instructor: Rachel Pottinger Time: 2.5 hours Total marks: 48 Name ANSWER KEY (PRINT) (Last) (First) Signature This examination
More informationFinal 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 informationWhat are Transactions? Transaction Management: Introduction (Chap. 16) Major Example: the web app. Concurrent Execution. Web app in execution (CS636)
What are Transactions? Transaction Management: Introduction (Chap. 16) CS634 Class 14, Mar. 23, 2016 So far, we looked at individual queries; in practice, a task consists of a sequence of actions E.g.,
More informationCS/B.Tech/CSE/New/SEM-6/CS-601/2013 DATABASE MANAGEMENENT SYSTEM. Time Allotted : 3 Hours Full Marks : 70
CS/B.Tech/CSE/New/SEM-6/CS-601/2013 2013 DATABASE MANAGEMENENT SYSTEM Time Allotted : 3 Hours Full Marks : 70 The figures in the margin indicate full marks. Candidates are required to give their answers
More informationCSE 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 informationCSE 344 MARCH 5 TH TRANSACTIONS
CSE 344 MARCH 5 TH TRANSACTIONS ADMINISTRIVIA OQ6 Out 6 questions Due next Wednesday, 11:00pm HW7 Shortened Parts 1 and 2 -- other material candidates for short answer, go over in section Course evaluations
More informationCS348: INTRODUCTION TO DATABASE MANAGEMENT (Winter, 2011) FINAL EXAMINATION
CS348: INTRODUCTION TO DATABASE MANAGEMENT (Winter, 2011) FINAL EXAMINATION INSTRUCTOR: Grant Weddell TIME: 150 minutes WRITE YOUR NAME AND ID HERE: NOTE 1: This is a closed book examination. For example,
More informationRelational 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 informationTransaction Management: Introduction (Chap. 16)
Transaction Management: Introduction (Chap. 16) CS634 Class 14 Slides based on Database Management Systems 3 rd ed, Ramakrishnan and Gehrke What are Transactions? So far, we looked at individual queries;
More informationCS 5300 module6. Problem #1 (10 Points) a) Consider the three transactions T1, T2, and T3, and the schedules S1 and S2.
Name CS 5300 module6 Student ID Problem #1 (10 Points) a) Consider the three transactions T1, T2, and T3, and the schedules S1 and S2. T1: r1(x); r1(z); w1(x); T2: r2(y); r2(z); w2(y); T3: w3(x); r3(y);
More informationTransactions Processing (i)
ICS 321 Spring 2012 Transactions Processing (i) Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa 03/07/2012 Lipyeow Lim -- University of Hawaii at Manoa 1
More informationCMSC 461 Final Exam Study Guide
CMSC 461 Final Exam Study Guide Study Guide Key Symbol Significance * High likelihood it will be on the final + Expected to have deep knowledge of can convey knowledge by working through an example problem
More informationMaanavaN.Com DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING QUESTION BANK
CS1301 DATABASE MANAGEMENT SYSTEM DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING QUESTION BANK Sub code / Subject: CS1301 / DBMS Year/Sem : III / V UNIT I INTRODUCTION AND CONCEPTUAL MODELLING 1. Define
More informationUniversity of California, Berkeley. CS 186 Introduction to Databases, Spring 2014, Prof. Dan Olteanu MIDTERM
University of California, Berkeley CS 186 Introduction to Databases, Spring 2014, Prof. Dan Olteanu MIDTERM This is a closed book examination sided). but you are allowed one 8.5 x 11 sheet of notes (double
More informationMASSACHUSETTS INSTITUTE OF TECHNOLOGY Database Systems: Fall 2015 Quiz I
Department of Electrical Engineering and Computer Science MASSACHUSETTS INSTITUTE OF TECHNOLOGY 6.830 Database Systems: Fall 2015 Quiz I There are 12 questions and 13 pages in this quiz booklet. To receive
More informationExamination paper for TDT4145 Data Modelling and Database Systems
Department of Computer and Information Science Examination paper for TDT4145 Data Modelling and Database Systems Academic contact during examination: Svein Erik Bratsberg: 99539963 Roger Midtstraum: 99572420
More informationPLEASE HAND IN UNIVERSITY OF TORONTO Faculty of Arts and Science
PLEASE HAND IN UNIVERSITY OF TORONTO Faculty of Arts and Science DECEMBER 2011 EXAMINATIONS CSC 343 H1F Instructors: Horton and Papangelis Duration 3 hours PLEASE HAND IN Examination Aids: None Student
More informationIncluding Aborts in Serializability. Conflict Serializable Schedules. Recall Conflicts. Conflict Equivalent
Including Aborts in Serializability Conflict Serializable Schedules 31 32 Extend the definition of a serializable schedule to include aborts Serializable schedule: a schedule that is equivalent to some
More informationCSE 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 informationDepartment of Computer Science Final Exam, CS 4411a Databases II
1 Name: Student ID: Department of Computer Science Final Exam, CS 4411a Databases II Prof. S. Osborn April 22, 2010 3 Hours No aids. No electronic aids Answer all questions on the exam page This paper
More informationINSTITUTO 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 informationDatabase Systems. Announcement
Database Systems ( 料 ) December 27/28, 2006 Lecture 13 Merry Christmas & New Year 1 Announcement Assignment #5 is finally out on the course homepage. It is due next Thur. 2 1 Overview of Transaction Management
More informationFinal 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 informationFinal 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 informationLassonde School of Engineering Winter 2016 Term Course No: 4411 Database Management Systems
Lassonde School of Engineering Winter 2016 Term Course No: 4411 Database Management Systems Last Name: First Name: Student ID: 1. Exam is 2 hours long 2. Closed books/notes Problem 1 (6 points) Consider
More information1 (10) 2 (8) 3 (12) 4 (14) 5 (6) Total (50)
Student number: Signature: UNIVERSITY OF VICTORIA Faculty of Engineering Department of Computer Science CSC 370 (Database Systems) Instructor: Daniel M. German Midterm Oct 21, 2004 Duration: 60 minutes
More informationDelhi Noida Bhopal Hyderabad Jaipur Lucknow Indore Pune Bhubaneswar Kolkata Patna Web: Ph:
Serial : 0. PT_CS_DBMS_02078 Delhi Noida Bhopal Hyderabad Jaipur Lucknow Indore Pune Bhubaneswar Kolkata Patna Web: E-mail: info@madeeasy.in Ph: 0-5262 CLASS TEST 208-9 COMPUTER SCIENCE & IT Subject :
More informationCSE 444: Database Internals. Lectures 13 Transaction Schedules
CSE 444: Database Internals Lectures 13 Transaction Schedules CSE 444 - Winter 2018 1 About Lab 3 In lab 3, we implement transactions Focus on concurrency control Want to run many transactions at the same
More informationIntroduction to Data Management CSE 344
Introduction to Data Management CSE 344 Lecture 22: More Transaction Implementations 1 Review: Schedules, schedules, schedules The DBMS scheduler determines the order of operations from txns are executed
More informationTransaction 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 informationCSE 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 informationFinal Review. CS634 May 11, Slides based on Database Management Systems 3 rd ed, Ramakrishnan and Gehrke
Final Review CS634 May 11, 2016 Slides based on Database Management Systems 3 rd ed, Ramakrishnan and Gehrke Coverage Text, chapters 8 through 18, 25 (hw1 hw6) PKs, FKs, E-R to Relational: Text, Sec. 3.2-3.5,
More informationDatabase Management Systems Written Examination
Database Management Systems Written Examination 14.02.2007 First name Student number Last name Signature Instructions for Students Write your name, student number, and signature on the exam sheet. Write
More informationDatabase design and implementation CMPSCI 645. Lectures 18: Transactions and Concurrency
Database design and implementation CMPSCI 645 Lectures 18: Transactions and Concurrency 1 DBMS architecture Query Parser Query Rewriter Query Op=mizer Query Executor Lock Manager Concurrency Control Access
More informationDatabases - 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 informationDatabase 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 informationSolutions to Final Examination
Prof. Li-Yan Yuan CMPUT 391: Database Management Systems Solutions to Final Examination December 15, 2005 It is a close-book examination and the time for the test is 120 minutes. There are twelve (12)
More informationTRANSACTION MANAGEMENT
TRANSACTION MANAGEMENT CS 564- Spring 2018 ACKs: Jeff Naughton, Jignesh Patel, AnHai Doan WHAT IS THIS LECTURE ABOUT? Transaction (TXN) management ACID properties atomicity consistency isolation durability
More informationDatabases - Transactions II. (GF Royle, N Spadaccini ) Databases - Transactions II 1 / 22
Databases - Transactions II (GF Royle, N Spadaccini 2006-2010) Databases - Transactions II 1 / 22 This lecture This lecture discusses how a DBMS schedules interleaved transactions to avoid the anomalies
More informationA7-R3: INTRODUCTION TO DATABASE MANAGEMENT SYSTEMS
A7-R3: INTRODUCTION TO DATABASE MANAGEMENT SYSTEMS NOTE: 1. There are TWO PARTS in this Module/Paper. PART ONE contains FOUR questions and PART TWO contains FIVE questions. 2. PART ONE is to be answered
More informationIntroduction to Data Management. Lecture #24 (Transactions)
Introduction to Data Management Lecture #24 (Transactions) Instructor: Mike Carey mjcarey@ics.uci.edu Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 1 Announcements v HW and exam info:
More informationCSCE 4523 Introduction to Database Management Systems Final Exam Spring I have neither given, nor received,unauthorized assistance on this exam.
CSCE 4523 Introduction to Database Management Systems Final Exam Spring 2017 I have neither given, nor received,unauthorized assistance on this exam. Signature Printed Name: Attempt all of the following
More informationLock-based Concurrency Control
Lock-based oncurrency ontrol Self Study Materials hapter 16 : oncurrency ontrol A DBMS must ensure Only serializable (and recoverable) schedules are allowed, and no actions of committed transaction is
More informationIntroduction to Data Management. Lecture #18 (Transactions)
Introduction to Data Management Lecture #18 (Transactions) Instructor: Mike Carey mjcarey@ics.uci.edu Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 1 Announcements v Project info: Part
More informationADVANCED DATABASES ; Spring 2015 Prof. Sang-goo Lee (11:00pm: Mon & Wed: Room ) Advanced DB Copyright by S.-g.
4541.564; Spring 2015 Prof. Sang-goo Lee (11:00pm: Mon & Wed: Room 301-203) ADVANCED DATABASES Copyright by S.-g. Lee Review - 1 General Info. Text Book Database System Concepts, 6 th Ed., Silberschatz,
More informationIn these relations, vin is a foreign key in ORDER referring to the CAR relation, and techid is a foreign key
Question 1. SQL (24 points, 8 each part) The Wrecks R Us Auto Repair Shoppe has a database to keep track of cars, repair orders, and repair technicians. The database has the following tables: CAR(vin,
More informationCS222P Fall 2017, Final Exam
STUDENT NAME: STUDENT ID: CS222P Fall 2017, Final Exam Principles of Data Management Department of Computer Science, UC Irvine Prof. Chen Li (Max. Points: 100 + 15) Instructions: This exam has seven (7)
More informationCSE 344 Midterm. Wednesday, February 19, 2014, 14:30-15:20. Question Points Score Total: 100
CSE 344 Midterm Wednesday, February 19, 2014, 14:30-15:20 Name: Question Points Score 1 30 2 50 3 12 4 8 Total: 100 This exam is open book and open notes but NO laptops or other portable devices. You have
More informationVANCOUVER ISLAND UNIVERSITY CSCI 370 FINAL EXAMINATION 17 April 2009, 13:00 16:00
VANCOUVER ISLAND UNIVERSITY CSCI 370 FINAL EXAMINATION 17 April 2009, 13:00 16:00 TO BE ANSWERED IN BOOKLETS DURATION: 3 Hours INSTRUCTOR: H. Liu Instructions Students must count the number of pages in
More informationCSE 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 informationDATABASE MANAGEMENT SYSTEMS
www..com Code No: N0321/R07 Set No. 1 1. a) What is a Superkey? With an example, describe the difference between a candidate key and the primary key for a given relation? b) With an example, briefly describe
More informationDatabase Management Systems (Classroom Practice Booklet Solutions)
Database Management Systems (Classroom Practice Booklet Solutions) 2. ER and Relational Model 4 ssn cid 01. Ans: (b) Professor Teaches course 02. Ans: (c) Sol: Because each patient is admitted into one
More informationSchema And Draw The Dependency Diagram
Given That Information Write The Relational Schema And Draw The Dependency Diagram below, write the relational schema, draw its dependency diagram, and identify all You can assume that any given product
More informationConcurrency 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 informationGoals for Today. CS 133: Databases. Final Exam: Logistics. Why Use a DBMS? Brief overview of course. Course evaluations
Goals for Today Brief overview of course CS 133: Databases Course evaluations Fall 2018 Lec 27 12/13 Course and Final Review Prof. Beth Trushkowsky More details about the Final Exam Practice exercises
More informationAssignment 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 informationIntroduction to Database Systems. Announcements CSE 444. Review: Closure, Key, Superkey. Decomposition: Schema Design using FD
Introduction to Database Systems CSE 444 Lecture #9 Jan 29 2001 Announcements Mid Term on Monday (in class) Material in lectures Textbook Chapter 1.1, Chapter 2 (except 2.1 and ODL), Chapter 3 (except
More informationCSE 344 Final Exam. March 17, Question 1 / 10. Question 2 / 30. Question 3 / 18. Question 4 / 24. Question 5 / 21.
CSE 344 Final Exam March 17, 2015 Question 1 / 10 Question 2 / 30 Question 3 / 18 Question 4 / 24 Question 5 / 21 Question 6 / 32 Question 7 / 35 Question 8 / 20 Total / 190 The exam is closed everything
More informationCSCE 4523 Introduction to Database Management Systems Final Exam Fall I have neither given, nor received,unauthorized assistance on this exam.
CSCE 4523 Introduction to Database Management Systems Final Exam Fall 2016 I have neither given, nor received,unauthorized assistance on this exam. Signature Printed Name: Attempt all of the following
More information