Ask Your Question
0

How to load an intermediate table

asked 2017-08-25 23:04:05 +0200

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

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".

edit retag flag offensive close merge delete

Comments

Please avoid posting as Wiki. It has limiting abilities.

Ratslinger gravatar imageRatslinger ( 2017-08-25 23:11:03 +0200 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2017-08-25 23:25:29 +0200

Ratslinger gravatar image

updated 2017-08-25 23:40:22 +0200

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.

edit flag offensive delete link more

Comments

Thanks again. So because it is manually done, there is a chance for an orphan key (one with no match in the corresponding table).

WayneRhodes gravatar imageWayneRhodes ( 2017-08-25 23:37:56 +0200 )edit

Not really. Of course nothing can overcome sloppy design & setup. If properly done, no problems.

Ratslinger gravatar imageRatslinger ( 2017-08-25 23:41:37 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2017-08-25 23:04:05 +0200

Seen: 68 times

Last updated: Aug 25 '17