CSC265 · TU past paper
Database Management System 2078 question paper
The complete TU 2078 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.
- 110 marksActors on the SceneHideAnswer
What are different types of Database users and their roles? Explain the Data independence with example.[10]
--- A database typically has many types of users, each of whom may require a different perspective or view of the database. A view may be a subset of the database or it may contain virtual data. Since a multiuser DBMS serves users with a...
- 210 marksER Diagrams, Naming Conventions, and DesigHideAnswer
What are the components of ER diagram? Explain the function of various symbols use in ER diagram. Construct an ER diagram to store data in a library of your college.[10]
An ER (Entity-Relationship) diagram helps to explain the logical structure of a database. It includes many specialized symbols, and their meanings make this model unique. The purpose of an ER diagram is to represent the entity framework ...
- 310 marksTimestamp OrderingHideAnswer
Explain deadlock and starvation. Explain Time stamp based protocol for concurrency control?[10]
--- Deadlock is a situation in a database system where two or more transactions are waiting indefinitely for each other to release locks on data items, so that none of them can ever proceed. - Transaction T1 holds a lock on item X and wa...
- 45 marksThree-Schema Architecture and Data IndepenHideAnswer
What is difference between logical data independence and physical data independence? [5]
The capacity to change the schema at one level of a database system without having to change the schema at the next higher level is called data independence. It is one of the major advantages of using a DBMS and is directly related to th...
- 55 marksRelationship Types, Relationship Sets, RolHideAnswer
Explain Relationship and Relationship sets with example. [5]
A relationship is an association among two or more entities. It describes how entities from different entity sets are related to each other in the real world. For example, an employee works for a department. Here, "works for" is a relati...
- 65 marksBasic Retrieval QueriesHideAnswer
Retirve the TName, SName, SPhone for “ABC” school using SQL from given relation as below. [5]
The question asks to retrieve TName (Teacher Name), SName (Student Name), and SPhone (Student Phone) for the school named "ABC" using SQL. To answer this, we assume the following relational schema (standard school database relations): --...
- 75 marksRelational Model Constraints and RelationaHideAnswer
What is integrity? Explain different types of database integrity. [5]
Database integrity refers to the accuracy, consistency, and correctness of data stored in a database. It ensures that the data in the database remains valid and reliable throughout its lifecycle. Integrity constraints are rules or condit...
- 85 marksFunctional DependenciesHideAnswer
Define Functional dependencies. Explain trivial and non trivial dependencies? [5]
A functional dependency is a constraint between two sets of attributes in a relation. For a relation R, a functional dependency is denoted as: X → Y This means attribute (or set of attributes) X functionally determines attribute (or set ...
- 95 marksBinary Relational OperationsHideAnswer
Explain the difference between 'Join' and 'Natural Join' of algebraic operations with example. [5]
A Join operation combines tuples from two relations based on a specified condition (called a join predicate). The condition is explicitly stated by the user and can involve any comparison operator (=, <, , <=, =, !=). - The joining attri...
- 105 marksRecovery ConceptsHideAnswer
What is Checkpoints in database recovery? How does it help in database recovery? Explain. [5]
A checkpoint is a special type of entry written to the transaction log that acts as a bookmark or synchronization point in the database system. It is a mechanism where all previous log records are permanently stored to disk, and the DBMS...
- 115 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 interleaved execution sequence of operations (read, write, commit, abort) from multiple transactions.
Types of Schedules:
- Serial Schedule: Transactions execute one after another with no interleaving. If there are n transactions, there are n! possible serial schedules.
- Non-Serial (Concurrent) Schedule: Operations from multiple transactions are interleaved.
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 of the same transactions. In other words, even though transactions execute concurrently with interleaved operations, the outcome must be equivalent to some sequential (serial) execution.
Serializability ensures correctness of concurrent execution while maximizing resource utilization and efficiency.
Types of Serializability
-
Conflict Serializability: A schedule is conflict serializable if it can be transformed into a serial schedule by swapping non-conflicting operations.
-
View Serializability: A schedule is view serializable if its view equals that of a serial schedule (no overlapping transactions). Every conflict serializable schedule is view serializable, but if a schedule contains blind writes, it may be view serializable without being conflict serializable.
Testing for Serializability (Precedence Graph Method)
The standard method to test conflict serializability uses a Precedence Graph (also called a Serialization Graph):
Algorithm:
-
Consider only
read_Item(X)andwrite_Item(X)operations from the schedule. -
Construct a Precedence Graph:
- Nodes represent each transaction T1, T2, ..., Tn.
- A directed edge is drawn from Ti → Tj if an operation in Ti appears before a conflicting operation in Tj.
-
Conflicting operations occur when:
- Two transactions access the same data item X, AND
- At least one of them is a write operation.
- Cases: read(X) then write(X), write(X) then read(X), write(X) then write(X).
-
Check for cycles:
- If the precedence graph has no cycle → the schedule is conflict serializable.
- If the precedence graph has a cycle → the schedule is NOT serializable.
Example:
Step T1 T2 1 read(X) 2 read(X) 3 write(X) 4 write(X) - T1 writes X before T2 writes X → edge T1 → T2
- T1 reads X before T2 writes X → edge T1 → T2
- T2 reads X before T1 writes X → edge T2 → T1
This creates a cycle (T1 → T2 → T1), so the schedule is NOT serializable.
Summary: Serializability is the key correctness criterion for concurrent transaction execution in DBMS. The precedence graph (no cycle = serializable) is the standard test for conflict serializability.
- 125 marksBoyce-Codd Normal FormHideAnswer
Define Boyce-Codd normal form with example. How it is different that 3rd Normal form. [5]
Boyce-Codd Normal Form (BCNF) is a stronger version of the Third Normal Form (3NF). A relation R is in BCNF if and only if for every non-trivial functional dependency X → Y, X must be a superkey (i.e., X must be a candidate key or a supe...