V
vbnetman via AccessMonster.com
I have an equipment maintenance db. Within it there are 3 tables causing me
some confusion and I am requesting some assistance. Here’s what I’ve got;
Tblworkorders
Workordernumber – PK
Date
Other work order info
Tblworkorderdetails
detailsID – PK
ref_workOrderNumber – FK to tblworkorders
tblPMschedule
unitid
pmname
pminterval
ref_detailsID – FK to detailsID
PMcomplete
Some notes on the design of the pmschedule table. The PK is a composite
consisting of the first 3 fields. I’m aware that this is not recommended and
that there may be consequences under certain conditions. Here’s a few
possible entries in the table;
Unitid – 1
Pmname – A
PMinterval – 50
Complete? – yes
Unitid – 1
Pmname – A
PMinterval - 500
Complete? - no
Unitid – 1
Pmname – A
PMinterval – 1000
Complete? – no
So, in this example, a unit can have an assigned PM-a with different
intervals like 50 hours, 500 hours or 1000 hours. Anyway, I need to get to
the point. I have a one to many relationship between the details table and
the schedule table. A details record can include many PM’s. But here is where
I become confused. Is this really a one to many relationship? A single detail
record can only have one PM making this a one to one relationship. While I
remain pondering, can someone shed some light?
Thank you
some confusion and I am requesting some assistance. Here’s what I’ve got;
Tblworkorders
Workordernumber – PK
Date
Other work order info
Tblworkorderdetails
detailsID – PK
ref_workOrderNumber – FK to tblworkorders
tblPMschedule
unitid
pmname
pminterval
ref_detailsID – FK to detailsID
PMcomplete
Some notes on the design of the pmschedule table. The PK is a composite
consisting of the first 3 fields. I’m aware that this is not recommended and
that there may be consequences under certain conditions. Here’s a few
possible entries in the table;
Unitid – 1
Pmname – A
PMinterval – 50
Complete? – yes
Unitid – 1
Pmname – A
PMinterval - 500
Complete? - no
Unitid – 1
Pmname – A
PMinterval – 1000
Complete? – no
So, in this example, a unit can have an assigned PM-a with different
intervals like 50 hours, 500 hours or 1000 hours. Anyway, I need to get to
the point. I have a one to many relationship between the details table and
the schedule table. A details record can include many PM’s. But here is where
I become confused. Is this really a one to many relationship? A single detail
record can only have one PM making this a one to one relationship. While I
remain pondering, can someone shed some light?
Thank you