I'm sorry to repost here, but it is so related that I found useless to create a new post:
Regarding this 1:1 relation here, I'm facing a hard time trying to understand how will the insert work here.
At the same time we insert something on Associations a corresponded Image should be inserted into the Image table.
On the logical part, I can have two inserts one after the other.
The first puts the data into Associations and the second, inserts an Image.
But... and those are my questions:
What if one of the tables, for some reason, doesn't work - we could have something on the Associations table, and nothing on Image table, supposing the image one was the table that didn't work for some reason.
What if two users, at different points, for a bizarre coincidence, are trying to insert data at the same time, then it could be the case that we have Two associations but with switched logos. :s
What should we do on those cases?
If those cases are very Very rare (I'm talking about a very little database here), then using one insert after another is the way to go?
Update: Why do I need those inserts to happen almost at the same time?
I'm assuming that, for retrieving the association and the correspond logo, I would join both tables where the id of one is equal to the fk of another, hence, when we insert (or delete) the id's should be synchronized.
I'm not getting this right perhaps... :s
Thanks a lot,