0% found this document useful (0 votes)
16 views

DBMS MakeUP-ST2 Solution 2024-25

This document outlines the structure and content of a sessional examination for B Tech students in various computer science branches at Meerut Institute of Engineering and Technology. It includes questions on database management systems (DBMS), focusing on normalization techniques, transaction processing, and distributed databases. The exam consists of short and medium answer type questions covering various concepts such as functional dependencies, transaction properties, and concurrency control.

Uploaded by

tushar.jangid171
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views

DBMS MakeUP-ST2 Solution 2024-25

This document outlines the structure and content of a sessional examination for B Tech students in various computer science branches at Meerut Institute of Engineering and Technology. It includes questions on database management systems (DBMS), focusing on normalization techniques, transaction processing, and distributed databases. The exam consists of short and medium answer type questions covering various concepts such as functional dependencies, transaction properties, and concurrency control.

Uploaded by

tushar.jangid171
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Roll No.: …………………………………….

MEERUT INSTITUTE OF ENGINEERING AND TECHNOLOGY


NH-58, Delhi-Roorkee Highway, Baghpat Road, Meerut – 250 005 U.P.
Sessional Examination / Class Test – II: Even Semester 2024-25
Course/Branch : B Tech – CSE/IT/CSIT/AI&AIML/IOT/DS Semester :V
Subject Name : DBMS Max. Marks : 60
Subject Code : BCS-501 Time : 120 min
CO-3 : Apply normalization techniques.
CO-4 : Examine the concepts of transaction processing and distributed database.
Section – A (CO - 3) # Attempt both the questions # 30 Marks

Q.1: Attempt any SIX questions (Short Answer Type). Each question is of two marks. (2 x 6 = 12 Marks)

a) Define the need the normalize database. (BKL: K1 Level).

Ans: Normalization: Reduces redundancy and maintains data integrity by organizing


data into structured tables.

b) List all prime and non-prime attributes In Relation R (A, B, C, D, E) with


(BKL: K1 Level).
FD set F = {AB→C, B→E, C→D}.

Ans: Prime Attributes: A, B Non-Prime Attributes: C, D, E

c) List the various anomalies associated with RDBMS. (BKL: K1 Level).

Ans: Insertion Anomaly: Issues when adding data with missing details.
Deletion Anomaly: Unintended data loss during deletion.
Update Anomaly: Inconsistent data after updates.

d) Discuss functional dependencies in database design, and how do they


(BKL: K2 Level).
influence the process of normalization? Provide examples.

Ans: Functional Dependencies (FDs) link attributes, ensuring uniqueness. They aid in
normalization to reduce redundancy.
Example:
 StudentID → Course
 Course → Instructor

e) Explain inclusion dependency relate to referential integrity in databases?


(BKL: K2 Level).
Provide an example demonstrating inclusion dependency.

Ans: Inclusion dependency ensures values in one relation's column are subsets of
values in another column, maintaining referential integrity.
Example: Dept in Employee must exist in Department_id.
Department_id (Dept)
101
102
EmployeeID Dept
1 101

f) Describe Armstrong’s axioms in detail. List the role of these rules in


(BKL: K2 Level).
database development process.
Ans: Armstrong’s Axioms:
Reflexivity: X→Y if 𝑌⊆𝑋
Augmentation: X→Y implies XZ→YZ.
Transitivity: X→Y, Y→Z implies X→Z.
Union: X→Y, X→Z implies X→YZ.
Decomposition: X→YZ implies X→Y and X→Z.
Pseudo-Transitivity: X→Y, YZ→W implies X→W.
Role in Database Development:
Normalization: Identifies FDs for reducing redundancy.
Data Integrity: Ensures consistent data.
Schema Design: Helps create efficient schemas.
Query Optimization: Aids in query efficiency.
Enforcing Constraints: Defines integrity constraints.

g) Discuss BCNF (Boyce-Codd Normal Form), and how does it differ from
(BKL: K2 Level).
3NF? Provide an example of a table violating BCNF and its decomposition.

Ans: BCNF is a stricter version of 3NF where every determinant must be a


candidate key. It resolves anomalies not addressed by 3NF.
Violation of BCNF:
Course Instructor Time
Math Dr. Smith Morning
Math Dr. Brown Evening
Course → Instructor violates BCNF as Course is not a candidate key.
BCNF Decomposition:
Course Time
Math Morning
Math Evening
Course Instructor
Math Dr. Smith
Math Dr. Brown

(3 x 6 = 18
Q.2: Attempt any THREE questions (Medium Answer Type). Each question is of 6 marks.
Marks)

a) Describe the term MVD in the context of DBMS by giving an example. (BKL: K2
Explain 4NF and 5NF with the example. Level).

Ans: Multivalued Dependency (MVD): MVD: When one attribute determines multiple
values of another attribute.
4th Normal Form (4NF): Definition: Eliminates multivalued dependencies.
Example: Split StudentCourses and StudentHobbies tables to remove redundancy.
5th Normal Form (5NF): Definition: Eliminates join dependencies.
Example: Split Students, CoursesInstructors, and StudentsInstructors tables to
remove redundancy.
b) Discuss the transitive dependencies. Explain with an example any two
(BKL: K2
problems that can arise in the database if transitive dependencies are present
Level).
in the database.

Ans: Transitive Dependencies: Occur when non-prime attributes depend on other non-
prime attributes via a chain of dependencies.
Problems:
Data Redundancy: Duplicate data entries.
Update Anomalies: Inconsistent updates across the database

c) Generalize Functional Dependency. Explain the procedure of calculating the (BKL: K3


Canonical Cover of a given Functional Dependency Set with suitable example. Level).

Ans: A functional dependency (FD) shows how one attribute (determinant) uniquely
determines another (dependent). A canonical cover simplifies FDs while keeping
the same closure.
Steps:
Remove redundant: Eliminate derivable FDs.
Remove partial: Remove FDs with non-candidate key determinants.
Remove transitive: Remove FDs with indirect dependencies.
Single determinant: Ensure one determinant per FD.
Single dependent: Ensure one dependent per FD.
Example: Given FDs:
A→B, B→C, A→C, AB→D, B→E
Canonical cover:
A→B, B→E, AB→D

d) Solve a relation R (A, B, C, D, E) with set F= {A→CD, C→B, B→AE} What


(BKL: K4
are the prime attributes of this Relation and Decompose the given relation in
Level).
3NF.

Ans:

e) Recognize the loss-less decomposition. Explain with suitable example how


Creativity
function dependencies can be used to show that decompositions are loss-less.
Ans: Lossless Join Decomposition ensures the original relation can be recovered from
the decomposed relations.
Conditions:
1. Att(R1∪Att(R2) =Att(R).
2. Att(R1) ∩Att(R2) ≠∅
3. The common attribute must be a key in at least one relation.
Example 1:
Decomposition R (A, B, C, D) R (A, B, C, D) R (A, B, C, D) into
R1(ABC)R_1(ABC)R1(ABC) and R2(AD)R_2(AD)R2(AD) is lossless.
Example 2:
Decomposition R (A, B, C, D) R (A, B, C, D) R (A, B, C, D) into R1(A, B) R_1(A,
B) R1(A, B) and R2(C, D) R_2(C, D) R2(C, D) is lossy (intersection is empty).

Section – B (CO - 4) # Attempt both the questions # 30 Marks

(2 x 6 = 12
Q.3: Attempt any SIX questions (Short Answer Type). Each question is of two marks.
Marks)

a) Define dirty read problem. (BKL: K1 Level).

Ans: The dirty read problem occurs when one transaction reads a value updated by
another transaction that later fails, leading to uncommitted, incorrect data.

b) Define concurrency control. Why it is needed in database system (BKL: K1 Level).

Ans: Concurrency control manages the execution of simultaneous transactions in a


DBMS to prevent data inconsistencies and ensure correct updates.
Concurrency Control ensures correct data updates in DBMS by preventing:
1. Lost Update: One transaction overwrites another's value.
2. Dirty Read: A transaction reads an aborted value.

c) Define transaction in a database system? Explain the ACID properties that


(BKL: K2 Level).
ensure transaction reliability and consistency

Ans: A transaction is a sequence of database operations treated as a single unit. The


ACID properties ensure reliability:
 Atomicity: All-or-nothing execution.
 Consistency: Transition between valid states.
 Isolation: Transactions don't interfere.
 Durability: Committed changes are permanent.

d) Explain the concept of conflict serializability and how it can be tested using
(BKL: K2 Level).
a precedence graph.

Ans: Conflict serializability means a schedule can be reordered to a serial one while
preserving conflict relations. A precedence graph tests this:
1. Nodes represent transactions.
2. Directed edges show conflict relationships.
3. A cycle indicates the schedule isn’t conflict serializable; no cycle means
it is.

e) Explain data fragmentation with types. (BKL: K2 Level).


Ans: Fragmentation divides a relation for parallel query execution:
1. Vertical: Splits by columns, including the primary key.
2. Horizontal: Splits by rows, with subsets of tuples.

f) Mention possible outcomes if a transaction fail. (BKL: K2 Level).

Ans: Transaction failure outcomes:


1. Rollback: Undo changes to restore consistency.
2. Cascading Rollback: Roll back dependent transactions.
3. Partial Update: Inconsistent state due to incomplete updates.
4. Log Recovery: Use logs to redo/undo operations.
5. Restart: Retry failed transactions after resolving issues.

g) Write short note on deadlock prevention protocols. (BKL: K2 Level).

Ans: Deadlock occurs when transactions wait on each other. Prevention methods
include:
1. Predeclaration: Lock all items before execution.
2. Graph-based Protocol: Lock items in a set order.
Timestamp schemes:
 Wait-Die: Older wait for younger; younger are rolled back.
 Wound-Wait: Older force younger to roll back; younger wait.

(3 x 6 = 18
Q.4: Attempt any THREE questions (Medium Answer Type). Each question is of 6 marks.
Marks)

a) Explain a transaction in a database system with the help of diagram. (BKL: K2 Level).

Ans: A transaction is a set of operations forming a single unit of work, involving:


1. Read: Accessing data.
2. Write: Modifying data.
Transaction States:
1. Active: Transaction is in progress.
2. Partially Committed: Operations complete, changes not permanent.
3. Committed: Changes are permanent.
4. Failed: Error prevents completion.
5. Aborted: Transaction rolled back.
6. Terminated: Transaction ends.
Daigram

b) Describe the types of schedules in transaction management with a suitable


(BKL: K2 Level).
example.
Ans:

c) Generalize recoverable schedule, and why is it important in a database


(BKL: K3 Level).
system. Explain the concept of recovery from transaction failures.

Ans: Recoverable schedule: Prevents reading uncommitted data, ensuring


consistency.
Importance: Maintains database integrity during transaction failures.
Recovery:
 Rollback: Undo changes from failed transactions.
 Log-based recovery: Use logs to redo or undo operations.
 Checkpointing: Minimize rollback costs by saving a known state.

d) Conclude Both Serial and Interleaved Transactions Must Adhere to ACID. (BKL: K4 Level).

Ans: Both serial and interleaved transactions must adhere to ACID properties to ensure
database reliability and consistency:
 Atomicity: Transactions must be all-or-nothing, regardless of serial or
interleaved execution.
 Consistency: The database must move from one valid state to another
after any transaction.
 Isolation: Even interleaved transactions must not interfere with each
other, ensuring results are consistent as if executed serially.
 Durability: Committed transactions' changes must be permanent, no
matter the execution order.
This ensures data integrity, regardless of transaction execution type.

e) Explain the difference between conflict serializability and view serializability


with respect to a schedule. Can a schedule be view serializable but not Creativity
conflict serializable? Justify your answer.

Ans: Conflict serializability: A schedule is conflict serializable if it can be reordered


to a serial schedule by preserving conflict relationships between transactions.
View serializability: A schedule is view serializable if it can be reordered to a
serial schedule where transactions see the same data items in the same order.
Yes, a schedule can be view serializable but not conflict serializable because view
serializability is a broader concept, allowing more flexibility in transaction
reordering.
=============================================

You might also like