Question duplicate records

xirokx

Registered User.
Local time
Today, 15:46
Joined
Jun 28, 2009
Messages
47
Hi there,

I have now completed my database.

However I realised there is a potential flaw with it that needs rectifiying.

How do I tweak my database to allow for:-

- if a driver leaves I retain his records but can assign his call sign i.e. 01 or 02 to a new driver that joins whilst keeping hold of previous information stored for the old driver against that call sign?

- 1 driver may have 2 vehicles, how can I tell MS access which vehicle is activate but still retain historic records for previous vehicles that driver has owned?

your comments would be appreciated

thanks
 
- if a driver leaves I retain his records but can assign his call sign i.e. 01 or 02 to a new driver that joins whilst keeping hold of previous information stored for the old driver against that call sign?
Is is all in how use use the call sign. I would have a call sign (master list) table. Use a junction table (tblDriveCallSign) to relate the call sign to drives. This will also give you a history of call sign assignments.

Junction table example:
Code:
tblDriverCallSign
- DriverCallSignID - autonumber - Primary key
- DriverCallSignCallSignID  - foreign key to relate to the Call Sign table
- DriverCallSignDriverID - foreign key to relate to the Driver table
- DriverCallSignStartDate 
- DriverCallSignEndDate




- 1 driver may have 2 vehicles, how can I tell MS access which vehicle is activate but still retain historic records for previous vehicles that driver has owned?

Use a junction table to relate the driver to a vehicle. The same principle will able to drivers and vehicles as did with drives to call signs.

Junction table example:
Code:
tblDriverVehicles 
- DriverVehiclesID - autonumber - Primary key
- DriverVehiclesVehicleID  - foreign key to relate to the Vehicles table
- DriverVehiclesDriverID - foreign key to relate to the Driver table
- DriverVehiclesStartDate 
- DriverVehiclesEndDate
 
i love you

you rock

thank you very much
 

Users who are viewing this thread

Back
Top Bottom