Good morning experts,
I’m attempting to track various meter readings in a vehicle maintenance db. I currently have 5 tables laid out as follows:
TblVehicles
VehID – PK
TblMeter
MeterID – PK
Ref_VehID – FK to TblVehicles.VehID
Ref_MeterType – FK to TblMeterType.MeterType
TblMeterRead
ID – PK
Ref_MeterID – FK to TblMeter.MeterID
MeterRead
ReadDate
TblMeterType
MeterType – PK
TblWorkOrders
WorkOrderID – PK
I have not set a relationship yet for TblWorkOrders as I’m stuck. Here’s my logic thus far.
1. A vehicle can have many meters and can be of several types ie; hourmeter, odometer, a replacement meter for one that’s failed, etc.
2. A meter can have many readings
Here’s my problem. I need to use a work order to record services on a vehicle and be able to say, for example, “on August 25, I replaced a headlamp, changed the oil and repaired a tire. The hourmeter reading at the time was 550 AND the odometer reading at the time was 22,000.” How do I tie TblworkOrders into this picture in terms of its relationship to other table(s)? Do I need additional structure? Any assistance would be appreciated.
Thank you
Directorz
I’m attempting to track various meter readings in a vehicle maintenance db. I currently have 5 tables laid out as follows:
TblVehicles
VehID – PK
TblMeter
MeterID – PK
Ref_VehID – FK to TblVehicles.VehID
Ref_MeterType – FK to TblMeterType.MeterType
TblMeterRead
ID – PK
Ref_MeterID – FK to TblMeter.MeterID
MeterRead
ReadDate
TblMeterType
MeterType – PK
TblWorkOrders
WorkOrderID – PK
I have not set a relationship yet for TblWorkOrders as I’m stuck. Here’s my logic thus far.
1. A vehicle can have many meters and can be of several types ie; hourmeter, odometer, a replacement meter for one that’s failed, etc.
2. A meter can have many readings
Here’s my problem. I need to use a work order to record services on a vehicle and be able to say, for example, “on August 25, I replaced a headlamp, changed the oil and repaired a tire. The hourmeter reading at the time was 550 AND the odometer reading at the time was 22,000.” How do I tie TblworkOrders into this picture in terms of its relationship to other table(s)? Do I need additional structure? Any assistance would be appreciated.
Thank you
Directorz