This content has been marked as final. Show 3 replies
Thank you HamidHelal , but then, I discovered a limitation: if my Shifts table traces shifts over time (that's reasonable), then if I want to be able to change a department for a given user ID, since the existence of referential constraints with the parent Users table (that is not a fact table), I should first set nulls or 'cascading' delete the child rows in Shifts, and then I can change the department in Users table, thus I'm no longer able to trace past shifts for that DepartmentID/UserID....
Since my maniacal inclination for using as many constraints as possible for enforcing integrity at database level, if I wanted to fix and enforce the mentioned limit at database foreign key/check level, I'm still not able to answer, I'm doing some tests without results for now. Obviously I could perform all checks programmatically, at code level....
Edited by: user7095235 on 4-apr-2012 12.33
Edited by: user7095235 on 4-apr-2012 12.36