Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: o Merchandise, but should be Animal only) In Dog: Foreign Key(dogid) references Animal In TakesCareOf: Foreign Key(sin) references Employee Foreign Key(animal­id) references Animal Foreign Key(date) references Feeding c. {2 marks} Answer the following question about your relational schema: are there any constraints that cannot be modeled without using assertions? If so, which constraint(s)? If not, why not? We cannot model that every animal has to be taken care of by some employee without assertions. See slides 10 & 11 in second part of Relational Model Page 5 Name 4. Student No {14 marks} Consider a relational database about real estate that is maintained by a real estate agency. The database consists of the following table (where the primary keys are underlined): House (id, asking_price, address, postal_code, baths, beds, sqft, sellerID) Seller(id, name, home_phone, e­mail, agentID) Buyer(id, name, home_phone, e­mail, agentID) Agent(id, name, mobile_phone, e­mail) Sold(house_id, buyer_id, sale­date, selling_price) Where House gives information about a house for sale, seller gives information about the sellers of a house, Buyer gives information about (prospective) home buyers, Agent gives information about agents (who can act on behalf of either the buyer or the seller), and sold gives information about the sale of a particular home – including the pric...
View Full Document

This document was uploaded on 03/18/2014 for the course CPSC 304 at University of British Columbia.

Ask a homework question - tutors are online