The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Jul 2017 |
| Last Sign in: | 304 Weeks Ago, 6 Days Ago |
| Questions Answered: | 15833 |
| Tutorials Posted: | 15827 |
MBA,PHD, Juris Doctor
Strayer,Devery,Harvard University
Mar-1995 - Mar-2002
Manager Planning
WalMart
Mar-2001 - Feb-2009
Part 1.  Entity Integrity and Referential Integrity Rules
identify relationships among entities, identify foreign keys, and discuss entity integrity and referential integrity rules for the relations. Use the following excerpts from a relational database design. Chapter 4 in the Connolly textbook has examples and discussions of these topics.
The following tables are part of a relational database:
Hotel (hotelNo, hotelName, city)
Room (roomNo, hotelNo, type, price)
Booking (hotelNo, guestNo, dateFrom, dateTo, roomNo)
Guest (guestNo, guestName, guestAddress)
where the following are additional details:
1. Hotel contains hotel details and hotelNo is the primary key;
2. Room contains room details for each hotel and (roomNo, hotelNo) forms the primary key;
3. Booking contains details of the bookings and (hotelNo, guestNo, dateFrom) forms the primary key;
4. Guest contains guest details and guestNo is the primary key
Instructions
1. Identify relationships among the tables using a statement that includes the names of the entities and the relationship and multiplicity constraints in each direction. For example:
Each Hotel has many Rooms, Each Room is in one Hotel
In the above example, Hotel and Room are the entities and the relationship is "has". Notice that the name of the relationship changes form in the second part of the relationship to "is". Relationships are bidirectional and need to be stated in both directions.
2. Identify the foreign keys in this schema. For example:
hotelNo is a foreign key in the Room table.
3. Explain how the entity and referential integrity rules apply to each of these relations.
4. Place your exercise in a Word file. Include the questions and your answers under each of the questions. Include the examples above as part of your answer.
5. Name your file like DatabaseExercise2Part1YourLastNameYourFirstName.docx.
----------- Â ----------- H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly