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: | Apr 2017 |
| Last Sign in: | 103 Weeks Ago, 3 Days Ago |
| Questions Answered: | 4870 |
| Tutorials Posted: | 4863 |
MBA IT, Mater in Science and Technology
Devry
Jul-1996 - Jul-2000
Professor
Devry University
Mar-2010 - Oct-2016
|
Hotel (hotelNo, hotelName, city) Room (hotelNo, roomNo, type, price) Staff (name, SSN, address, phone, managerSSN) Cleaning (date, hotelNo, roomNo, staffSSN) Guest (guestNo, guestName, guestAddress) Booking (guestNo, hotelNo, roomNo, dateIn, dateOut) |
Â
The business rules for the above Centralized Hotel Chain System are:
[R1]Â Â When a hotel is closed and deleted from the database, all rooms in that hotel should be deleted from the database.
[R2]Â Â When a hotel identifier is changed and updated from the database, the information for all rooms in that hotel should be updated accordingly.
[R3]Â Â When a room in a hotel is deleted from the database, all scheduled cleanings for the room in the hotel should be deleted from the database.
[R4]Â Â A room in a hotel cannot be deleted from the database if there is any booking for the room in the hotel.
[R5]Â Â When a room identifier in a hotel is changed and updated from the database, all scheduled cleanings and bookings for the room in the hotel should be updated accordingly.
[R6]Â Â When a staff is fired or quits, all scheduled cleanings should be deleted from the database.
[R7]Â Â When a staff identifier is changed and updated from the database, all scheduled cleanings should be updated accordingly.
[R8]Â Â Staff information cannot be deleted or updated from the database, if the staff is a manager.
[R9]Â Â When a guest requests to be deleted from the database, all bookings by the guest should be deleted from the database.
[R10]Â Â Â Â Guest identification cannot be changed from the database, if there is any scheduled booking by the guest.
Â
Assignments – For each foreign key in each relation, identify:
Â
Â
|
Foreign Key |
Relation Name |
Matching Primary Key |
Base Relation Name |
Business Rule on Deletion |
ON DELETE |
Business Rule on Modification |
ON UPDATE |
|
HotelNo |
Room |
HotelNo |
Hotel |
 |
CASCADE |
R1 |
 |
|
ManagerSSN |
Staff |
SSN |
Staff |
 |
 |
R5 |
 |
|
HotelNo |
Cleaning |
HotelNo |
Hotel |
 |
 |
R2 |
 |
|
RoomNo |
Cleaning |
RoomNo |
Room |
 |
 |
R7 |
 |
|
StaffSSN |
Cleaning |
SSN |
Staff |
 |
 |
R6 |
 |
|
GuestNo |
Booking |
GuestNo |
Guess |
 |
 |
R4 |
 |
|
RoomNo |
Booking |
RoomNo |
Room |
 |
 |
R8 |
 |
|
HotelNo |
Booking |
HotelNo |
Hotel |
 |
 |
R3 |
 |
|
 |
 |
 |
 |
 |
 |
 |
-----------