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

Model Question Paper-scheme and Solution

This document is a model question paper for the Database Management System course for the Fourth Semester B.E. program at Dayananda Sagar Academy of Technology & Management. It outlines various topics including DBMS components, ER diagrams, SQL queries, normalization techniques, and concurrency control. The paper includes questions for each module, assessing students' understanding and application of database concepts and techniques.

Uploaded by

gowdarakshith724
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)
55 views

Model Question Paper-scheme and Solution

This document is a model question paper for the Database Management System course for the Fourth Semester B.E. program at Dayananda Sagar Academy of Technology & Management. It outlines various topics including DBMS components, ER diagrams, SQL queries, normalization techniques, and concurrency control. The paper includes questions for each module, assessing students' understanding and application of database concepts and techniques.

Uploaded by

gowdarakshith724
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/ 6

Model Question Paper- I with effect from 2023-24

USN

DAYANANDA SAGAR ACADEMY OF TECHNOLOGY & MANAGEMENT


(An Autonomous Institute under VTU, Belagavi)

Fourth Semester B.E Semester End Examination – 2025

Scheme and Solution

Sub: Database Management System Sub Code:BCG404

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.

ResearchDept ← σ Dname = 'Research' (DEPT)


Result ← π Name, Salary (EMP ⋈ EMP.Dno = ResearchDept.Dnum
ResearchDept)

(ii) find the names of employees who work on all projects controlled by
department number 4

ProjDept4 ← π Pnumber (σ Dnum = 4 (PROJECT))


EmpProj ← π ESSN, Pno (WORKS_ON)

Result ← π ESSN (EmpProj ÷ ProjDept4)


Final ← π Name (EMP ⋈ EMP.SSN = Result.ESSN Result)

iii) Retrieve the SSN of all employees who either in department no :4 or


directly supervise an employee who work in department number :4

Dept4Emp ← π SSN (σ Dno = 4 (EMP))

(iv) Retrieve the names of employees who have no dependents


2
EmpWithDependents ← π ESSN (DEPENDENT)
AllEmps ← π SSN, Name (EMP) 2
Result ← AllEmps – π SSN, Name (EMP ⋈ EMP.SSN = DEPENDENT.ESSN 2
DEPENDENT)
Result ← π Name (EMP) – π Name (EMP ⋈ DEPENDENT) 2
2
(v) Retrieve each department number, the number of employees in the
department and their average salary.
b Result ← γ Dno; COUNT(SSN) → EmpCount, AVG(Salary) → AvgSal (EMP) L3 CO3
Module – 3
Consider the following relation schema L3 CO3
Works(Pname,Cname,salary)
Q5 Lives(Pname,Street,City)
a located_in (Cname, city)
Manager(Pname,Mgrname)
Write the SQL queries for the following
i) Find the names of all persons who live in the city Bangalore. 2
Model Question Paper- I with effect from 2023-24
SELECT Pname 2
FROM Lives
WHERE City = 'Bangalore'; 2
2
ii) Retrieve the names of all person of "Infosys" whose salary is between
Rs .50000 2
SELECT Pname
FROM Works
WHERE Cname = 'Infosys' AND salary BETWEEN 50000 AND 100000;

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';

v)Find the average salary of “Infosys” persons


SELECT AVG(salary) AS Avg_Salary
FROM Works
WHERE Cname = 'Infosys';
b Examine and illustrate insertion, deletion, and modification anomalies using a L4 CO4
sample relation. Analyze why these anomalies create problems in maintaining
consistency and integrity in real-world database systems.
Explanation of all 3 anomalies with example 9
Problems created by these anomalies in real world system 1
OR
Consider the Sailors-Boats-Reserves DB described
s (sid, sname, rating, age)
Q.6 b (bid, bname, color)
r (sid, bid, date)
Write each of the following queries in SQL.
1. Find the colors of boats reserved by Alber.
SELECT DISTINCT b.color 2.5
FROM s
JOIN r ON s.sid = r.sid
JOIN b ON r.bid = b.bid
WHERE s.sname = 'Alber';

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

You might also like