Database Management INFS 614
Popular in Course
Popular in Science
This 5 page Class Notes was uploaded by Hazle Turcotte on Monday September 28, 2015. The Class Notes belongs to INFS 614 at George Mason University taught by Staff in Fall. Since its upload, it has received 46 views. For similar materials see /class/215087/infs-614-george-mason-university in Science at George Mason University.
Reviews for Database Management
Report this Material
What is Karma?
Karma is the currency of StudySoup.
Date Created: 09/28/15
INFS614 001 Sample of Final Exam Name Student ID Grade Out of 100 Problem 1 A database contains information about hotels corporations of hotels and towns Answer the following questions 1 4 points Each hotel is located in exactly one town Each town has one or more hotels Is the following ER Diagram correct YESi m 2 4 points Each hotel belongs to at least one Hotel Corporation Each hotel corporation always has a group of one or more hotels Is the following ER Diagram correct YESi N07 3 4 points Assume in 2 above that the primary key for hotel is hid and for corporation is cid which of the following functional dependencies hold Check W the appropriate entries below hid cid Yes No cid hid Yes No 4 4 points Each hotel belongs to a unique hotel corporation Each hotel corporation has at least one hotel Each hotel has one or more rooms Each room belongs to exactly one hotel and has a room number that is only unique within a hotel identifies a room in a hotel Complete the following ER diagram add the appropriate relationship sets and key and participation constraints Note that Room is a weak entity set 4 points Translate your ERD to relational schemas Explain how each table schema is obtained from the ERD note from the m ERD not from the description INFS 614 Final Exam 1 of 5 Problem 2 Consider the following schemas to complete problem 2 The relation schemas are exactly the same as in homework assignments 3 and 4 n0 Instructor 1 8 points Express the following query using relational algebra List the SSN of students who never got a grade A including those who never nished any classes 2 8 points Express the following query using relational algebra Give the names of the students who have taken all the courses that student 123 studentSsn123 has taken You do not need to consider the courses they are currently taking 3 8 points Write the query of 2 above in SQL INFS 614 Final Exam 2 of 5 For your convenience the schemas are reprinted from the previous page to assist in answering the following questions no Instructor 4 8 points Write the following query in SQL For each faculty give the ssn and the percentage of Grad students status Grad enrolled in the courses taught by the faculty Note you DO NOT need to consider the possibility that a faculty may not teach any course and also you may assume no studens are enrolled in more than one classs 5 8 points Express the following query in SQL Find the departments D code that have the smallest number of students a student is considered belonging to the department if the student s major is that department You may assume that each department has at lest one student INFS 614 Final Exam 3 of 5 Problem 3 1 4 points Given a relation schema RABC and its relation instance as follows ABC Indicate which of the following functional dependencies are satisfied by the above relation instance a B gt A Yesi No i b A gt C Yesi No i c AB gt C Yesi No i d B gt C Yesi No i 2 8 points Let R be a relation schema with a set F of functional dependencies Let X and Y be subsets of the attributes in R Which of the following are correct statements a if X gt R then X must be a candidate key for R Yesi No i b if X gt R then X must be a superkey for R Yesi No i c if X gt XY then X gt Y Yesi No i d if XY gt Y then X gt Y Yesi No i 3 4 points Let RABC a relation schema that satisfies the following set of FDs A gt B C gt B Can you find a relation instance for R with at least 2 tuples that satisfies every FD in F but does not satisfy the FD C gt A If yes give the instance If not explain why INFS 614 Final Exam 4 of 5