I need an advice. I have some issue with modeling the database in SQL Server. Let's say I want to create a cars database. There are various type of engine like fuel, electric, hybrid. Every type has some specifications. But not the same (not the same columns in the table).
I have these tables (suppose all relations are 1:n)
Cars
ID (p.key)
ID_type (f.key)
Type
ID (p.key)
Name
ID_properties (f.key)
Properties
ID (p.key)
Value x
Value y
Value z
ID_contact (f.key)
Contact
ID (p.key)
name
Tel
Email
My problem is that every type has different columns in table properties so I think I need the special properties table for every type of the car, or another model. But I don't know exactly how to do it.
Can you please help me? (I appreciate some advice if this is a good solution).
Thank you very much.