CSC265 · TU past paper
Database Management System 2076 question paper
The complete TU 2076 exam paper for Database Management System (CSC265), all 12 questions with solved model answers written to the mark scheme.
Tap a question to open its answer.
- Q1.10 marksAdvantages of Using the DBMS ApproachHideAnswer
What are the advantages of using Database Management System over traditional filing system? Explain different data models with example.[10]
- Q2.10 marksTwo-Phase Locking TechniqueHideAnswer
What is concurrency control? Name various methods of controlling the concurrency control? Differentiate between Binary lock and shared/Exclusive lock.[10]
- Q3.10 marksNormal Forms Based on Primary KeysHideAnswer
What is normal form? Explain their types. Explain about loss-less join decomposition.[10]
- Q4.5 marksThree-Schema Architecture and Data IndepenHideAnswer
What is data abstraction? What are three levels of data abstraction? Explain. [5]
- Q5.5 marksEntity Types, Entity Sets, Attributes, andHideAnswer
What is difference between Entities and Entity sets? Explain with example. [5]
- Q6.5 marksData Definition and Data TypesHideAnswer
Create two table Courses (CID, Course, Dept) and HoD (Dept, Head) using SQL language with all constraints [Primary key, Foreign key and Referential Integrity]. Assume the types of attributes by your own. [5]
- Q7.5 marksRelational Model Constraints and RelationaHideAnswer
Differentiate between Integrity and Security with example. [5]
- Q8.5 marksCharacterizing Schedules Based on SerializHideAnswer
Define schedule and serializability. How can you test the serializability? [5]
Schedule and Serializability
Schedule
A schedule (also called a history) is an ordering of the operations from a set of concurrent transactions, where the operations of each individual transaction appear in the same order as they do in that transaction. A schedule defines the sequence in which operations (read, write, commit, abort) from multiple transactions are interleaved and executed by the DBMS.
Example: If T1 and T2 are two transactions, a possible schedule S could be:
S: R1(X) → R2(X) → W1(X) → W2(X)
Serializability
A concurrent schedule is said to be serializable if its final result (effect on the database) is totally the same as the final result produced by some serial schedule (where transactions execute one after another without interleaving).
Since serial schedules are always considered correct (no concurrency issues), any serializable schedule is also considered correct.
There are two types of serializable schedules:
1. Conflict Serializable
A schedule is conflict serializable if it can be transformed into a serial schedule by swapping non-conflicting operations.
2. View Serializable
A schedule is called view serializable if its view equals that of a serial schedule (no overlapping transactions). A conflict serializable schedule is always view serializable, but if the schedule contains blind writes, it may be view serializable without being conflict serializable.
Testing for Serializability (Precedence Graph Method)
The most common method to test conflict serializability uses a Precedence Graph (also called a serialization graph).
Algorithm:
- Look at only
read_Item(X)andwrite_Item(X)operations in the schedule. - Construct a precedence graph -- a directed graph where each transaction Ti is a node.
- Draw a directed edge from Ti to Tj if one of the operations in Ti appears before a conflicting operation in Tj. Two operations conflict if:
- They belong to different transactions
- They access the same data item X
- At least one of them is a write
- The schedule is conflict serializable if and only if the precedence graph has NO cycles.
Example:
Consider Schedule S with transactions T1 and T2:
S: R1(X) → W2(X) → W1(X) → R2(Y) → W2(Y)Conflict Detected Edge R1(X) before W2(X) T1 → T2 W2(X) before W1(X) T2 → T1 Precedence Graph:
T1 -----> T2 T2 -----> T1 (CYCLE EXISTS)Since a cycle exists, this schedule is NOT conflict serializable.
Summary Table
Property Meaning Serial Schedule Transactions execute one after another (always correct) Serializable Schedule Equivalent in result to some serial schedule Test Method Precedence graph -- no cycle = serializable - Look at only
- Q9.5 marksTwo-Phase Locking TechniqueHideAnswer
What is Granularity of data items? How does it effect in concurrency control? [5]
- Q10.5 marksTwo-Phase Locking TechniqueHideAnswer
Explain 2 phase locking technique in brief. [5]
- Q11.5 marksRecovery ConceptsHideAnswer
What are the different approaches of Database recover? What should log file maintain in log-based recovery? [5]
- Q12.5 marksRelational Model Constraints and RelationaHideAnswer
Explain the use of primary and foreign key in DBMS with example. What is the role of foreign key? [5]