0% found this document useful (0 votes)
40 views10 pages

DBMS Esa Model

Uploaded by

shuvronil562
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)
40 views10 pages

DBMS Esa Model

Uploaded by

shuvronil562
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/ 10

Group A:( 2 marks each)

1. What are the key benefits of using conceptual data models in the early stages of database
development?
2. Explain the difference between strong entities and weak entities.
3. What is a derived attribute, and how is it typically represented in a data model?
4. Why is it important to specify cardinality in a relationship?
5. How do you represent a multivalued attribute in an E/R diagram?
6. How does an ER diagram help in visualizing a database design?
7. What is a "many-to-many" cardinality constraint, and how is it represented in ER diagrams?
8. Provide an example of a weak entity and explain its relationship to a strong entity.
9. Explain the representation of a ternary relationship in an EER diagram.
10. What is an entity in ER modeling, and how does it differ from an attribute?
11. What is the role of subclasses in the Enhanced ER model ?
12. What is the concept of UNION types, and how are they represented in the Enhanced ER model?

Group B: ( 5 marks)
1. How do entities in a data model relate to real-world objects or concepts? Provide an example of
an entity in a healthcare system. 2+3
2. Explain the concept of composite attributes and provide an example. How are composite
attributes useful in representing real-world data more effectively? 3+2
3. Discuss how entities and relationships in an ER model are mapped to tables in a relational
database schema. 5
4. How do you represent relationships between multiple entities in an ER diagram, and what rules
govern their representation? 5
5. Describe the relationship between entity types and their instances in a data model. How are these
represented in ER diagrams? 5
6. Describe the concept of a derived attribute and explain how it differs from other types of
attributes in a data model. 5
7. What is a relationship in data modeling? Discuss how relationships are represented in ER
diagrams and give an example of a relationship in an employee-management database. 5

8. What is the difference between specialization and generalization in ER modeling? Explain with
examples. 5
9. What is the minimum number of tables required for the following ER diagram ?

10. What is the minimum and maximum number of tables required for the following ER diagram ?

Group C: (10 marks)

1. Design an ER diagram for an E-commerce Order Management System with the following
entities and their attributes. Also define the cardinalities of each relationship in the diagram.

Entities:

● Customer (CustomerID, Name, Email, Address, PhoneNumber)


● Product (ProductID, ProductName, Category, Price, StockQuantity)
● Order (OrderID, OrderDate, ShippingAddress, TotalAmount)
● Payment (PaymentID, PaymentMethod, PaymentDate, PaymentStatus)
● Supplier (SupplierID, SupplierName, ContactInfo, Address)

Relationships:

● A customer can place many orders.


● An order may contain many products.
● Single payment is made for a single order.
● Many products can be supplied by a supplier. (5+3+2)
2. Design an ER diagram for a Hospital Patient and Doctor Management System with the following
entities and their attributes. Also define the cardinalities of each relationship in the diagram.

Entities:

● Patient (PatientID, Name, Age, Address, PhoneNumber, Gender)


● Doctor (DoctorID, Name, Specialization, Phone, Email)
● Appointment (AppointmentID, AppointmentDate, Time, Status)
● Department (DepartmentID, DepartmentName, DepartmentHead)
● Treatment (TreatmentID, TreatmentName, Description, Cost)

Relationships:

● Many patients may have different appointments with different doctors.


● Many doctors may belong to a department.
● A doctor may prescribe many treatments.
● Many patients may receive many treatments. (5+3+2)

3. Design an ER diagram for a Hotel Reservation and Service Management System with the
following entities and their attributes. Also define the cardinalities of each relationship in the
diagram.

Entities:

● Guest (GuestID, Name, PhoneNumber, Email, Address)


● Reservation (ReservationID, ReservationDate, CheckInDate, CheckOutDate,
TotalAmount)
● Room (RoomID, RoomType, PricePerNight, Status, RoomSize)
● Service (ServiceID, ServiceName, Description, Price)
● Payment (PaymentID, PaymentAmount, PaymentDate, PaymentMethod)

Relationships:

● A guest makes many reservations.


● A reservation books many rooms.
● A guest requests many services.
● A payment is made for one reservation.
● A room belongs to a reservation. (5+3+2)
4. Design an ER diagram for a Flight Reservation and Ticketing System with the following entities
and their attributes. Also define the cardinalities of each relationship in the diagram.

Entities:

● Passenger (PassengerID, Name, PassportNumber, PhoneNumber, Email)


● Flight (FlightID, FlightNumber, DepartureCity, ArrivalCity, DepartureTime,
ArrivalTime)
● Booking (BookingID, BookingDate, SeatNumber, BookingStatus)
● Payment (PaymentID, PaymentAmount, PaymentDate, PaymentStatus)
● Airline (AirlineID, AirlineName, ContactInfo)

Relationships:

● A passenger makes many bookings.


● A booking is associated with one flight.
● A flight is operated by one airline.
● A passenger makes a payment for a booking. (5+3+2)

5. Design an ER diagram for an Employee Payroll and Benefits Management System with the
following entities and their attributes. Also define the cardinalities of each relationship in the
diagram.

Entities:

● Employee (EmployeeID, Name, Department, HireDate, Salary)


● Payroll (PayrollID, SalaryAmount, PayDate, TaxAmount)
● Benefit (BenefitID, BenefitType, Amount)
● Department (DepartmentID, DepartmentName, DepartmentHead)

Relationships:

● An employee receives one payroll.


● An employee is assigned to one department.
● An employee receives many benefits.
● A department manages many employees. (5+3+2)
Group A: (2 Marks Each)

1. What is the key difference between a primary index and a secondary index in a database
system?
2. Consider a B+ tree in which the maximum number of keys in a node is 5. What is the minimum
number of keys in any non-root node?
3. Given a B-tree where each node can contain at most 5 keys, determine the order of the B-tree.
4. What is the difference between a "committed" transaction and a "rolled-back" transaction in
the context of transaction control?
5. What is two-phase locking (2PL) in transaction control, and how does it help in ensuring
transaction isolation?
6. Explain what is meant by serializability in transaction control and why it is important.
7. What is the purpose of a lock in transaction control? Explain how locks help in ensuring the
isolation property of transactions.
8. What is the difference between shared lock and exclusive lock in locking protocols?
9. What is the primary objective of the timestamp ordering protocol in a database management
system (DBMS)?
10. What is lock point in a transaction schedule?

Group B: (5 Marks)

1. What is indexing in databases? Explain the differences between primary, secondary, and
clustered indexes with examples. (2+3)
2. Write short notes on B tree and B+ tree? 5
3. Consider a B+ tree in which the search key is 12 bytes long, block size is 1024 bytes record
pointer is 8 bytes long. The maximum number of keys that can be accommodated in each non-
leaf node of the tree? 5
4. Insert 1, 3, 5, 7, 9, 2, 4, 6, 8, 10 into B+ tree of order 4. 5
5. List the ACID properties. How does each component (ACID) ensure reliable transaction control?
(2+3)
6. Explain the difference between conflict serializability (CSS) and view serializability (VSS). How do
these concepts impact the correctness of a transaction schedule? (2+3)
7. Consider the following read-write schedule S over three transactions T1,T2and T3, where the
subscripts in the schedule indicate transaction IDs:

S:r1(z);w1(z);r2(x);r3(y);w3(y);r2(y);w2(x);w2(y);

Which serial schedules(scheduling order) is/are conflict equivalent to S? Write down the
process finding equivalent serial schedules. (2+3)
8. Let Ri(z) and Wi(z) denote read and write operations on a data element z by a transaction Ti,
respectively. Consider the schedule S with four transactions.

S: R4(x)R2(x)R3(x)R1(y)W1(y)W2(x)W3(y)R4(y)

Which serial schedules(scheduling order) is/are conflict equivalent to S? Write down the process
finding equivalent serial schedules.
(2+3)

9. Let ri(z) and wi(z) denote read and write operations respectively on a data item z by a
transaction Ti. Consider the following two schedules.

S1:r1(x)r1(y)r2(x)r2(y)w2(y)w1(x)
S2:r1(x)r2(x)r2(y)w2(y)r1(y)w1(x)

Which schedules is/are conflict serializable and mention the reason for this. (2+3)

10. Show that the two-phase locking protocol ensures conflict serializability, and that transactions
can be serialized according to their lock Point. (2+3)

Group C: (10 Marks)

1. Define a B-Tree. Explain its properties and how it differs from a binary search tree. Illustrate
with an example how insertions and deletions are handled in a B-Tree.
2. Explain the structure of a B+ Tree and its advantages over a B-Tree. Discuss the significance of
leaf nodes in a B+ Tree with respect to range queries. (2+3+5)
3. A. In B tree suppose search key is 9 bytes long, disk block size is 512 B, record pointer is 7B,
block pointer is 7B, block pointer is 6B, then calculate the order of the B-tree node.
B. The order of an internal node in a B+ tree index is the maximum number of children it can
have. Suppose that a child pointer takes 6 bytes, the search field value takes 14 bytes, and the
block size is 512B, what is the order of the internal node? (5+5)
4. What is a recoverable schedule? Why is recoverability of schedules desirable? Are there any
circumstances under which it would be desirable to allow nonrecoverable schedules? Explain
your answer. (2+3+5)
5. What is a cascadeless schedule? Why is cascadelessness of schedules desirable? Are there any
circumstances under which it would be desirable to allow noncascadeless schedules? Explain
your answer. (2+3+5)
6. A. What benefit does strict two-phase locking provide? What disadvantages result? (2+3)
B. What benefit does rigorous two-phase locking provide? How does it compare with other
forms of two-phase Locking? (2+3)
7. A. Consider the following two transactions:
T31: read(A);
read(B);
if A = 0 then B := B + 1;
write(B).

T32: read(B);
read(A);
if B = 0 then A := A + 1;
write(A).
Add lock and unlock instructions to transactions T31 and T32, so that they observe the two-
phase locking protocol. Can the execution of these transactions result in a deadlock?

B. What is the difference between strict two-phase locking and basic two-phase locking?
(5+5)
Group A:

1. Highlight the benefits of using a DBMS over traditional file systems.


2. Compare the use of primary and foreign key constraints in ensuring data integrity.
3. Consider a relation R(A, B, C, D, E, F) with the following functional dependencies. Determine the
total number of super keys for the relation R: F = {A → BC, B → D, D → E, A → F, E → C}
4. Compare JOIN and Correlated Subquery in SQL.
5. Explain your understanding of Dense Clustering and Sparse Clustering.
6. Explain the purpose of the cartesian product in relational algebra.
7. Define the degree and cardinality of a relation.
8. Explain dense clustering and its significance in database indexing.
9. Given the relation R(X, Y, Z, W) with functional dependencies {X → Y, Y → Z, Z → W, W → X},
determine the normalization form of the given relation.
10. Describe the augmentation axiom in Armstrong's axioms.
11. Explain the purpose of the referential integrity in DBMS.
12. Highlight the problems in Basic 2-Phase locking protocol.

Group-B:

1. Analyze the advantages of achieving data independence in database management systems,


particularly in terms of system maintenance, adaptability, and overall efficiency.
2. Explain the importance of integrity constraints in maintaining accurate and consistent data in a
database system. Include examples of different types of integrity constraints.
OR
Given the schema:
Employee (EmpID, Name, Salary, Department, ManagerID)
Department (DeptID, DeptName, Budget)
Write SQL commands to
(i). Increase the salary of employees in departments where the average salary is less than
50,000 by 10%.
(ii). Set the ManagerID to NULL for employees in departments where the total salary exceeds
the department’s Budget.
3. Given relations:
Student (StudentID, StudentName, DeptID)
Course (CourseID, CourseName, DeptID)
Enrolls (StudentID, CourseID, Grade)
Write a relational algebra expression to find the names of students who have enrolled in all
courses offered by the "Computer Science" department and received a grade higher than "B" in
each course. Show every step of your solution, including the intermediate operations.
OR
Demonstrate the application of the division operator in relational algebra, using examples from
real-world scenarios. Explain the steps involved and clearly illustrate how the operator can be
used to solve practical problems.
4. Explain the concept of "ON DELETE CASCADE" in foreign key constraints with suitable examples
and necessary SQL queries.
OR
Justify the statement “Every candidate key is a super key but every super key is not a candidate
key” with suitable examples.

5. Explain why the set difference R1−R2 increases as R1 grows and decreases as R2 grows. Provide
examples.
6. Given the relation R=(A,B,C,D,E,G) and the functional dependencies
{AB→C,AC→B,AD→E,B→D,BC→A,E→G}, determine if the decomposition {AB,BC,ABDE,EG} is a
lossless join decomposition. Provide justification for your answer.
7. In a system using the Timestamping Protocol, the following operations are executed by two
transactions, T1 and T2:
T1: Read(A), Write(A), Read(B), Write(B)
T2: Write(A), Read(B), Write(C)
Assume the timestamps of T1 and T2 are:
T1: Timestamp= 1 T2: Timestamp= 2
Using the Timestamping Protocol, check if the above schedule will lead to any conflict
serializability violations. Identify the operation sequence and explain the conflict resolution
mechanism if violations occur.

Group C:

1. i). Describe BCNF, its stricter requirements compared to 3NF, and illustrate the difference
with an example.
(ii). Consider the following functional dependencies:
F= {P→Q, Q→R, R→S, PQ→S}
G= {P→Q, P→R, P→S}
a. Split the dependencies in F into their canonical form and compute the minimal cover.
b. Are F and G equivalent? Justify your answer.
2. Demonstrate why the statement "Every view-serializable schedule is also conflict
serializable" is false. Justify your explanation with a counterexample of a schedule.
3. Consider the following relations:
Student (StudentID, Name, Age, Major, TeacherID)
Teacher (TeacherID, Name, Department)
Write SQL queries for the following:
i) Find the names of all students along with their respective teacher's name.
ii) List the names of teachers who are supervising students in the "Computer Science"
major.
iii) Find the name of the teacher with the highest number of students assigned to
them.

iv) Find the average age of students supervised by each teacher.

v) List all teachers who supervise students older than 25 years.

4. Consider a schedule S with transactions T1, T2, and T3. The transactions perform the
following operations:
T1: Transfer Rs. 100 from account A to account B, then transfer Rs. 50 from account A to
account C.
T2: Add Rs. 200 to account A, then transfer Rs. 150 from account B to account C.
T3: Add Rs. 100 to account B, then transfer Rs. 75 from account C to account A.
Prepare a concurrent schedule for these three transactions following the two-phase locking
protocol (2PL). Ensure that the schedule follows the rules of locking, unlocking, and
concurrency without violating any transaction integrity.

You might also like