question

anw194 avatar image
anw194 asked

Normalisation link table...

I need a vehicle table and a vehicle attributes table, the link table is to allow multiple attributes against the same vehicle. I need to repeat some attributes so that they form a count i.e. wheel, repeated 4 times for a car, 2 for a motorcycle. If I try adding the attribute 4 times I get an error. I need to do it this way so that one of the wheels can have a different value if required, say 'Spare'. Can this be accomplished or am I just thinking of this the wrong way? Thanks.,
tablenormalization
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Alvin Ramard avatar image
Alvin Ramard answered
Instead of adding the wheel attribute 4 times, it would make more sense to me to add the wheel attribute once, with a quantity of 4. I would do so by adding a Quantity column to the link table.
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

anw194 avatar image anw194 commented ·
Thanks for the reply. I'm looking at adding a 3rd key to the link table which can be used to differentiate the types.
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.