PDA

View Full Version : [UNI] DB Schema (Edited)



yancho
23-01-2007, 09:50 AM
Scenario :

- I hope I will get an updated Vehicle - owner registration from ADT (most probably some .xml)

- Somehow not sure yet I need to record the weight of the Car with persons in it . The Vehicle weight as recorded on the log book is found in the data file from ADT

- Remember :
----A engine can change - A Chassis cannot
----A Car owner can change
----Vehicle Registration Can
----Chassis Number is too long to work with it as the main keyfield
----Car History is not my main concern
----At any moment each chassis will form part of a car, has a registration number, registered owner, and an engine
----Every person can have just one licence number(same as ID CARD Number) but can be licenced to drive many different vehicles
----> Cranes require a special Licence
----> Trailers require a special Licence : TR*****
----> My main concern is the Weight of the Car with Persons in it. Remember I will have the weight without any person in it just chassis and engine from the licence.. - if I find no hardware available I'll take an average based on the NSO Average weight of a Maltese person.

Reasons for what I did :

Consider that Bold Only means unique / Italics means Foreign Key / Bold Underlined means Primary Key
From the previous DB Schema I squashed all the details of the Vehicle together.
I left the Engine as a table alone since Engines can be replaced on Vehicles, and each Engine has its own Capacity.
Vehicle Type so as to be able to cater for all vehicles and just puts the ID instead of the description. Better to write select statements.
Created the Web Site User. As the ERD specifies each user can now control more than just one car. This is done using the Vehicle Owner table by combining both.


This is the schema I re-designed

[/URL]

Please comment on what / where to improve

Thanks

If you want to make reference to version 1 of the DB Schema please refer here :
[url=http://mepa-clan.info/images/erm_vehicle.jpg] (http://mepa-clan.info/images/erm_vehicle2.jpg)

PLEASE DON'T GO OFF TOPIC

Liquid Stealth
23-01-2007, 02:31 PM
manufacturers state the unladen weight and the laden weight... i.e. empty car, full car. ADT already do that as they give u the weight of vechile and max. weight of vechile with the most cargo on it (in the case of my LR). might be somethin to ask around for.

yancho
23-01-2007, 02:37 PM
u sure they give u max weight of the car? on the car licence they just write the weight with body + engine