I have a question about how to relate two tables.
The problem is I do not know what kind of relationship to create for this example.
Bearing in mind that in my FUEL table I have 2 records:
IDcombustible | Combustible
---------------------------
1 | Diesel
2 | Gasolina
Now I enter an engine and assign the type of fuel. The number 1 that is diesel.
idmotor | tipo_motor | combustible_idcombustible
------------------------------------------------
1 | '2.5cc' | 1
Now the problem is that I need to enter another '2.5cc' engine but it exists with gasoline.
idmotor | tipo_motor | combustible_idcombustible
------------------------------------------------
1 | '2.5cc' | 2
In doing so I realize that I again enter another record in the MOTOR table with the column tipo_motor
with the value '2.5cc'
but with the column combustible_idcombustible
with value 2. I think it is not correct because there is redundancy of data.
What would be the correct way to relate the two tables?