I have table A with a primary id, a table B with a primary key id also and another table C with a primary key id and rows Aid and Bid where Aid and Bid are foreign keys of C and the primary keys of A and B respectively.
One way of populating these DB would be populating table A, table B and table C separately.
I would like to know if there is a more clever way of doing it, where I could populate A first and at the same time I populate B, I can indicate that an entry in C should be also created.
Any idea and suggestion on how to populate them is welcome. I'm trying to take advantage of the foreign keys structure.
Thanks.