Model Question Paper-scheme and Solution
Model Question Paper-scheme and Solution
USN
Module - 1 Marks BL CO
Explain various component modules of a DBMS with a neat diagram
Component modules of a DBMS diagram 5
Q.1
a L2 CO1
5
Explanation of Component modules of a DBMS
Define DBMS. Explain the characteristics of database
Definition of DBMS: A software package/ system to facilitate the creation and
maintenance of a computerized database
Characteristics 2
b Self-describing nature of a database system L2 CO1
Insulation between programs and data
Data Abstraction
Support of multiple views of the data 8
Sharing of data and multi-user transaction processing
Model Question Paper- I with effect from 2023-24
OR
Discuss the following Language with example: DDL,
DML, DCL, TCL
DDL: Used by the DBA and database designers to specify
Q.2 the conceptual schema of a database.
DML: Used to specify database retrievals and updates
a 2.5X4=10 L2 CO1
Types: Procedural and Non Procedural language
DCL:DCL deals with rights, permissions, and other controls
of the database system.
TCL: It ensures the integrity of the database by controlling
transaction behavior.
Define Entity, Attributes along with its different types
Entity: Entity is a basic concept for the ER model. Entities are specific things or 4
b objects in the mini-world that are represented in the database L2 CO1
Attributes : Attributes are properties used to describe an entity. 6
Types: Simple, composite and multivalued
Module – 2
Develop an ER diagram for keeping track of information about a company
database taking into account at least five entities.
ER diagram
Q.3
a L3 CO2
Cardinality ratio 2
Participation constraint 2
b
Demonstrate the different types of update operations (INSERT, DELETE,
UPDATE) in a relational database. Analyze how each operation can lead to
constraint violations and describe how such violations are handled. L3 CO3
6
Possible violations for each operation
4
Handling of Violations
OR
Model Question Paper- I with effect from 2023-24
Implement the E-R to Relational Mapping algorithm and illustrate each step
using a suitable ER diagram example.
Q.4 Explanation of 7 steps with example
Step 1: Mapping of Regular Entity Types
a Step 2: Mapping of Weak Entity Types L3 CO2
Step 3: Mapping of Binary 1:1 Relation Types 10
Step 4: Mapping of Binary 1:N Relationship Types.
Step 5: Mapping of Binary M:N Relationship Types.
Step 6: Mapping of Multivalued attributes.
Step 7: Mapping of N-ary Relationship Types.
Consider the following COMPANY database
EMP(Name,SSN,Salary,SuperSSN,Gender,Dno)
DEPT(DNum,Dname,MgrSSN,Dno) DEPT_LOC(Dnum,Dlocation)
DEPENDENT(ESSN,Dep_name,Sex) WORKS_ON(ESSN,Pno,Hours)
PROJECT(Pname,Pnumber,Plocation,Dnum)
Write the relational algebra queries for the following
(i)Retrieve the name, address, salary of employees who work for the
Research department.
(ii) find the names of employees who work on all projects controlled by
department number 4
iii)Find the names of all persons who lives and work in the same city
SELECT DISTINCT L.Pname
FROM Lives L
JOIN Works W ON L.Pname = W.Pname
JOIN located_in LI ON W.Cname = LI.Cname
WHERE L.City = LI.City;
iv)List the names of the people who work for “Tech M” along with the cities
they live in.
SELECT W.Pname, L.City
FROM Works W
JOIN Lives L ON W.Pname = L.Pname
WHERE W.Cname = 'Tech M';
2. Find all sailor ids of sailors who have a rating of at least 8 or reserved 2.5
boat 103.
SELECT DISTINCT s.sid
FROM s
LEFT JOIN r ON s.sid = r.sid
WHERE s.rating >= 8 OR r.bid = 103;
3. Find the names of sailors who have not reserved a boat whose name 2.5
contains the string “storm”. Order the names in ascending order.
SELECT s.sname
a FROM s L3 CO3
Model Question Paper- I with effect from 2023-24
WHERE s.sid NOT IN (
SELECT r.sid
FROM r
JOIN b ON r.bid = b.bid
WHERE b.bname LIKE '%storm%'
)
ORDER BY s.sname ASC;
4. Find the sailor ids of sailors with age over 20 who have not reserved a
boat whose name includes the string “thunder”. 2.5
SELECT s.sid
FROM s
WHERE s.age > 20
AND s.sid NOT IN (
SELECT r.sid
FROM r
JOIN b ON r.bid = b.bid
WHERE b.bname LIKE '%thunder%'
);
b Analyze and apply normalization techniques to restructure an unnormalized L4 CO4
relation. Decompose the relation progressively into 1NF, 2NF, and 3NF, and
explain how each step helps in reducing redundancy and eliminating
anomalies. Support the analysis with a suitable example.
Explanation of 1NF with example 3
Explanation of 2NF with example 3
Explanation of 3NF with example 4
Module – 4
a Apply the concepts of Assertions and Triggers in SQL to demonstrate their role L3 CO3
in enforcing data integrity. Use suitable examples to show how and when they
are activated in database systems.
Q.7 Explanation of Assertions with example 5
Explanation of Triggers with example 5
Analyze a given transaction schedule and classify it based on its recoverability
Introduction to recoverability
Classification based on Recoverability
2
• Recoverable : T2 commits after T1 (if T2 reads T1’s write)
b • Cascadeless : Read only committed data L4 CO4
• Strict: Read/Write only after commit/abort
2X4=8
• Non-Recoverable: Dependent transaction commits before source
transaction
OR
a Apply SQL constructs to solve database problems by using: (i) Nested L3 CO3
Queries, (ii) Aggregate Functions, (iii) Triggers, (iv) Views and their
Updatability, and (v) Schema Change Statements. Illustrate the application of
each construct with relevant examples.
Q.8
• Nested Queries: Subquery, IN, EXISTS, ANY/ALL, comparison 2X5=10
• Aggregate Functions: COUNT, SUM, AVG, MIN, MAX, GROUP BY,
HAVING
• Triggers: BEFORE/AFTER INSERT/UPDATE/DELETE, FOR EACH ROW,
WHEN condition
• Views & Updatability: CREATE VIEW, WITH CHECK OPTION, updatable
(single table, no aggregates)
• Schema Change: ALTER TABLE, ADD/DROP COLUMN, RENAME,
MODIFY
Model Question Paper- I with effect from 2023-24
Analyze a given transaction schedule and classify it based on Serializability
Meaning of Serializability 2
b Types of Serializability with example 8 L4 CO4
Module – 5
a Analyze the need for concurrency control in database systems and demonstrate L4 CO4
Q.9 its importance with a suitable example.
Types of problems with simple transactions 8
Analysis of importance of concurrency control 2
b Analyze the two-phase locking protocol used in concurrency control and explain L4 CO4
how it guarantees serializability.
Explanation of two-phase locking protocol 6
Explanation of guarantying serializability. 4
OR
Analyze NoSQL Graph databases, specifically Neo4j, and examine how they store L4 CO4
and query data using graph structures.
a Explanation of NoSQL Graph databases 2.5
Neo4J 2.5
Storing and querying data using graph structures. 5
Q.10 Analyze document-based NoSQL systems, particularly MongoDB, and examine L4 CO4
the basic CRUD operations (Create, Read, Update, Delete) performed in
MongoDB
Introduction to document-based NoSQL systems 2
b Basic CRUD operations 8