BMGT 402 Lecture Notes - Lecture 4: Business Rule, Foreign Key, Unique Key
Document Summary
Consider a relational schema of a centralized hotel chain system as a set of relations as follows: 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.