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.
while I was putting dummy data in each of the table to verify
- if the table is in 3NF
- if the Primary Key need to be changed;
for Vehicle Type table, I can see Make & Model are taken as composite primary keys, but I can use duplicate values in each of these columns. e.g. below is a table I generated
Make Model Doors Body Trim Fuel
Toyota Camry 4 Sedan Sport Petrol
Toyota Camry 4 Sedan L Hybrid
Honda City 4 Sedan Aspire Hybrid
Honda Civic 4 Hatch Sport Hybrid
Considering the company may have multiple cars of same make/mode/doors...….., the table is not in even 1NF. I can solve it by
1- adding a unique identifier as a serial number in this table and use it with PK or
2- merge Vehicle table which has three attributes regNum / FleetNum / Colour with vehicle type. regNum / FleetNum both are unique and qualify to be a PK of the merged table.
Can you please guide which approach I should take? if we are allowed to merge / split / move attributes around from the ERD model, I would prefer to merge two tables rather than adding additional attributes.
I did consider using subclass / superclass however for the sake of implementation in SQLITE, merging seems to be best option.