I am currently working on an interesting project. I have developed several straight forward databases, however this current setup has me a bit baffled as it has multiple 0:1 relationships and I'm not entirely sure if I am designing the tables and relationships correctly. I've read several SO questions How to Create Multiple one to one's. However, most of these questions are only one relationship deep, though I figure the basics are still the same.
My specs are as follows:
I. Restraint has Type
II. Type: Physical, Chemical, Mechanical
a. Physical has type
i. various Holds
b. Chemical has type
i. various Medicines
c. Mechanical has Type
i. Point has Type
1. various numbers
ii. Various devices
Restrictions:
1. Only one type per restraint
2. Only one type per Physical Restraint
3. Only one type per Chemical Restraint
4. Only one type per mechanical Restraint
i. If mechanical restraint type is Point only one Point Type per mechanical retraint
This is my current Design
As it shows I have a 1:Many from Restraint to RestraintType then a 0:1 from each of my RestraintType Tables. With this design, so I think, I could update any description or add new types without having to edit the Database. Unless a new Type of Restraint is added that has subcategories.
Is there a better way to design this setup? There is a lot more relationships like this on this project, however, if I can get a good grasp on this, the rest should be easy.
Edit
Here is a second design schema that condenses TypeRestraint lookups. It makes my normalization nerves tingle, but it might be more efficient?
Edit
Here is a more specific view of what is needed.
A restraint occurs. A restraint can be a Physical Restraint, a Chemical Restraint or a Mechanical Restraint. These are types of restraints that are mandated by government reporting.
A Physical Restraint is one of the following: 1-Person Hold, 2-Person Hold, Team Hold
A Chemical Restraint is one of the following: A single medicine at a specific dose or a pair of medicines at a specific dose.
A Mechanical Restraint is one of the following: Gloves, Belt, Chair, x Point Bed Restraint (Where x can be a number from 1 - 5), spit guard and other things that are added and removed periodically.
Physical restraint rarely if ever changes, as it is fairly straight forward. Chemical restraint changes as new drugs are used and old ones are phased out. Mechanical Restraint changes frequently.
A Restraint can only be one Type/Sub-Type
If say there was a 1-Person Hold, 2-Person Hold, Team-Hold then a Chemical Restraint to calm them down. That would be 4 Separate restraints, but that gets off into other requirements of the project.