0
I have a registration of vehicles, which has a combo box with the years for the user to choose, these years come from the table "year". When I complete a registration of a new car, I have to give an insert in the table "car", my problem is there, how will I save the year that the user chose, if the table "car" does not have this field?
In a ratio 1 for many, as you defined between Car/Vehicle and Vehicle/Year, you will need to store the
id
of one table as a foreign key in the other. In this case, theid
from table 1 as foreign key in many table.– Woss
@Andersoncarloswoss I’m still learning, could give the example with the tables I have?
– Rich
Have how to detail what would be the vehicle table? It was not very clear to me the difference from it to car.
– Woss
@Andersoncarloswoss Of course, it came about because of the Cardinality (0.N), from what I saw in class this table Vehicle, it only receives foreign key. If there’s any doubt, I’ll try another example.
– Rich