R
RipperT
A design question:
I have a database listing (among other things) inmate bunks in a prison.
1-102B
where 1 is the housing unit number, 102 is the cell number and B is the bunk
(B for bottom, T for top)
Design rules suggest that I use a separate table for housing units (8 of
them), a separate table for cell number (120 in most units) and perhaps
another for bunk. I would like each in a drop down list from which the user
will select the appropiate housing unit number, cell number and bunk for the
given inmate.
Problem: some units have no top bunks, but they may be added later. Some
units have top bunks but no inmates lock there for security reasons, but this
may change later. And unit 8 is set up differently with just 36 cells and no
top bunks. What's the best way to remain flexible? Is there a way to have a
different drop down list of cells be available based on which housing unit
the user selects first?
Also, no two inmates can be assigned the same bunk (for obvious reasons).
How can I ensure this doesn't happen if using multiple tables?
Thanx,
Rip
I have a database listing (among other things) inmate bunks in a prison.
1-102B
where 1 is the housing unit number, 102 is the cell number and B is the bunk
(B for bottom, T for top)
Design rules suggest that I use a separate table for housing units (8 of
them), a separate table for cell number (120 in most units) and perhaps
another for bunk. I would like each in a drop down list from which the user
will select the appropiate housing unit number, cell number and bunk for the
given inmate.
Problem: some units have no top bunks, but they may be added later. Some
units have top bunks but no inmates lock there for security reasons, but this
may change later. And unit 8 is set up differently with just 36 cells and no
top bunks. What's the best way to remain flexible? Is there a way to have a
different drop down list of cells be available based on which housing unit
the user selects first?
Also, no two inmates can be assigned the same bunk (for obvious reasons).
How can I ensure this doesn't happen if using multiple tables?
Thanx,
Rip