Sample Final: CS143. ©Silberschatz, Korth and Sudarshan7.2Database System Concepts A schedule T0T1T2 write(A) read(B) write(B) read(A) write(A) Request.

Slides:



Advertisements
Similar presentations
Cs4432concurrency control1 CS4432: Database Systems II Lecture #23 Concurrency Control Professor Elke A. Rundensteiner.
Advertisements

Cs4432concurrency control1 CS4432: Database Systems II Lecture #22 Concurrency Control: Locking-based Protocols Professor Elke A. Rundensteiner.
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 Concurrency Control Chapter 17 Sections
V. Megalooikonomou Concurrency Control – Deadlocks (based on slides by C. Faloutsos at CMU and on notes by Silberchatz,Korth, and Sudarshan) Temple University.
Review for Final Test Indra Budi
CS4432: Database Systems II Lecture #26 Concurrency Control and Recovery Professor Elke A. Rundensteiner.
©Silberschatz, Korth and Sudarshan16.1Database System Concepts 3 rd Edition Chapter 16: Concurrency Control Lock-Based Protocols Timestamp-Based Protocols.
Concurrency Control R&G - Chapter 17 Smile, it is the key that fits the lock of everybody's heart. Anthony J. D'Angelo, The College Blue Book.
Concurrency Control. Example Schedules Constraint: The sum of A+B must be the same Before: After: T1 read(A) A = A -50 write(A) read(B)
1 Review #1 l Intro stuff –What is a database, 4 parts, 3 users, etc. l Architecture –Data independence –Three levels, two mappings –Jobs of the DBA.
Chapter 7 Transactions 7.1 Transaction Concept 7.2 Transaction State 7.3 Implementation of Atomicity and Durability 7.4 Concurrent Executions 7.5 Serializability.
Normal Form Design addendum by C. Zaniolo. ©Silberschatz, Korth and Sudarshan7.2Database System Concepts Normal Form Design Compute the canonical cover.
©Silberschatz, Korth and Sudarshan15.1Database System ConceptsTransactions Transaction Concept Transaction State Implementation of Atomicity and Durability.
Transactions or Concurrency Control. Introduction A program which operates on a DB performs 2 kinds of operations: –Access to the Database (Read/Write)
Transactions. Definitions Transaction (program): A series of Read/Write operations on items in a Database. Example: Transaction 1 Read(C) Read(A) Write(A)
Database Management Systems I Alex Coman, Winter 2006
Cs4432concurrency control1 CS4432: Database Systems II Concurrency Control with Recovery.
©Silberschatz, Korth and Sudarshan15.1Database System Concepts Chapter 15: Transactions Transaction Concept Transaction State Implementation of Atomicity.
©Silberschatz, Korth and Sudarshan15.1Database System Concepts Chapter 15: Transactions Transaction Concept Transaction State Implementation of Atomicity.
©Silberschatz, Korth and Sudarshan16.1Database System Concepts 3 rd Edition Chapter 16: Concurrency Control Lock-Based Protocols Timestamp-Based Protocols.
CS4432transaction management1 CS4432: Database Systems II Lecture #23 Transaction Management Professor Elke A. Rundensteiner.
Cs4432concurrency control1 CS4432: Database Systems II Concurrency Control.
Concurrency Control. General Overview Relational model - SQL  Formal & commercial query languages Functional Dependencies Normalization Transaction Processing.
©Silberschatz, Korth and Sudarshan3.1Database System Concepts - 6 th Edition SQL Schema Changes and table updates instructor teaches.
Chapter 181 Chapter 18: Concurrency Control (Slides by Hector Garcia-Molina,
Cs4432concurrency control1 CS4432: Database Systems II Lecture #22 Concurrency Control: Locking-based Protocols Professor Elke A. Rundensteiner.
Database System Concepts, 6 th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com Chapter 14: Transactions.
Transactions Sylvia Huang CS 157B. Transaction A transaction is a unit of program execution that accesses and possibly updates various data items. A transaction.
TRANSACTIONS. Objectives Transaction Concept Transaction State Concurrent Executions Serializability Recoverability Implementation of Isolation Transaction.
©Silberschatz, Korth and Sudarshan1Database System Concepts - 6 th Edition E-R Diagram for a University Enterprise.
Database System Concepts, 5th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com Chapter 15: Transactions.
Lecture 7- Transactions Advanced Databases Masood Niazi Torshiz Islamic Azad University- Mashhad Branch
Database System Concepts, 5th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com Chapter 15: Transactions.
Database System Concepts, 5th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com Chapter 15: Transactions.
©Silberschatz, Korth and Sudarshan14.1Database System Concepts - 6 th Edition UNIT 5 :Transactions Transaction concepts, properties of transactions, serializability.
Transactions CPSC 356 Database Ellen Walker Hiram College (Includes figures from Database Systems by Connolly & Begg, © Addison Wesley 2002)
Concurrency control. Lock-based protocols One way to ensure serializability is to require the data items be accessed in a mutually exclusive manner One.
TRANSACTION MANAGEMENT R.SARAVANAKUAMR. S.NAVEEN..
Database System Concepts ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com Chapter 15: Transactions.
©Silberschatz, Korth and Sudarshan15.1Database System Concepts Chapter 15: Transactions Transaction Concept Transaction State Implementation of Atomicity.
©Silberschatz, Korth and Sudarshan15.1Database System Concepts Chapter 15: Transactions Transaction Concept Transaction State Implementation of Atomicity.
PMIT-6102 Advanced Database Systems By- Jesmin Akhter Assistant Professor, IIT, Jahangirnagar University.
Database System Concepts, 6 th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com Chapter 14: Transactions.
1 CS542 Concurrency Control: Theory and Protocol Professor Elke A. Rundensteiner.
©Silberschatz, Korth and Sudarshan14.1Database System Concepts - 6 th Edition Chapter 14: Transactions Transaction Concept Transaction State Concurrent.
1 Concurrency Control Lecture 22 Ramakrishnan - Chapter 19.
Transaction Management Overview. Transactions Concurrent execution of user programs is essential for good DBMS performance. – Because disk accesses are.
Concurrency Control Introduction Lock-Based Protocols
Lecture 8- Concurrency Control Advanced Databases Masood Niazi Torshiz Islamic Azad university- Mashhad Branch
Database System Concepts, 6 th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com Chapter 14: Transactions.
1 Database Systems ( 資料庫系統 ) December 27, 2004 Chapter 17 By Hao-hua Chu ( 朱浩華 )
Transaction Management Exercises I/O and CPU activities can be and are overlapped to minimize (disk and processor) idle time and to maximize throughput.
Database System Concepts, 6 th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com Chapter 15 : Concurrency.
CS 440 Database Management Systems Concurrency Control 1.
CS 540 Database Management Systems Concurrency Control 1.
Transaction Properties
בקרת בו זמניות (concurrency control)
Concurrency Control 11/22/2018.
Transactions Sylvia Huang CS 157B.
Chapter 10 Transaction Management and Concurrency Control
Yan Huang - CSCI5330 Database Implementation – Concurrency Control
Final Review Datalog (Ch 10) Rules and queries
Cse 344 June 1st – Final Review.
Concurrency Control R&G - Chapter 17
Transaction Management
Review #1 Intro stuff What is a database, 4 parts, 3 users, etc.
Lecture 18: Concurrency Control
Presentation transcript:

Sample Final: CS143

©Silberschatz, Korth and Sudarshan7.2Database System Concepts A schedule T0T1T2 write(A) read(B) write(B) read(A) write(A) Request a lock on A and abort read(C) write(C) read(D)

©Silberschatz, Korth and Sudarshan7.3Database System ConceptsQuestions Draw the precedence graph and list all the equivalent serial schedules for the transactions which completed. Which of the following policies could have generated this schedule?  A 2PL protocol? (show a complete schedule with the lock-X,lock-S and unlock for each resource)  2PL with wait-die deadlock prevention strategy?  Cascading of rollbacks to kill transactions that performed ‘dirty reads’

©Silberschatz, Korth and Sudarshan7.4Database System Concepts Normal Form Design We have a relation schema R(C, S, J, D, P, Q, V ) with the following FDs: 1. C  CSJDPQV 2. JP  C 3. SD  P 4. J  S Use the 3NF design algorithm to design a 3NF schema that  has the lossless-join property  and a minimal relation count (show the steps)  Is the resulting schema BCNF (explain your answer)?

©Silberschatz, Korth and Sudarshan7.5Database System Concepts Give the ER Diagram from which the following 3NF relations could have been produced Course(CName, Level, D#), Dept( D#, Chair, School), Class( CName, Section, Year, Quarter, Enrollment) Now assume that currently there are 20 schools, 100 departments, 4000 different courses, and two sections for each course. Every school offers some courses. Indicate what primary and secondary indices should be created to support the following two queries efficiently: Q1: Find the chair of the department offering a given course, Q2: Finds all courses offered in a given school. Estimate the average number of tuples produced by Q2.

©Silberschatz, Korth and Sudarshan7.6Database System Concepts Extra Credit On the average, should you expect fewer rollbacks with the wait-die protocol or the wound-wait protocol? (Justify your answer)