0% found this document useful (0 votes)
36 views5 pages

CST204 D

Uploaded by

Sikha Sasidharan
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)
36 views5 pages

CST204 D

Uploaded by

Sikha Sasidharan
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/ 5

C 02000CST204052104 Pages: 5

Reg No.:_______________ Name:__________________________


APJ ABDUL KALAM TECHNOLOGICAL UNIVERSITY
B.Tech Degree S4 (R,S) / S4 (PT) (R,S) Examination June 2023 (2019 Scheme)

Course Code: CST 204


Course Name: Database Management Systems
Max. Marks: 100 Duration: 3 Hours

PART A
(Answer all questions; each question carries 3 marks) Marks

1 List any SIX major advantages of using a DBMS 3


2 What is the concept of a weak entity used in data modelling? Define the terms owner 3
entity type, Identifying relationship type.
3 Define theta join. 3
Given the two relations R and S:
A B C D E
1 2 3 3 1
4 5 6 6 2
7 8 9

Find 𝑅𝜃𝐵<𝐷 𝑆.
4 Define primary key, candidate key and super key. 3
5 What is the difference between the WHERE and HAVING clause? Illustrate with an 3
example.
6 Explain the difference between Hash indexes and B+-tree indexes. 3
7 Define the term functional dependency. Why are some functional dependencies called
trivial?
8 List Armstrong Axiom rules 3
9 List the ACID properties of transactions. 3
10 What is a key-value database? List its major properties. 3
PART B
(Answer one full question from each module, each question carries 14 marks)

Module -1
11 Draw an ER diagram to model the application with the following assumptions. Specify 14
key attributes of each entity type and (min, max) constraints on each relationship type.

Page 1 of 5
02000CST204052104

• Each home uniquely defined by home identifier, street address, city, state, a number
of bedrooms and a number of bathrooms and an associated owner.
• Each owner has a Social Security Number, first name, last name, phone, and
profession.
• An owner can spouse one or more homes.
• Agents represent owners in the sale of a home. An agent can list many homes, but
only one agent can list a home.
• An agent has a unique agent number, name, phone number and an associated office.
• When an owner agrees to list a home with an agent, a commission and a selling price
are determined.
• An office has office identifier, phone number, the manager name, address and an
optional agent number.
• Many agents can work at one office.
• A buyer entity type has a Social Security Number, first name, last name, phone,
preferences for the number of bedrooms and bathrooms, and a price range.
• An agent can work with many buyers, but a buyer works with only one agent.
12 a) What is the difference between logical data independence and physical data 6
independence? Which one is harder to achieve? Why?
b) 8

Consider the bank database given above and answer the following questions
i. List the strong (nonweak) entity types in the ER diagram.
ii. Is there a weak entity type? If so, give its name, partial key, and identifying
relationship.
iii. What constraints do the partial key and the identifying relationship of the weak entity
type specify in this diagram?
iv. List the names of all relationship types, and specify the (min, max) constraint on each
participation of an entity type in a relationship type.

Page 2 of 5
02000CST204052104

v. Suppose that every customer must have at least one account but is restricted to at most
two loans at a time, and that a bank branch cannot have more than 1,000 loans. How
does this show up on the (min, max) constraints?
Module -2
13 a) Consider the UNIVERSITY database with the following relations: 10
STUDENT (rollNo, name, degree, year, sex, deptNo, advisor)
DEPARTMENT (deptId, name, hod, phone)
PROFESSOR (empId, name, sex, startYear, deptNo, phone)
COURSE (courseId, cname, credits, deptNo)
ENROLLMENT (rollNo, courseId, sem, year, grade)
TEACHING (empId, courseId, sem, year, classRoom)
PREREQUISITE(preReqCourse, courseID)
Write relational algebra expressions for the following queries:
i. For each department, find its name and the name, sex and phone number of the head
of the department.
ii. Find courses offered by each department.
iii. Find those students who have registered for all courses offered in the department of
Computer Science.
iv. Obtain the department Ids for departments with no lady professor.
v. Obtain the rollNo of girl students who have obtained at least one S grade.
b) What is a foreign key constraint? Why are such constraints important? 4
What is referential integrity?
14 a) Convert the following ER diagram into a relational schema 4

b) Consider the following relation schema with referential integrity constraints: 10


STUDENT (rollNo, name, degree, year, sex, deptNo, advisor)

DEPARTMENT (deptId, name, hod, phone)

PROFESSOR (empId, name, sex, startYear, deptNo, phone)

Page 3 of 5
02000CST204052104

Write SQL DDL statements for the following:


i. Create table STUDENT, DEPARTMENT, PROFESSOR including primary and
foreign key integrity constraints.
ii. Add an address attribute in the table STUDENT
iii. Write an SQL statement to delete the “CS” department. Given the referential
integrity constraints, explain what happens when this statement is executed.
Module -3
15 a) What is an assertion? How they differ from triggers? 4
b) Consider the following relation schema and write SQL queries to find: 10
EMPLOYEE(Fname, Minit, Lname, SSN, Bdate, Address, Sex, Salary SuperSSN, Dno)
DEPARTMENT(Dname, Dnumber, MgrSSN, MgrStartDate)
DEPT_LOCATIONS(Dnumber, Dlocaions)
PROJECT(Pname, Pnumber, Plocation,Dnum)
WORKS_ON(ESSN, Pno,Hours)
i. Retrieve the name and address of all employees who work for the 'Research'
department.
ii. For each employee, retrieve the employee's name, and the name of his or her
immediate supervisor.
iii. Retrieve the name of each employee who works on all the projects controlled by
department number 5.
iv. Make a list of all project numbers for projects that involve an employee whose
last name is 'Smith' as a worker or as a manager of the department that controls
the project.
v. Retrieve the SSN of all employees who work on project number 1, 2, or 3.
16 a) Consider a disk with block size B =512 bytes. A block pointer is P=6 bytes long and a 9
record pointer is PR =7 bytes long. A file has r=30,000 EMPLOYEE records of fixed
length. Each record has the following fields: Name (30 bytes),Ssn (9 bytes),
Department_code (9 bytes), Address (40 bytes), Phone (10 bytes), Birth_date (8
bytes), Sex (1 byte), Job_code (4 bytes), and Salary (4 bytes, real number). An additional
byte is used as a deletion marker.
i. Calculate the record size R in bytes.

Page 4 of 5
02000CST204052104

ii. Suppose that the file is ordered by the key field Ssn and we want to construct a
primary index on Ssn. Calculate The number of first-level index entries and the
number of first-level index blocks
iii. Calculate the number of levels needed if we make it into a multilevel index.
b) What is a grid file? What are its advantages and disadvantages? 5
Module -4
17 a) Consider a relation R with five attributes (A,B,C,D,E) . You are given the following 6
dependencies: A → B, BC → E, and ED → A.
i. List all keys for R.
ii. Is R in 3NF?
iii. Is R in BCNF?
b) Define minimal cover. Let the given set of functional dependencies be: 𝐸: {𝐵 → 𝐴, 𝐷 → 8
𝐴, 𝐴𝐵 → 𝐷} . Find the minimal cover of E
18 a) Explain with example 2NF, 3NF and BCNF. 8
b) Consider a relation schema R(X Y Z W P ) (above table R) is decomposed into R1( X Y 6
Z ) and R2( Z W P). Determine whether the above R1 and R2 are Lossless or Lossy?
Module -5
19 a) What is a schedule? Define the concepts of recoverable, cascade less and strict schedules, 8
and compare them in terms of their recoverability.
b) Which of the following schedule is conflict serializable? For each serializable schedule 6
determine the equivalent serial schedule.
(a) r1 (X); r3 (X); w1(X); r2(X); w3(X)
(b) r1 (X); r3 (X); w3(X); w1(X); r2(X)
(c) r3 (X); r2 (X); w3(X); r1(X); w1(X)
20 a) What is the two-phase locking (2PL) protocol? How does it guarantee serializability? 7
How strict 2PL differs from basic 2PL?
b) Explain the need for multimodal database. List the important characteristics of 7
ArangoDB.
***

Page 5 of 5

You might also like