0% found this document useful (0 votes)
6 views4 pages

Database Design: Time: 03 Hours Maximum Marks: 100 Instructions To Candidates

The document outlines the examination structure for the V Semester B.E. in Computer Science and Engineering at RV College of Engineering, focusing on Database Design. It includes instructions for candidates, details on Part A and Part B questions, and various tasks related to functional dependencies, relational algebra, and database design. The exam is scheduled for Nov/Dec-19 and carries a maximum of 100 marks.

Uploaded by

dummyrvce
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)
6 views4 pages

Database Design: Time: 03 Hours Maximum Marks: 100 Instructions To Candidates

The document outlines the examination structure for the V Semester B.E. in Computer Science and Engineering at RV College of Engineering, focusing on Database Design. It includes instructions for candidates, details on Part A and Part B questions, and various tasks related to functional dependencies, relational algebra, and database design. The exam is scheduled for Nov/Dec-19 and carries a maximum of 100 marks.

Uploaded by

dummyrvce
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/ 4

16CS52 / 12CS54

USN
RV COLLEGE OF ENGINEERING®
(An Autonomous Institution affiliated to VTU)
V Semester B. E. Examinations Nov/Dec-19
Computer Science and Engineering
DATABASE DESIGN
Time: 03 Hours Maximum Marks: 100
Instructions to candidates:
1. Answer all questions from Part A. Part A questions should be answered
in first three pages of the answer book only.
2. Answer FIVE full questions from Part B. In Part B question number 2, 7
and 8 are compulsory. Answer any one full question from 3 and 4 & one
full question from 5 and 6

PART-A
1 1.1 Find the minimal cover for following set of functional dependencies.
𝑃𝑃 → 𝐿𝐿, 𝑃𝑃 → 𝐶𝐶𝐶𝐶, 𝐿𝐿𝐿𝐿 → 𝐴𝐴𝐴𝐴, 𝐴𝐴 → 𝐿𝐿𝐿𝐿 02
1.2 For the following 𝐸𝐸𝐸𝐸𝐸𝐸 relation 𝐸𝐸𝐸𝐸𝐸𝐸(𝐸𝐸_𝐼𝐼𝐼𝐼, 𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸, 𝐷𝐷𝐷𝐷𝐷𝐷𝐷𝐷𝐷𝐷𝐷𝐷), display the
names of all employees whose names include either of the substring
“𝑇𝑇𝑇𝑇” or “𝐿𝐿𝐿𝐿”. 02
1.3 Differentiate the working of the following aggregate functions:
𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶(∗) and 𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶(𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶_𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁). 02
1.4 Determine the key for the following relation 𝑅𝑅 = { 𝐴𝐴, 𝐵𝐵, 𝐶𝐶, 𝐷𝐷, 𝐸𝐸, 𝐹𝐹, 𝐺𝐺, 𝐻𝐻, 𝐼𝐼}
with respective to following set of functional dependencies:
𝐴𝐴 → 𝐵𝐵𝐵𝐵, 𝐵𝐵𝐵𝐵 → 𝐸𝐸, 𝐸𝐸𝐸𝐸 → 𝐴𝐴𝐴𝐴, 𝐺𝐺 → 𝐼𝐼𝐼𝐼, 𝐹𝐹𝐻𝐻 → 𝐶𝐶𝐶𝐶 02
1.5 A relation is in __________ normal form if an attribute of a composite
key is dependent on an attribute of other composite key. 02
1.6 List the two conditions that decides that given 𝑀𝑀𝑀𝑀𝑀𝑀 𝑋𝑋 ↠ 𝑌𝑌 is a trivial
𝑀𝑀𝑀𝑀𝑀𝑀. 02
1.7 List different types of attributes in 𝐸𝐸𝐸𝐸 diagram and specify their 𝐸𝐸𝐸𝐸
notations. 02
1.8 The following table has two attributes 𝐴𝐴 and 𝐶𝐶 where 𝐴𝐴 is the primary
key and 𝐶𝐶 is the foregin key referencing A with on-delete cascade.
𝐴𝐴𝐴𝐴
-----
24
34
45
53
73
95
64
17
The set of all tuples that must be additionally deleted to preserve
referential integrity when the tuple (3,4) is deleted is : 02
1.9 Represent Aggregation function and GroupBy clause in relational
algebra. 01
1.10 An attribute of relational schema 𝑅𝑅 is called a __________ if it is a
member of some candidate key 𝑅𝑅. 01
1.11 The main problem associated with the recoverable schedule is
__________. 01
1.12 __________ is a transaction property ensured by the concurrency
control subsystem. 01

PART-B

2 a Justify how three-schema architecture provides logical and physical


data independence with a neat diagram. Which is harder to achieve? 06
b Illustrate the main phases of database design with respect to
University Database. 06
c Distinguish between cardinality ratio and participation constraints
with example. 04

3 a Consider the following requirements for a simple database for the


National Hockey League (𝑁𝑁𝑁𝑁𝑁𝑁):
• the 𝑁𝑁𝑁𝑁𝑁𝑁 has many teams,
• each team has a name, a city, a coach, a captain and a set of
players,
• each player belongs to only one team,
• each player has a name, a position (such as left wing or goalie),
a skill level, and a set of injury records,
• a team captain is also a player,
• a game is played between two teams (referred to as host_team
and guest_team) and has a date (such as 𝑀𝑀𝑀𝑀𝑀𝑀 11𝑡𝑡ℎ, 1999) and a
score (such as 4 to 2).
Construct a clean and concise 𝐸𝐸𝐸𝐸 diagram for the 𝑁𝑁𝑁𝑁𝑁𝑁 database. List
your assumptions and clearly indicate the cardinality mappings as
well as any role indicators in your 𝐸𝐸𝐸𝐸 diagram. 08
b Design a Relational Schema for the given ER diagram.

04
c Discuss the division operation in relational algebra with an example. 04
OR
4 a For the following Database schema, write the Relational Algebra
Queries.
𝑎𝑎𝑎𝑎𝑎𝑎ℎ𝑜𝑜𝑜𝑜(author_id; 𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓_𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛; 𝑙𝑙𝑙𝑙𝑙𝑙𝑙𝑙_𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛)
𝑎𝑎𝑎𝑎𝑎𝑎ℎ𝑜𝑜𝑜𝑜_𝑝𝑝𝑝𝑝𝑝𝑝(author_id; 𝑝𝑝𝑝𝑝𝑝𝑝_𝑖𝑖𝑖𝑖; 𝑎𝑎𝑎𝑎𝑎𝑎ℎ𝑜𝑜𝑜𝑜_𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝)
𝑏𝑏𝑏𝑏𝑏𝑏𝑏𝑏(book_id; 𝑏𝑏𝑏𝑏𝑏𝑏𝑏𝑏_𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡; 𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚ℎ; 𝑦𝑦𝑦𝑦𝑦𝑦𝑦𝑦; 𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒)
𝑝𝑝𝑝𝑝𝑝𝑝(pub_id; 𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡; 𝑏𝑏𝑏𝑏𝑏𝑏𝑏𝑏_𝑖𝑖𝑖𝑖)
Assume editor in book is a foreign key referencing author (author_id)
i) List the names of all authors who are not book editors
ii) List the names of all authors who are book editors
iii) List the names of all authors who have at least one
publication in the database.
iv) List the author_id authored a pub that was published in
July 08
b Consider the following requirements of ‘𝑈𝑈𝑈𝑈𝑈𝑈 Pride’ company which
keeps up-to-date information on the processing and current location
of each Shipped item. Shipped items are the heart of the 𝑈𝑈𝑈𝑈𝑈𝑈 product
tracking information system. Shipped items are be characterized by
item number (unique), weight, dimensions, insurance amount,
destination, and final delivery date. Shipped items are received into
the 𝑈𝑈𝑈𝑈𝑈𝑈 system at a single retail center. Retail centers are
characterized by their type, uniqueID and address. Shipped items
make their way to their destination via one or more standard 𝑈𝑈𝑈𝑈𝑈𝑈
transportation events (i.e, flights, truck deliveries). These
transportation events are characterized by a unique scheduleNumber,
a type (e.g, flight, truck) and a driveryRoute. Construct a clean and
concise 𝐸𝐸𝐸𝐸 diagram for the given database. List your assumptions
and clearly indicate the cardinality mappings as well as any role
indicators in your 𝐸𝐸𝐸𝐸 diagram. 08

5 a For the following Database schema, write the 𝑆𝑆𝑆𝑆𝑆𝑆 Queries.


𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆 (𝑠𝑠𝑠𝑠𝑠𝑠: 𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖, 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠: 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠, 𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟: 𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖, 𝑎𝑎𝑎𝑎𝑎𝑎: 𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟);
𝐵𝐵𝐵𝐵𝐵𝐵𝐵𝐵𝐵𝐵 (𝑏𝑏𝑏𝑏𝑏𝑏: 𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖, 𝑏𝑏𝑏𝑏𝑏𝑏𝑏𝑏𝑏𝑏: 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠, 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐: 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠);
𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅 (𝑠𝑠𝑠𝑠𝑠𝑠: 𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖, 𝑏𝑏𝑏𝑏𝑏𝑏: 𝑖𝑖𝑖𝑖𝑡𝑡𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒, 𝑑𝑑𝑑𝑑𝑑𝑑: 𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑).
i) Find all information of sailors who have reserved boat
number 101.
ii) Find the names of sailors who have reserved a red boat, and
list in the order of age.
iii) Find the ids of sailors who have reserved a red boat or a
green boat.
iv) Find the name and the age of the youngest sailor. 08
b Consider two sets of 𝐹𝐹𝐹𝐹𝐹𝐹, 𝐹𝐹 and 𝐺𝐺, 𝐹𝐹 = {𝐴𝐴 → 𝐵𝐵, 𝐵𝐵 → 𝐶𝐶, 𝐴𝐴𝐴𝐴 → 𝐷𝐷} and 𝐺𝐺 =
{ 𝐴𝐴 → 𝐵𝐵, 𝐵𝐵 → 𝐶𝐶, 𝐴𝐴 → 𝐷𝐷}. Are F and G equivalent? 04
c Discuss Project Join Normal form (𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃) with an example. 04

OR

6 a Compare and contrast 𝐼𝐼𝐼𝐼 and 𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸 operators by writing nested


queries with respect to following schema.
𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆 (𝑠𝑠𝑠𝑠𝑠𝑠: 𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖, 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠: 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠, 𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟: 𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖, 𝑎𝑎𝑎𝑎𝑎𝑎: 𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟);
𝐵𝐵𝐵𝐵𝐵𝐵𝐵𝐵𝐵𝐵 (𝑏𝑏𝑏𝑏𝑏𝑏: 𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖, 𝑏𝑏𝑏𝑏𝑏𝑏𝑏𝑏𝑏𝑏: 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠, 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐: 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠);
𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅 (𝑠𝑠𝑠𝑠𝑠𝑠: 𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖, 𝑏𝑏𝑏𝑏𝑏𝑏: 𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖, 𝑑𝑑𝑑𝑑𝑑𝑑: 𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑).
i) Find the names of the sailors who have reserved the boat
number 103.
ii) Find sid’s of sailors who’ve reserved both a red and a green
boat 08
b Let 𝑅𝑅 = 𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴, 𝑅𝑅1 = 𝐴𝐴𝐴𝐴, 𝑅𝑅2 = 𝐴𝐴𝐴𝐴, 𝑅𝑅3 = 𝐵𝐵𝐵𝐵, 𝑅𝑅4 = 𝐶𝐶𝐶𝐶𝐶𝐶 and 𝑅𝑅5 = 𝐴𝐴𝐴𝐴. Let
the functional dependencies be: 𝐴𝐴 → 𝐶𝐶, 𝐵𝐵 → 𝐶𝐶, 𝐶𝐶 → 𝐷𝐷, 𝐷𝐷𝐷𝐷 → 𝐶𝐶, 𝐶𝐶𝐶𝐶 → 𝐴𝐴.
Verify whether the given decomposition of 𝑅𝑅 into {𝑅𝑅1, 𝑅𝑅2, 𝑅𝑅3, 𝑅𝑅4, 𝑅𝑅5} is
lossless join decomposition or not. 04
c Let 𝑅𝑅 = (𝐴𝐴, 𝐵𝐵, 𝐶𝐶, 𝐷𝐷, 𝐸𝐸, 𝐹𝐹) be a relation. The set of functional dependency
on 𝑅𝑅 is given as follows: 𝐴𝐴𝐴𝐴 → 𝐶𝐶, 𝐴𝐴 → 𝐷𝐷, 𝐸𝐸 → 𝐹𝐹, 𝐵𝐵 → 𝐸𝐸𝐸𝐸. Determine the
key for 𝑅𝑅 and decompose 𝑅𝑅 into 3𝑁𝑁𝑁𝑁. 04

7 a Using MongoDB design a Employee database and write the following


queries:
i) Create Personal database and collection Employees (EmpId,
Name, Age, Salary, Designation, Address)
ii) Insert Minimum three documents into the collection
iii) List all the employees having Salary >= 8000 and
salary <= 15000.
iv) Sort the documents in Employee collection in ascending order
of their names and descending order of their Age
v) List the EmpId, names and salary of all the employees who are
managers. 08
b Define Tokenizer and Index in Elastic search. 04
c Differentiate between horizontal and vertical scaling. How MongoDB
makes horizontal scaling manageable? 04

8 a Consider the three transactions 𝑇𝑇1, 𝑇𝑇2 and 𝑇𝑇3 and two schedules 𝑆𝑆1
and 𝑆𝑆2. Verify whether the schedules are serializable or not. Write
down the equivalent serial schedule for the serializable schedule.
𝑇𝑇1: 𝑟𝑟1(𝑥𝑥), 𝑟𝑟1(𝑧𝑧), 𝑤𝑤1(𝑥𝑥)
𝑇𝑇2: 𝑟𝑟2(𝑧𝑧), 𝑟𝑟2(𝑦𝑦), 𝑤𝑤2(𝑧𝑧), 𝑤𝑤2(𝑦𝑦)
𝑇𝑇3: 𝑟𝑟3(𝑥𝑥), 𝑟𝑟3(𝑦𝑦), 𝑤𝑤3(𝑦𝑦)
𝑆𝑆1: 𝑟𝑟1(𝑥𝑥), 𝑟𝑟2(𝑧𝑧), 𝑟𝑟1(𝑧𝑧), 𝑟𝑟3(𝑥𝑥), 𝑟𝑟3(𝑦𝑦), 𝑤𝑤1(𝑥𝑥), 𝑤𝑤3(𝑦𝑦), 𝑟𝑟2(𝑦𝑦), 𝑤𝑤2(𝑧𝑧), 𝑤𝑤2(𝑦𝑦)
𝑆𝑆2: 𝑟𝑟1(𝑥𝑥), 𝑟𝑟2(𝑧𝑧), 𝑟𝑟3(𝑥𝑥), 𝑟𝑟1(𝑧𝑧), 𝑟𝑟2(𝑦𝑦), 𝑟𝑟3(𝑦𝑦), 𝑤𝑤1(𝑥𝑥), 𝑤𝑤2(𝑧𝑧), 𝑤𝑤3(𝑦𝑦), 𝑤𝑤2(𝑦𝑦) 08
b Define Lock. Describe the types of lock used in concurrency control. 04
c Is deadlock possible in 2-phase locking protocol? Justify your answer
with an example. 04

You might also like