Would love to get feedback/advice on a database design modification I am working on.
I am working on a database of all rooms in a facility.
I have created a RoomHeader table that contains all the rooms in the building, and another table that only has Guest Lodging. There is a one-to-one relationship between Header and Guest Lodging.
Now I have found out that rooms in Guest Lodging can change temporarily, to be used for purposes other than guest lodging. It is this situation that I am trying to modify my database for. Currently, only rooms that are guest lodging exist on guest lodging table, and all forms, reports, etc. work on this premise.
One workaround I thought of was to add an 'inactive' flag to guest lodging table, marking a room as inactive when it becomes not guest lodging. This would probably involve changes to most forms and reports, though, to exclude the inactive records, and possibly even adding this indicator to primary key. However, another design change I thought of was to move the non-lodging record to another table, like a 'holding table', deleting it from the lodging table. When its use changes back, delete the record from the holding table, write it back to the lodging table. The record would be 'toggled' back and forth between two tables. Does something like this make sense? Does anyone know of documented sample databases using a concept like this, that I could check out?
Would appreciate any feedback on this, especially on the toggling table option. Thanks.
lorirobn
I am working on a database of all rooms in a facility.
I have created a RoomHeader table that contains all the rooms in the building, and another table that only has Guest Lodging. There is a one-to-one relationship between Header and Guest Lodging.
Now I have found out that rooms in Guest Lodging can change temporarily, to be used for purposes other than guest lodging. It is this situation that I am trying to modify my database for. Currently, only rooms that are guest lodging exist on guest lodging table, and all forms, reports, etc. work on this premise.
One workaround I thought of was to add an 'inactive' flag to guest lodging table, marking a room as inactive when it becomes not guest lodging. This would probably involve changes to most forms and reports, though, to exclude the inactive records, and possibly even adding this indicator to primary key. However, another design change I thought of was to move the non-lodging record to another table, like a 'holding table', deleting it from the lodging table. When its use changes back, delete the record from the holding table, write it back to the lodging table. The record would be 'toggled' back and forth between two tables. Does something like this make sense? Does anyone know of documented sample databases using a concept like this, that I could check out?
Would appreciate any feedback on this, especially on the toggling table option. Thanks.
lorirobn