MANIPAL UNIVERSITY JAIPUR SCHOOL OF COMPUTING AND IT B.Tech. IV Semester Second Sessional Examination, April, 2018 Branch: CSE/IT/CCE CS1402- Relational Database Management Systems (CLOSED BOOK EXAMINATION) Duration: 1 hour Max. Marks: 15 Instructions: All questions are compulsory Numbers in [ ] indicates marks Missing data, if any, may be assumed suitably 1. Use the following schemas to write queries in relational calculus for following questions: branch (branch_name, branch_city, assets) customer (customer_name, customer_street, customer_city) account (account_number, branch_name, balance) loan (loan_number, branch_name, amount) depositor (customer_name, account_number) borrower (customer_name, loan_number) (a) Find the names of all customers having an account at the branch “SBI001”. (b) Find the names of all customers who do not have any loan. [1+1] 2. Consider the following set of functional dependencies given in R=(ABCDEH): [3+4] F = {A BC, CD E, E C, D EA, D H, ABH BD, DH BC} (a) Find the canonical cover / minimal cover / reduced functional dependencies set. (b) Assume R, given above, is in 1NF. Decompose R into its highest normal form using the minimal cover found in (a). Ensure that each decomposition is lossless and all functional dependencies are preserved. 3. (a) Check whether the given schedule is conflict serializable or not. Justify your answer. [1.5×2] (b) If yes, then write all serial schedules which are conflict equivalent to the given schedule. T1 r(A) r(B) w(A) T2 T3 T4 T5 r(A) w(A) r(B) r(A) w(B) w(A) r(C) w(C) r(B) w(D) r(E) w(B) r(D) r(C) w(C) 4. Consider the employee database where the primary keys are underlined. Give an [1.5×2] expression in SQL for each of the following queries. employee (employee-name, street, city) works (employee-name, company-name, salary) company (company-name, city) manages (employee-name, manager-name) (a) Create a view which will show all those employee_name whose salary is greater than 5000 along with their manager_name. (b) Can we update manager_name of any employee in this view? If yes, then write the SQL query or if not, then give the reason.