A campus has buildings. A room has a number, such as 101, that is unique only inside its building.
buildingcode, name
1 : N, identifying
roomroom_number (partial key), capacity
The building table exists. Its key code is text; use integer for the room number and the capacity.
- Create
room(building_code, room_number, capacity). - Add three rooms: 101 in
OTN(capacity 40), 101 inCHM(capacity 120), 205 inCHM(capacity 30). - Before you run it: if you delete building
CHM, how many rooms are left? - Delete building
CHM.