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

Model Question Paper

Nukbyuk
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views

Model Question Paper

Nukbyuk
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

THE NATIONAL INSTITUTE OF ENGINEERING

Department of Computer Science and Engineering

Model Question Paper

Subject: Database Management Systems Subject code: BCS403 Semester: IV


Time: 3 hrs Max. Marks: 100
Note: Answer all the questions

Q. Cognitive
COs Questions Marks
No. Level

1a L2 CO1 Describe the database design process along with diagram. 10

Write an Entity-Relationship diagram for a university database system


1b L3 CO1 that needs to manage information about students, courses, and 10
instructors.

Describe along with examples how relational model handle violation of


2a L2 CO2 10
different constraints.
Consider a database for an online bookstore with the following
relations:
Book (BookID, Title, AuthorID, PublisherID, Price)
Author (AuthorID, Name)
Publisher (PublisherID, Name)
Customer (CustomerID, Name, Email)
Order (OrderID, CustomerID, Date)
OrderDetails (OrderID, BookID, Quantity)
2b L3 CO2 Write relational algebra expressions for the following: 10
i) Find the titles of books written by 'J.K. Rowling'.
ii) Get the titles of books ordered by a customer named 'Alice'.
iii) Find the names of authors whose books are published by
'Penguin Books'.
iv) Get the names of customers who have placed orders in the
month of January 2024.
v) List the titles of books along with the quantity ordered in
each order.

Given the following relation 𝑅 with attributes and functional


dependencies, convert it to Third Normal Form.
R {𝐴,𝐵,𝐶,𝐷,𝐸,𝐹}
Functional Dependencies:
3a L3 CO2 𝐴→𝐵 10
𝐴→𝐶
𝐶→𝐷
𝐷→𝐸
𝐵,𝐸→𝐹
Page 1 of 3
Consider the relational schema given in Question 2b and write SQL
queries for the following.
i) List the names of publishers who have published books
priced over 500.
ii) Get the titles of books ordered by a customer named 'Alice'.
3b L3 CO3 10
iii) List the titles of books that have never been ordered.
iv) Retrieve the names of customers who have ordered a book
titled '1984'.
v) List the titles of books along with the quantity ordered in
each order.
OR
Consider the following relation for a library system and check if they
are in 3NF:
LibraryBooks
Attributes: (BookID, Title, AuthorID, AuthorName, PublisherID,
PublisherName, Genre, ISBN, ShelfNumber)
3c L3 CO2 10
Functional Dependencies:
BookID → Title, AuthorID, PublisherID, Genre, ISBN, ShelfNumber
AuthorID → AuthorName
PublisherID → PublisherName
Consider the relational schema given in Question 2b and write SQL
queries for the following.
i) Find the total number of books in the store
ii) List all books along with their authors and publishers
3d L3 CO3 10
iii) Retrieve the top 5 bestselling books (based on the total
quantity ordered)
iv) List all customers who have ordered books more than once
v) Find the average price of books in each genre

Consider a database managing customer information with two tables:


‘Customer’ and ‘CustomerUpdateLog’.
Customer (CustomerID, Name, Email, Phone)
CustomerUpdateLog (LogID, CustomerID, LogMessage, LogDate)
Write SQL queries for the following:
4a L3 CO4 10
i) To create the mentioned tables along with suitable datatypes
and constraints.
ii) Create a trigger in SQL that automatically logs an entry in
the CustomerUpdateLog table whenever a customer's
information is updated in the Customer table.

4b L2 CO4 Describe the desirable properties of transaction along with an example. 10

OR

Page 2 of 3
With respect to views, answer the following:
i) Differentiate between the two implementations of views.
ii) Write the syntax for creating a view.
4c L3 CO4 iii) Refer the schema given in Question 2b and write a SQL 10
query to create a view named ‘BookDetails’ that combines
information from the ‘Book’, ‘Author’, and ‘Publisher’
tables:
Describe the different issues that arise due to concurrent execution of
4d. L2 CO4 10
transaction. Explain how to set the transaction isolation level.

5a L2 CO4 Explain two-phase locking, its issues and its variants. 10

5b L2 CO4 Describe the MongoDB CRUD operations along with an example. 10

Page 3 of 3

You might also like