I have a situation where I have three tables (InternalEvents, ExternalEvents, Classes) that each need access to a RoomReservations table. Each event or class may reserve multiple rooms, so each of those is on the one side of a one-to-zero-or-many relationship with RoomReservations.
The RoomReservations table is basically just a join table between these three tables and the Rooms table. So, in the RoomReservations table, each row will list the Room being reserved, and the class, internal event, or external event which is reserving it.
My problem is with referential integrity. Is there a way to tell the RoomReservations table that each row must correspond with a row in one of the three tables?
The RoomReservations table is basically just a join table between these three tables and the Rooms table. So, in the RoomReservations table, each row will list the Room being reserved, and the class, internal event, or external event which is reserving it.
My problem is with referential integrity. Is there a way to tell the RoomReservations table that each row must correspond with a row in one of the three tables?