Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
dbw1276
Starting Member
8 Posts |
Posted - 2008-10-06 : 17:02:17
|
Okay, here's a question a coworker and I got into a debate over. I'm just curious what other people think. First a little background info:I have 2 tables. The first one (FacilityConfig) has facility specific configuration information. The second one (DepartmentConfig) has department specific configuration information. One facility has many departments.We recently needed to have a configuration value that could be set at the facility level but overriden at the department level. So, for example, the facility would set a general policy but specific departments within the facility could override the general policy for their department.And here's the question:If I have a non-nullable field in the FacilityConfig table regarding the facility policy and a nullable field in the DepartmentConfig table where a null value means the department wants to follow the facility policy, does this break normalization rules and is the DepartmentConfig table denormalized because of it? |
|
RickD
Slow But Sure Yak Herding Master
3608 Posts |
Posted - 2008-10-07 : 13:40:06
|
No, this doesn't break normalzation rules as far as I can see as these fields can't be linked by a key and are therfore seperate entities. Why not just set this value at the department level with a default value though as this would require less administartion and programming to check the value? |
|
|
dbw1276
Starting Member
8 Posts |
Posted - 2008-10-07 : 13:54:06
|
quote: Originally posted by RickD No, this doesn't break normalzation rules as far as I can see as these fields can't be linked by a key and are therfore seperate entities. Why not just set this value at the department level with a default value though as this would require less administartion and programming to check the value?
Yeah, that's a possiblity, but having a nullable configuration value allows the facility to change it's policy and have departments that want to follow the facility policy follow it. The null value says that they want their policy to be the same as the facility's. If the department has a non-null value then you know that the department has explicitly opted for that configuration value. |
|
|
|
|
|