Hi,
I was wondering how you guys deal with lookup table FK's where say one table is 'Staff' , someone leaves, if you delete a member of staff (no cascade), all child records are now orphans to the lookup table.
But if you leave the x-staff in the table it now appears in the front end application as an option in the drop down which obviously we don't want.
woul you add an extra column in the lookup table say 'Active' as boolean or int 1 = true / 0 = false or string 'yes/no' , however, and then amend the front end to exclude non-active records.
Thus keeping the correct parent child link for records that still need to have the x-staff name against them.
Or do you delete from the lookup and just allow orphans?
What is 'best practice', what do you do?
Thanks,
1DMF
"In complete darkness we are all the same, it is only our knowledge and wisdom that separates us, don't let your eyes deceive you."
"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"
Free Electronic Dance Music Download
I was wondering how you guys deal with lookup table FK's where say one table is 'Staff' , someone leaves, if you delete a member of staff (no cascade), all child records are now orphans to the lookup table.
But if you leave the x-staff in the table it now appears in the front end application as an option in the drop down which obviously we don't want.
woul you add an extra column in the lookup table say 'Active' as boolean or int 1 = true / 0 = false or string 'yes/no' , however, and then amend the front end to exclude non-active records.
Thus keeping the correct parent child link for records that still need to have the x-staff name against them.
Or do you delete from the lookup and just allow orphans?
What is 'best practice', what do you do?
Thanks,
1DMF
"In complete darkness we are all the same, it is only our knowledge and wisdom that separates us, don't let your eyes deceive you."
"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"
Free Electronic Dance Music Download