Consider the tables above that show the relations and the existing tuples within
ID: 3737074 • Letter: C
Question
Consider the tables above that show the relations and the existing tuples within the Hire a Holiday Home relational schema. Currently the database only has a few tuples in each relation. However, it will store significantly more information in the future. Note: there can only be one host at a given address; a customer can only book with one host for any given night (they cannot book for someone else).
Choose the correct answer below for the following:
1. How many superkeys are there in the Hosts relation?.........................
2. How many candidate keys are there in the Bookings relation?........................
3. What is the most appropriate primary key of the Bookings relation?....................
4. What are the foreign keys in the Bookings relation?..................... and ?................
Customers customerlD C001 C002 C003 C004 firstName Tony Daniel Jimmy Jimmy lastName Sahama James Jimmy James email tony@gmail.com dan@yahoo.com phoneNumber 0432328888 0412348711 0725637822 0488226739 jimmy@gmail.com Hosts hostID H001 H002 H003 H004 H005 name Joe Hockey Malcom Tunbull Richy Rich Empire Builder Richy Rich address 101 Blue St 22 Riverview Rd 99 Penthouse Dr 01 Mountain Rd 22 Kiribilli St Bookings bookinglD B001 B002 B003 B004 B005 hostID H002 H004 H001 H004 H002 customerlD C001 C002 C001 C004 C001 dateFromm 20/08/2018 25/08/2018 24/08/2018 25/08/2018 30/08/2018 numberOfNights 4Explanation / Answer
1. There is only one super key in Hosts relationship.
{Host_id , name}.
2.There is only one candidate key. bookingID is only candidate key which can be identified uniquely. Other variables can't identify uniquely since they are depending.
3.BookingID is most appropriate primary key which uniquely identified
4.HostID and customerID are foreign keys