Regulations: R2021 Reg.
No: …………………
KPR INSTITUTE OF ENGINEERING AND TECHNOLOGY
(Autonomous Institution Affiliated to Anna University, Chennai)
Avinashi Road, Arasur, Coimbatore - 641 407.
B.E./[Link] DEGREE EXAMINATIONS NOV/DEC 2023
III Semester
Computer Science and Engineering, Computer Science and Engineering (AIML)
Computer Science and Business Systems
U21CS302 – Database Management Systems
Duration: Three Hours Maximum: 100 Marks
PART – A (10 x 1 = 10 Marks)
[Link]. M RBT CO
Answer All Questions
What is the purpose of the Entity-Relationship (ER) model?
1 A) To design user interfaces B) To design the database 1 R CO1
C) To optimize database queries D) To implement security protocols
In the ER model, what does the term "cardinality of a relationship" refer to?
2 A) Number of attributes in an entity B) Number of entities in a relationship 1 R CO1
C) Number of key attributes D) Degree of the association
Which operator is used to compare a value to a specified list of values in SQL?
3 1 R CO2
A) BETWEEN B) ANY C) ALL D) IN
A command that lets you to modify the structure of the table is_______
4 1 R CO2
A) MODIFY B) ALTER C) UPDATE D) LOOK-UP
Given a relation R = (A, B, C, D, E) and its associated functional dependencies
F = {A→BC, B→D, D→E}, identify its closure set.
5 1 Ap CO3
A) {A→BC, B→D, D→E} B) {A→BCDE, B→DE, D→E},
C) {A→BC, B→DE} D) {A→BC, D→BE}
Given a relation R = (A, B, C) and functional dependencies F = {A→BC, B→C,
6 A→B, AB→C}, identify its canonical cover set. 1 Ap CO3
A) {A→B, B→C} B) {A→BC, B→C} C) {A→BC, B→C} D) {A→BC}
Consider that a transaction T1 has acquired an exclusive lock on data item X
and transaction T2 requests a shared lock on X. What will happen in scenario?
7 1 Ap CO4
A) T2 will be granted immediately B) T2 will be blocked until T1 releases
B) T2 will be terminated D) T1 will be terminated
Identify the schedule that is conflict equivalent to the below given schedule:
T1 T2 T3
R(A)
R(A)
R(A)
8 1 Ap CO4
W(B)
W(B)
W(B)
A) T1, T2, T3 B) T2, T1, T3
C) T3, T2, T1 D) Given schedule is not conflict serializable
Page 1/4
What is the primary purpose of a B-tree in database systems?
9 A) Sorting records in a table B) Providing hierarchical structure for indexing 1 U CO5
C) Storing binary data efficiently D) Implementing encryption algorithms
A large-scale social media platform hosted in a distributed environment
prioritizes to provide real-time updates to users' feeds. The system architect
is concerned about ensuring that users see the most recent posts. Which
10 aspect of the CAP theorem is most applicable here? 1 U CO5
A) Consistency B) Availability
C) Partition Tolerance D) Consistency and partition tolerance
PART – B (10 x 2 = 20 Marks)
[Link]. M RBT CO
Answer All Questions
11 Compare strong entity set with week entity set in ER model. 2 U CO1
12 Give the significance of derived attribute in Entity Relationship model. 2 R CO1
13 What does the term referential integrity refers to in SQL? 2 R CO2
14 Outline the use of DISTINCT keyword in a SELECT statement. 2 R CO2
A university database contains a table with student information, including
student ID, student name, course, and professor. Each course can have
15 2 U CO3
multiple professors, and a professor can teach multiple courses. List the
normalization challenges in this situation and suggest a normalized schema.
In a banking system, there is a requirement to log every transaction that
16 exceeds a certain amount into an audit table. Define a trigger that achieves 2 U CO3
the data integrity and security in the banking system.
17 State the ACID properties of a transaction. 2 R CO4
Consider a database system in which multiple transactions are executed
concurrently. The system has the following transactions:
I) Transaction T1 reads data item X.
II) Transaction T2 writes to data item Y.
18 III) Transaction T3 reads data item Y. 2 Ap CO4
IV) Transaction T4 writes to data item Z.
V) Transaction T5 reads data item Z.
Create a precedence graph to represent the dependencies among these
transactions.
19 Write a query to insert data in MONGODB. 2 U CO5
20 Brief about the different data models in NoSQL databases. 2 U CO5
PART – C (5 x 14 = 70 Marks)
[Link]. M RBT CO
Answer All Questions
i. Explain about the overall architecture of database System in detail. 10 U CO1
21 a) Discuss the importance of data abstraction in simplifying the complexity
ii. 4 U CO1
of database systems.
(Or)
Page 2/4
Discuss in detail about the various notations used in ER diagram for
i. designing database. Also, design an ER diagram for any real time 8 U CO1
21 b) scenario.
Explain about the various features of extended ER model with a relevant
ii. 6 U CO1
example.
Consider the below given relations related with a hypermarket located
in Coimbatore.
customer(customer_id, first name, last name, city, state)
i. 8 Ap CO2
Items ordered (trans_id, customer_id, order date, item, quantity, price)
Write SQL statements to create the above table with appropriate
22 a)
primary key and foreign key. Also insert few records in the two tables.
I) Write SQL statements to select the customer id, order date, and item
values from the items ordered table for any items in the item column
ii. 6 Ap CO2
that start with the word “Horlicks”. II) write SQL statement to select
the distinct items in the items ordered table.
(Or)
Write appropriate DDL commands to create the below table with
appropriate constraints.
i. Authors(author_id, first name, last name, country, birth year) 8 Ap CO2
Books(title, author_id, publication year)
22 b)
Nobel Winners(author_id, award year)
Define a PL/SQL procedure display the list of titles published by the given
ii. author along with publication year (Refer above relation). The procedure 6 Ap CO2
should take author id as argument and display the corresponding result.
Consider the following set (F) of functional dependencies for the relation
schema R=(A,B,C,D,E).
i. F={A→BC, A→E, C→D,B→D} 8 Ap CO3
Determine the set of all logically implied dependencies based on the
23 a)
given set F, and identify the candidate key(s) for relation R.
Verify whether the above given relation complies with Boyce-Codd
ii. Normal Form (BCNF). If it doesn't adhere to BCNF, take the necessary 6 Ap CO3
steps to normalize it to BCNF.
(Or)
Consider the following set (F) of functional dependencies for the relation
schema R=(A,B,C,D,E), F={AB→C, C→D,D→B, D→E}
i. 6 Ap CO3
Determine the closure set (F+) based on the provided set F and identify
the candidate key(s) for relation R.
Write PL/SQL statements to create a trigger to automatically add a
23 b) record in the log table whenever a record is updated in the users table.
If a user modifies the mobile number / dob / email / city, a log entry
ii. should be inserted into the log table, including both the old value and 8 Ap CO3
the newly modified value.
users(uid, uname, mobile, dob, email, city)
logs(time, uid, field, oldval, newvalue)
Page 3/4
Consider the following schedules. The actions are listed in the order
they are scheduled
i. S1: R1(X), R3(X), W1(X), R2(X), W3(X) 8 Ap CO4
24 a) S2: R3(X), R2(X), W3(X), R1(X), W1(X)
Construct precedence graph for the above schedules S1 and S2.
Identify the conflict serializable schedule among S1 and S2 given above
ii. 6 Ap CO4
and further trace the equivalent serial schedule.
(Or)
Consider the following two schedules S1 and S2:
S1 = T1: W(X); T2: R(X); T1: W(X);
S2 = T2: R(X); T3: W(X); T3: Commit; T1: W(Y); T1: Commit; T2: R(Y); T2:
i. 8 Ap CO4
W(Z); T2: Commit
Determine whether the above schedules (S1 & S2) qualifies to be a
24 b)
recoverable schedule and cascadeless schedule.
Consider the following schedule:
S3 = T1 :R(A); T1 :W(B); T2:R(A); T2:W(B); T3:R(A); T3:W(B);
ii. 6 Ap CO4
Determine a concurrent schedule which is conflict equivalent to S3, also
justify your answer.
Construct a B+ tree (order 3) by insert the following numbers 8, 2, 5, 7,
i. 8 Ap CO5
42, 23, 24, 35, 62, 44, 43, 6.
25 a)
Discuss about the merits and demerits of using a B-tree instead of a B+
ii. 6 U CO5
tree for indexing in a database system?
(Or)
Consider the scenario that you are designing a distributed e-commerce
platform where real-time inventory updates are crucial. How would you
i. make a decision in implementing NoSQL database based on the CAP 8 Ap CO5
theorem to balance consistency, availability, and partition tolerance in
25 b) this system?
Outline the significance of NoSQL databases and traditional relational
ii. databases in the context of the CAP theorem, and what trade-offs are 6 U CO5
involved when choosing one over the other?
Page 4/4