I have two tables, 'Models' with a primary key Model_id and the second 'Devices' with primary key Device_id and foreign key Model_id.
The two tables have a one-to-one relation, that is to say that every model has only one device and that device can only be tied to one model.
The question is, how can I swap an existing device to another existing model?
I have two tables, 'Models' with a primary key Model_id and the second 'Devices' with primary key Device_id and foreign key Model_id.
The two tables have a one-to-one relation, that is to say that every model has only one device and that device can only be tied to one model.
The question is, how can I swap an existing device to another existing model?
How do you add new entries to the tables? Presumably the same issue should arise then, but there is some mechanism to work around it. Can the same workaround mechanism be used here?
No worries (I think). Always good to spot potholes in the road ahead so you can go around them rather than through them
I would have expected that the database transaction would only enforce restrictions (like one-to-one-ness) at the end of the transaction, and look the other way regarding any interim temporary transgressions.
But all my B4A data stuff so far has just been straight text files, so I'm possibly making unwarranted assumptions here.