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 16 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) Indexing 1.1. (2,5 pts) Suppose that we are using extendable hashing on a file that contains records with the following search-key values: Search-key values Hash value Ronaldo Messi Hernandez Iniesta Lahm Ibrahimovic Rooney Neymar Show the extendable hash structure for this file, if the hash values for each search key are as shown in the table above, and if buckets can hold up to three records. Use the least significant bits of the hash value. 2

3 1.2. (1 pt) Suppose that you have a sorted file and want to construct a dense primary B+ tree index on this file. a) One way to accomplish this task is to scan the file, record by record, inserting each one using the B+ tree insertion procedure. What performance and storage utilization problems are there with this approach? b) Explain how the bulk-loading algorithm improves upon this scheme (0,5 pt) What is the difference between a B+-tree index and a B+-tree file organization? Indicate one advantage of the each schema. 3

4 2. (4 pts) Query Processing and Optimization 2.1. (2,5 pts) Consider performing a natural join between the following two relations: Client(Name,ID) ClientDetails(ID,Property,Value) Assume that the Client tuples are stored contiguously on 2000 disk blocks and that the ClientDetails tuples are stored contiguously on 400 blocks. Each block of Client or ClientDetails holds up to 50 tuples. There are 102 memory blocks available. Compute the I/O cost for each of the following join algorithms, justifying your result. Ignore the I/O cost of writing the output to disk. Unless stated otherwise, the tuples in the relations are not sorted. a) Merge join, sorted relations (i.e., assume that both relations are sorted). b) Merge join, unsorted relations (i.e., assume that both relations are unsorted). c) Index join. Assume that there is an index on the ID column of Client. We read a block of ClientDetails and, for each tuple in this block, we use the index to find all matching tuples of Client. Each of these Client tuples is read into memory and joined with the tuples from ClientDetails. We repeat the process for all blocks of ClientDetails. Assume that the index is entirely in memory, and assume that, on average, each tuple of ClientDetails matches 4 tuples of Client. d) Hash join. Assume Client as the build relation. 4

5 2.2. (1 pt) Consider the following database relations: Client(Name,Address,ClientID) ClientSubcriptions(ClientID,SubscriptionType) ClientID: Foreign Key(Client) The relation Client has 200 tuples and the relation ClientSubscriptions has 600 tuples. Answer the following questions: a) Estimate the number of tuples of Client X ClientSubscriptions. b) Consider the selection: σ ClientID=2 (Client X ClientSubscriptions). Estimate the number of tuples returned by the selection (0,5 pt) What would change in the answer to question 2.2.b) if the selection condition was ClientID>2? 5

6 3.(4 pts) Transactions and Concurrency Control 3.1. (2,5 pts) Consider a multi-granularity locking system, with lock modes IX, X, IS, S and SIX. The objects are arranged in the following hierarchy: relation / \ / \ block A block B / \ / \ / \ / \ a1 a2 a3 b1 b2 Assume there are two active transactions T1 and T2, and there are no lock upgrades. a) Transaction T1 has already obtained the following locks: IS lock on R, S on B. Transaction T2 wants to modify b2 (and nothing else) while T1 is active. What lock does T2 need to get? Which of these locks can T2 get at this point? b) Transaction T1 has already obtained the following locks: IS lock on R, S on A. Transaction T2 wants to read b2 and modify a1 (and nothing else) while T1 is active. What locks does T2 need to get? Which of these locks can T2 get at this point? c) Transaction T1 has already obtained the following locks: IX lock on R, IX on A, X on a1. Transaction T2 wants to read a2 and modify a3 (and nothing else) while T1 is active. What locks does T2 need to get? Which of these locks can T2 get at this point? d) Transaction T1 has already obtained the following locks: IX lock on R, IX on A, X on a1. Transaction T2 wants to read a2 and modify a1 (and nothing else) while T1 is active. What locks does T2 need to get? Which of these locks can T2 get at this point? 6

7 3.2. (1 pt) Consider the following two transactions: T1: R1(X) W1(X) R1(Y) W1(Y) T2: R2(Y) W2(Y) Which of the following schedules would be allowed under the 2-Phase Locking protocol? Justify your answer. Assume that the L lock actions in the schedules are exclusive. a) L1(X) L1(Y) L2(Y) R1(X) W1(X) R1(Y) W1(Y) R2(Y) W(Y) U2(Y) U1(Y) U1(X) b) L1(Y) L1(X) R1(Y) W1(Y) R1(X) W1(X) U1(X) U1(Y) L2(Y) R2(Y) W2(Y) U2(Y) 7

8 3.3. (0,5 pt) Consider the following schedule for three concurrent transactions and indicate whether it is possible under the timestamp-based protocol. Justify. T1 T2 T R(A) R(C) W(A) W(B) W(B) W(C) 8

9 4. (4 pts) Recovery Management 4.1. (2,5 pts) Briefly answer the following questions regarding the ARIES recovery algorithm: a) If the system fails repeatedly during recovery, what is the maximum number of log records that can be written (as a function of the number of update and other log records written before the crash) before restart completes successfully? Justify. b) What is the oldest log record we need to retain? Justify. 9

10 4.2. (1 pt) In the context of the ARIES algorithm, explain the purpose of the checkpoint mechanism. Explain how does the frequency of checkpoints affect: (i) The system's performance when no failure occurs. (ii) The time it takes to recover from a system crash. (iii) The time it takes to recover from a disk crash (i.e., a crash on stable storage) (0,5 pt) How does the recovery manager ensure atomicity of transactions? How does it ensure durability? 10

11 5. (4 pts) Miscellaneous 5.1. (1 pt) Discuss how the SQL Server DBMS supports data indexing, trying to answer the following particular questions: a) Are clustered indexes on non-key attributes supported? b) Are composite indexes supported? Besides composite indexes, is there any other way to implement the idea of "covering indexes" through non-clustered indexes? c) Can the non-clustered indexes be sparse, or do they have to be dense? d) How are tuple locators (i.e., the pointers to the actual tuples associated to the index keys) implemented in the case of non-clustered indexes (i.e., what is the relationship between clustered and non-clustered indexes)? e) Why should clustered index keys use as few columns as possible? 11

12 5.2. (1 pt) Explain the two general strategies through which parallelism can be used in DBMS processing. Clearly indicate how DBMSs can make use of these two general strategies (i.e., what are the typical operations where each of the strategies can be employed). 12

13 5.3.(1 pt) Consider a database storing information about the expenses and revenues associated to the employees of a given company, specifically (i) the monthly revenues generated by each employee, and (ii) the yearly salary for each employee. Consider also the following two equivalent SQL queries, which return the employees that are paid yearly the same value that they generate to the company in revenues: SELECT * FROM Employees WHERE salary = 12*revenue; SELECT * FROM Employees WHERE salary/12 = revenue; Explain which query is better (i.e., in which situations is one query better than the other, in terms of execution efficiency). Justify your answer. 13

14 5.4. (1 pt) Explain the difference between a system crash and a "disaster." Indicate what kinds of strategies are used in database management systems for handling both types of problems. 14

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 - Solution

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

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 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

Queen s University Faculty of Arts and Science School of Computing CISC 432* / 836* Advanced Database Systems

Queen 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 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

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

DATABASE MANAGEMENT SYSTEMS

DATABASE 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 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

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

CMSC 461 Final Exam Study Guide

CMSC 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 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

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

CS 245 Final Exam Winter 2016

CS 245 Final Exam Winter 2016 CS 245 Final Exam Winter 2016 This exam is open book and notes. You can use a calculator. You can use your laptop only to access CS245 materials. You have 140 minutes (2 hours, 20 minutes) to complete

More information

MASSACHUSETTS INSTITUTE OF TECHNOLOGY

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Department of Electrical Engineering and Computer Science MASSACHUSETTS INSTITUTE OF TECHNOLOGY 6.814/6.830 Database Systems: Fall 2016 Quiz II There are 14 questions and?? pages in this quiz booklet.

More information

CSE 562 Final Exam Solutions

CSE 562 Final Exam Solutions CSE 562 Final Exam Solutions May 12, 2014 Question Points Possible Points Earned A.1 7 A.2 7 A.3 6 B.1 10 B.2 10 C.1 10 C.2 10 D.1 10 D.2 10 E 20 Bonus 5 Total 105 CSE 562 Final Exam 2014 Relational Algebra

More information

Goal of Concurrency Control. Concurrency Control. Example. Solution 1. Solution 2. Solution 3

Goal 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 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

Concurrency Control. R &G - Chapter 19

Concurrency Control. R &G - Chapter 19 Concurrency Control R &G - Chapter 19 Smile, it is the key that fits the lock of everybody's heart. Anthony J. D'Angelo, The College Blue Book Review DBMSs support concurrency, crash recovery with: ACID

More information

Concurrency Control. Chapter 17. Comp 521 Files and Databases Fall

Concurrency Control. Chapter 17. Comp 521 Files and Databases Fall Concurrency Control Chapter 17 Comp 521 Files and Databases Fall 2012 1 Conflict Serializable Schedules Recall conflicts (WR, RW, WW) were the cause of sequential inconsistency Two schedules are conflict

More information

Concurrency Control! Snapshot isolation" q How to ensure serializability and recoverability? " q Lock-Based Protocols" q Other Protocols"

Concurrency Control! Snapshot isolation q How to ensure serializability and recoverability?  q Lock-Based Protocols q Other Protocols Concurrency Control! q How to ensure serializability and recoverability? q Lock-Based Protocols q Lock, 2PL q Lock Conversion q Lock Implementation q Deadlock q Multiple Granularity q Other Protocols q

More information

Database Applications (15-415)

Database Applications (15-415) Database Applications (15-415) DBMS Internals- Part VI Lecture 14, March 12, 2014 Mohammad Hammoud Today Last Session: DBMS Internals- Part V Hash-based indexes (Cont d) and External Sorting Today s Session:

More information

Transactions and Concurrency Control

Transactions and Concurrency Control Transactions and Concurrency Control Computer Science E-66 Harvard University David G. Sullivan, Ph.D. Overview A transaction is a sequence of operations that is treated as a single logical operation.

More information

CS348: INTRODUCTION TO DATABASE MANAGEMENT (Winter, 2011) FINAL EXAMINATION

CS348: 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 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

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

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

Problem 1 (12P) Indicate whether each of the following statements is true or false; explain briey. a) In query optimization, it is always better to pe

Problem 1 (12P) Indicate whether each of the following statements is true or false; explain briey. a) In query optimization, it is always better to pe FINAL CSE 232, March 20, 2000 (open book) (Please print your name): FIRSTNAME: LASTNAME: TIME: You have 2 1/2 hours (150 minutes) to complete this exam. Problem Max. Points 1 12 2 10 3 28 4 12 5 15 6 16

More information

; Spring 2008 Prof. Sang-goo Lee (14:30pm: Mon & Wed: Room ) ADVANCED DATABASES

; Spring 2008 Prof. Sang-goo Lee (14:30pm: Mon & Wed: Room ) ADVANCED DATABASES 4541.564; Spring 2008 Prof. Sang-goo Lee (14:30pm: Mon & Wed: Room 302-208) ADVANCED DATABASES Syllabus Text Books Exams (tentative dates) Database System Concepts, 5th Edition, A. Silberschatz, H. F.

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

CISC437/637 Database Systems Final Exam

CISC437/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 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

Spring 2013 CS 122C & CS 222 Midterm Exam (and Comprehensive Exam, Part I) (Max. Points: 100)

Spring 2013 CS 122C & CS 222 Midterm Exam (and Comprehensive Exam, Part I) (Max. Points: 100) Spring 2013 CS 122C & CS 222 Midterm Exam (and Comprehensive Exam, Part I) (Max. Points: 100) Instructions: - This exam is closed book and closed notes but open cheat sheet. - The total time for the exam

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

What 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) 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 information

Final Review. CS634 May 11, Slides based on Database Management Systems 3 rd ed, Ramakrishnan and Gehrke

Final 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 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

Concurrency Control. Chapter 17. Comp 521 Files and Databases Spring

Concurrency Control. Chapter 17. Comp 521 Files and Databases Spring Concurrency Control Chapter 17 Comp 521 Files and Databases Spring 2010 1 Conflict Serializable Schedules Recall conflicts (WW, RW, WW) were the cause of sequential inconsistency Two schedules are conflict

More information

CS 245 Midterm Exam Winter 2014

CS 245 Midterm Exam Winter 2014 CS 245 Midterm Exam Winter 2014 This exam is open book and notes. You can use a calculator and your laptop to access course notes and videos (but not to communicate with other people). You have 70 minutes

More information

Transaction Management: Introduction (Chap. 16)

Transaction 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 information

Transaction Management

Transaction Management Transaction Management 1) Explain properties of a transaction? (JUN/JULY 2015) Transactions should posses the following (ACID) properties: Transactions should possess several properties. These are often

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

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

Data on External Storage

Data on External Storage Advanced Topics in DBMS Ch-1: Overview of Storage and Indexing By Syed khutubddin Ahmed Assistant Professor Dept. of MCA Reva Institute of Technology & mgmt. Data on External Storage Prg1 Prg2 Prg3 DBMS

More information

CISC437/637 Database Systems Final Exam

CISC437/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 information

Implementing Isolation

Implementing Isolation CMPUT 391 Database Management Systems Implementing Isolation Textbook: 20 & 21.1 (first edition: 23 & 24.1) University of Alberta 1 Isolation Serial execution: Since each transaction is consistent and

More information

Concurrency Control CHAPTER 17 SINA MERAJI

Concurrency Control CHAPTER 17 SINA MERAJI Concurrency Control CHAPTER 17 SINA MERAJI Announcement Sign up for final project presentations here: https://docs.google.com/spreadsheets/d/1gspkvcdn4an3j3jgtvduaqm _x4yzsh_jxhegk38-n3k/edit#gid=0 Deadline

More information

COSC-4411(M) Midterm #1

COSC-4411(M) Midterm #1 COSC-4411(M) Midterm #1 Sur / Last Name: Given / First Name: Student ID: Instructor: Parke Godfrey Exam Duration: 75 minutes Term: Winter 2004 Answer the following questions to the best of your knowledge.

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

McGill April 2009 Final Examination Database Systems COMP 421

McGill April 2009 Final Examination Database Systems COMP 421 McGill April 2009 Final Examination Database Systems COMP 421 Wednesday, April 15, 2009 9:00-12:00 Examiner: Prof. Bettina Kemme Associate Examiner: Prof. Muthucumaru Maheswaran Student name: Student Number:

More information

NJIT Department of Computer Science PhD Qualifying Exam on CS 631: DATA MANAGEMENT SYSTEMS DESIGN. Summer 2012

NJIT Department of Computer Science PhD Qualifying Exam on CS 631: DATA MANAGEMENT SYSTEMS DESIGN. Summer 2012 JIT Department of Computer Science PhD Qualifying Exam on CS 63: DATA MAAGEMET SYSTEMS DESIG Summer 202 o book or other document is allowed. Duration of the exam: 2.5 hours. The total number of points

More information

Final Exam CSE232, Spring 97, Solutions

Final Exam CSE232, Spring 97, Solutions T1 Final Exam CSE232, Spring 97, Solutions 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 r(a) Give

More information

Database System Concepts

Database System Concepts Chapter 13: Query Processing s Departamento de Engenharia Informática Instituto Superior Técnico 1 st Semester 2008/2009 Slides (fortemente) baseados nos slides oficiais do livro c Silberschatz, Korth

More information

Chapter 15 : Concurrency Control

Chapter 15 : Concurrency Control Chapter 15 : Concurrency Control What is concurrency? Multiple 'pieces of code' accessing the same data at the same time Key issue in multi-processor systems (i.e. most computers today) Key issue for parallel

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

COSC-4411(M) Midterm #1

COSC-4411(M) Midterm #1 12 February 2004 COSC-4411(M) Midterm #1 & answers p. 1 of 10 COSC-4411(M) Midterm #1 Sur / Last Name: Given / First Name: Student ID: Instructor: Parke Godfrey Exam Duration: 75 minutes Term: Winter 2004

More information

CS 347 Parallel and Distributed Data Processing

CS 347 Parallel and Distributed Data Processing CS 347 Parallel and Distributed Data Processing Spring 2016 Notes 5: Concurrency Control Topics Data Database design Queries Decomposition Localization Optimization Transactions Concurrency control Reliability

More information

Query Processing: The Basics. External Sorting

Query Processing: The Basics. External Sorting Query Processing: The Basics Chapter 10 1 External Sorting Sorting is used in implementing many relational operations Problem: Relations are typically large, do not fit in main memory So cannot use traditional

More information

Transaction Processing: Concurrency Control. Announcements (April 26) Transactions. CPS 216 Advanced Database Systems

Transaction Processing: Concurrency Control. Announcements (April 26) Transactions. CPS 216 Advanced Database Systems Transaction Processing: Concurrency Control CPS 216 Advanced Database Systems Announcements (April 26) 2 Homework #4 due this Thursday (April 28) Sample solution will be available on Thursday Project demo

More information

Database Applications (15-415)

Database Applications (15-415) Database Applications (15-415) DBMS Internals- Part VI Lecture 17, March 24, 2015 Mohammad Hammoud Today Last Two Sessions: DBMS Internals- Part V External Sorting How to Start a Company in Five (maybe

More information

Transaction Processing. Introduction to Databases CompSci 316 Fall 2018

Transaction Processing. Introduction to Databases CompSci 316 Fall 2018 Transaction Processing Introduction to Databases CompSci 316 Fall 2018 2 Announcements (Thu., Nov. 29) Homework #4 due next Tuesday Project demos sign-up instructions emailed Early in-class demos a week

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

Outline. Database Tuning. Join Strategies Running Example. Outline. Index Tuning. Nikolaus Augsten. Unit 6 WS 2014/2015

Outline. Database Tuning. Join Strategies Running Example. Outline. Index Tuning. Nikolaus Augsten. Unit 6 WS 2014/2015 Outline Database Tuning Nikolaus Augsten University of Salzburg Department of Computer Science Database Group 1 Examples Unit 6 WS 2014/2015 Adapted from Database Tuning by Dennis Shasha and Philippe Bonnet.

More information

Heckaton. SQL Server's Memory Optimized OLTP Engine

Heckaton. SQL Server's Memory Optimized OLTP Engine Heckaton SQL Server's Memory Optimized OLTP Engine Agenda Introduction to Hekaton Design Consideration High Level Architecture Storage and Indexing Query Processing Transaction Management Transaction Durability

More information

What happens. 376a. Database Design. Execution strategy. Query conversion. Next. Two types of techniques

What happens. 376a. Database Design. Execution strategy. Query conversion. Next. Two types of techniques 376a. Database Design Dept. of Computer Science Vassar College http://www.cs.vassar.edu/~cs376 Class 16 Query optimization What happens Database is given a query Query is scanned - scanner creates a list

More information

Consistent deals with integrity constraints, which we are not going to talk about.

Consistent deals with integrity constraints, which we are not going to talk about. Transactions Model: Begin xact Sql-1 Sql-2 Sql-n commit or abort Concurrency control (Isolation) Crash recovery (Atomic, Durable) Example: move $100 from acct-a to acct-b Atomic: all or nothing Durable:

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

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

CS6302- DATABASE MANAGEMENT SYSTEMS- QUESTION BANK- II YEAR CSE- III SEM UNIT I

CS6302- DATABASE MANAGEMENT SYSTEMS- QUESTION BANK- II YEAR CSE- III SEM UNIT I CS6302- DATABASE MANAGEMENT SYSTEMS- QUESTION BANK- II YEAR CSE- III SEM UNIT I 1.List the purpose of Database System (or) List the drawback of normal File Processing System. 2. Define Data Abstraction

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

CS 245 Final Exam Winter 2017

CS 245 Final Exam Winter 2017 CS 245 Final Exam Winter 2017 This exam is open book and notes. You can use a calculator and your laptop to access course notes and videos (but not to communicate with other people or to browse the Internet).

More information

Concurrency Control. Chapter 17. Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 1

Concurrency Control. Chapter 17. Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 1 Concurrency Control Chapter 17 Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 1 Conflict Schedules Two actions conflict if they operate on the same data object and at least one of them

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

Intro to Transactions

Intro to Transactions Reading Material CompSci 516 Database Systems Lecture 14 Intro to Transactions [RG] Chapter 16.1-16.3, 16.4.1 17.1-17.4 17.5.1, 17.5.3 Instructor: Sudeepa Roy Acknowledgement: The following slides have

More information

CSE 444: Database Internals. Lectures Transactions

CSE 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 information

Physical Disk Structure. Physical Data Organization and Indexing. Pages and Blocks. Access Path. I/O Time to Access a Page. Disks.

Physical Disk Structure. Physical Data Organization and Indexing. Pages and Blocks. Access Path. I/O Time to Access a Page. Disks. Physical Disk Structure Physical Data Organization and Indexing Chapter 11 1 4 Access Path Refers to the algorithm + data structure (e.g., an index) used for retrieving and storing data in a table The

More information

CS/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 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 information

Outline. Database Management and Tuning. Index Tuning Examples. Exercise 1 Query for Student by Name. Concurrency Tuning. Johann Gamper.

Outline. Database Management and Tuning. Index Tuning Examples. Exercise 1 Query for Student by Name. Concurrency Tuning. Johann Gamper. Outline Database Management and Tuning Johann Gamper 1 Free University of Bozen-Bolzano Faculty of Computer Science IDSE Unit 7 2 3 Conclusion Acknowledgements: The slides are provided by Nikolaus Augsten

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

Deadlock Prevention (cont d) Deadlock Prevention. Example: Wait-Die. Wait-Die

Deadlock Prevention (cont d) Deadlock Prevention. Example: Wait-Die. Wait-Die Deadlock Prevention Deadlock Prevention (cont d) 82 83 When there is a high level of lock contention and an increased likelihood of deadlocks Prevent deadlocks by giving each Xact a priority Assign priorities

More information

CMPUT 391 Database Management Systems. Query Processing: The Basics. Textbook: Chapter 10. (first edition: Chapter 13) University of Alberta 1

CMPUT 391 Database Management Systems. Query Processing: The Basics. Textbook: Chapter 10. (first edition: Chapter 13) University of Alberta 1 CMPUT 391 Database Management Systems Query Processing: The Basics Textbook: Chapter 10 (first edition: Chapter 13) Based on slides by Lewis, Bernstein and Kifer University of Alberta 1 External Sorting

More information

Introduction to Query Processing and Query Optimization Techniques. Copyright 2011 Ramez Elmasri and Shamkant Navathe

Introduction to Query Processing and Query Optimization Techniques. Copyright 2011 Ramez Elmasri and Shamkant Navathe Introduction to Query Processing and Query Optimization Techniques Outline Translating SQL Queries into Relational Algebra Algorithms for External Sorting Algorithms for SELECT and JOIN Operations Algorithms

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

Concurrency Control. [R&G] Chapter 17 CS432 1

Concurrency Control. [R&G] Chapter 17 CS432 1 Concurrency Control [R&G] Chapter 17 CS432 1 Conflict Serializable Schedules Two schedules are conflict equivalent if: Involve the same actions of the same transactions Every pair of conflicting actions

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

Outline. Database Management and Tuning. Outline. Join Strategies Running Example. Index Tuning. Johann Gamper. Unit 6 April 12, 2012

Outline. Database Management and Tuning. Outline. Join Strategies Running Example. Index Tuning. Johann Gamper. Unit 6 April 12, 2012 Outline Database Management and Tuning Johann Gamper Free University of Bozen-Bolzano Faculty of Computer Science IDSE Unit 6 April 12, 2012 1 Acknowledgements: The slides are provided by Nikolaus Augsten

More information

Administração e Optimização de Bases de Dados 2012/2013 Index Tuning

Administração e Optimização de Bases de Dados 2012/2013 Index Tuning Administração e Optimização de Bases de Dados 2012/2013 Index Tuning Bruno Martins DEI@Técnico e DMIR@INESC-ID Index An index is a data structure that supports efficient access to data Condition on Index

More information

Concurrency Control. Conflict Serializable Schedules. Example. Chapter 17

Concurrency Control. Conflict Serializable Schedules. Example. Chapter 17 Concurrency Control Chapter 17 Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 1 Conflict Serializable Schedules Two schedules are conflict equivalent if: Involve the same actions of the

More information

Database Systems. Announcement

Database 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 information

Database Applications (15-415)

Database Applications (15-415) Database Applications (15-415) The Entity Relationship Model Lecture 2, January 12, 2016 Mohammad Hammoud Today Last Session: Course overview and a brief introduction on databases and database systems

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

Chapter 12: Query Processing. Chapter 12: Query Processing

Chapter 12: Query Processing. Chapter 12: Query Processing Chapter 12: Query Processing Database System Concepts, 6 th Ed. See www.db-book.com for conditions on re-use Chapter 12: Query Processing Overview Measures of Query Cost Selection Operation Sorting Join

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

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

CS 245 Midterm Exam Solution Winter 2015

CS 245 Midterm Exam Solution Winter 2015 CS 245 Midterm Exam Solution Winter 2015 This exam is open book and notes. You can use a calculator and your laptop to access course notes and videos (but not to communicate with other people). You have

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

Database System Concepts, 6 th Ed. Silberschatz, Korth and Sudarshan See for conditions on re-use

Database System Concepts, 6 th Ed. Silberschatz, Korth and Sudarshan See  for conditions on re-use Chapter 11: Indexing and Hashing Database System Concepts, 6 th Ed. See www.db-book.com for conditions on re-use Chapter 12: Indexing and Hashing Basic Concepts Ordered Indices B + -Tree Index Files Static

More information

CPSC 421 Database Management Systems. Lecture 19: Physical Database Design Concurrency Control and Recovery

CPSC 421 Database Management Systems. Lecture 19: Physical Database Design Concurrency Control and Recovery CPSC 421 Database Management Systems Lecture 19: Physical Database Design Concurrency Control and Recovery * Some material adapted from R. Ramakrishnan, L. Delcambre, and B. Ludaescher Agenda Physical

More information

Storage hierarchy. Textbook: chapters 11, 12, and 13

Storage hierarchy. Textbook: chapters 11, 12, and 13 Storage hierarchy Cache Main memory Disk Tape Very fast Fast Slower Slow Very small Small Bigger Very big (KB) (MB) (GB) (TB) Built-in Expensive Cheap Dirt cheap Disks: data is stored on concentric circular

More information