Please consider offering answers and suggestions to help other students!
And if you fix a problem by following a suggestion here,
it would be great if other interested students could see a short
"Great, fixed it!" followup message.
Hi, I'm a student in the unit. It seems that there should be two foreign keys in HiredVehicle both referencing depotID - one for the depot the vehicle was picked up from and one for the depot it will be returned to. There would be no point to recording both pick-up and return depots if vehicles were always returned to the same depot. Hence the depotID foreign key in Vehicle would change over time to reflect its current depot - but this means we lose the information about which depot a vehicle was hired from at a particular time. So I don't think we can just use a join between HiredVehicle and Vehicle although having the HiredVehicle - Depot connection does leave open the possibility for human error to write the incorrect pick-up depot in HiredVehicle (one that does not correspond to the Vehicle's current depotID FK value).
However, I do think that DailyTariff should not be connected to HiredVehicle as the TariffIDs for a vehicle should be derivable (though with a lot of work) from the Vehicle - HiredVehicle connection. Not only is there a possibility that someone will write an incorrect tariff type for a vehicle in HiredVehicle, but multiple tariff types are associated with one vehicle if we follow the connections between the tables so we would not be able to store all of these types in one FK column in HiredVehicle even if we wanted to, unless we change the relationship to many to many between DailyTariff and HiredVehicle (which is not the case currently).