I have 2 tables that have a many to many (n:M) relationship. So, per the user manual, I created an intermediate table (rel_xxxxx) to resolve those into n:1 relationships. That is, the 2 keys in the rel table are the foreign keys of the other two tables. So…how do I load this intermediate table? Does it load automatically as I populate the other 2 tables? Note: when I set up the relationship I turned ON “update cascade”.
Please avoid posting as Wiki. It has limiting abilities.
This ‘intermediate’ table is simply another table. There is no automatic loading or filling in of data. It is a connector between the two other tables. You fill in the data which relates to the two tables.
Edit: A sample of such can be found in my answer on this post - click here.
Thanks again. So because it is manually done, there is a chance for an orphan key (one with no match in the corresponding table).
Not really. Of course nothing can overcome sloppy design & setup. If properly done, no problems.