UCS310
UCS310
(Note: Answer all the questions with valid points only, which are most appropriate for your
answers. Assume the missing information (if any) suitably. All the symbols used here have their
usual meaning.)
Q2. Given a relation R (A, B, C, D, E), which holds the functional dependencies F: {AB- C, C-->D,
A-3E, BSA, AB-*A, AB-B, C4E}.
(a) Find attribute closure of {AB}+ and {BC}+ (11V)
(b) Find out candidate key(s) for the relation R using closure property. List down all the non-prime
attributes for the relation R. (2M)
(c) Given the following relation instance, list down all the non-trivial FDs. (2M)
A B C
1 4 2
1 5 3
1 6 3
3 2 2
1 5 3
5 3 3
Q3. Given the relational schema below, write the SQL queries for the following: (5 x 2 =10M)
Suppliers (sid: integer, sname: string, address: string)
Parts (pA: integer, pname: string, color: string)
Catalog (sid: integer, p4: integer, cost: real)
a) Find the sids of suppliers who supply some red parts or lives at "221 Packer Street (using
subquery).
b) Find names and address of suppliers who supply at least one part (using co-related subquery).
c) Find the list of suppliers who supply red colored parts.
d) Display the details of suppliers whose total supply cost is more than 10000 and supplying less
than five parts.
e) Display the names of suppliers except `Harish' and `Dinesh' who supply the lowest priced
parts.
Page 1/2
Q4. a) Convert the following statements into a single ER diagram showing the cardinality for each
connectivity from one entity to another.entity. (4M)
"Each company operates maximum of eight departments, and each department belongs to one
company. Each department employs one or more employees, and each employee works for one
department. Each employee may or may not have any dependents, and each dependent belongs to one
employee, whereas a dependent cannot exist without an employee. An employee can be assigned to
multiple projects. A project can belong to multiple departments where many employees can work, and
a department can have multiple projects. Every entity has its ID and Name.
b) Convert the ER cl.agram to corresponding relational schemas with minimum number of tables.
Specify the primary key and foreign key attributes in each relational schema. (5M)
***********