JukeboxHero
Technical User
The idea is to write a db to keep track of people being absent due to various illnesses. But every person can become sick more than once of course.
I have a personnel tabel:
[Personnel]
*PersonnelID
various info
Now in theory - if I got the Boyd Codd thingie right - I could make a tabel [Absent] like this:
[Absent]
*PersonnelID
*AbsentID
various info
but, then you'd get something like
PersonID = 1
AbsentID = 1
various info
PersonID = 1
AbsentID = 2
various info
PersonID = 2
AbsentID = 1
various info
as you can see you'd have to manually change AbsentID, since you can't have it done automatically. Which is a major pain in the ass to update.
or I could do:
[Absent]
*AbsentID
PersonID
various info
using only one Primary Key (AbsentID)rather than using both of them as PKs. This way I could also use have my nummering done automatically.
Now for the actual question: is there a way to do it like the first one - so with 2 PKs - without making updating extremely annoying?
I have a personnel tabel:
[Personnel]
*PersonnelID
various info
Now in theory - if I got the Boyd Codd thingie right - I could make a tabel [Absent] like this:
[Absent]
*PersonnelID
*AbsentID
various info
but, then you'd get something like
PersonID = 1
AbsentID = 1
various info
PersonID = 1
AbsentID = 2
various info
PersonID = 2
AbsentID = 1
various info
as you can see you'd have to manually change AbsentID, since you can't have it done automatically. Which is a major pain in the ass to update.
or I could do:
[Absent]
*AbsentID
PersonID
various info
using only one Primary Key (AbsentID)rather than using both of them as PKs. This way I could also use have my nummering done automatically.
Now for the actual question: is there a way to do it like the first one - so with 2 PKs - without making updating extremely annoying?