Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


Many to Many Relationships help!

Many to Many Relationships help!

Many to Many Relationships help!

I need to link a photo/dvd library to individuals in the photo, the event that the photo/s were taken.
I can't see the wood for the trees a the moment..

Many thnaks

RE: Many to Many Relationships help!

A many to many has to be split up in two one to many.

For this you need a third table that comes 'in between' your two other tables, call it photoDVD_LineItem.

Make sure you have an ID (parent key) in both tables, photoID and DVDID. Those keys need to uniquely identify the records.

In your LineItem table you bring the two IDs together.

In your photo table: photoID
In you DVD table: DVDID

In your LineItem you have two fields: photoID_fk and DVDID_fk.

In the graph screen draw a line from
photoTable:photoID to photoID_fk and from

When you look at the whole relationshipline you will see that the photos are related to the DVD, through your LineItem table.

Make records in the line item table for all the photos and all the DVD, where you show which photos are on which DVD.
You can make valuelist based on the fields in both tables for easy use.

Now you can put a portal in your DVD table, based on the LineItem relationship to show the related photos.

RE: Many to Many Relationships help!

Thank you Jean,

I understand that bit now and since my post we have bought the training manual which shows exactly as you explained it but! We need to do a bit more than than the that, I hope the following has a bit more meat to it.

We would like to able to look up an event and see who attended and see what photo's or a DVD-recording that was taken at the event, at the same time we would also like to search for an individual and see what photo's or a DVD-recordings that they have participated in and events they have attended.

I hope this explains it a bit more.
many thanks

RE: Many to Many Relationships help!

Same way of working John.

You have 4 entities: event, individual, photo, DVD.
Each in a table with a unique ID.

For 'each link to each link' you need a parentKey and a foreignKey.

>>to look up an event and see who attended and see what photo's or a DVD-recording that was taken at the event

It is clear all your links are many to many, so for each link you need a lineItem table in between with the pk and the fk.

Look in your training manual for the topic about 'records further away in the graph'.

Set up your portals in each table so you can see in Event the individuals at the given event, the photo's and the DVD.
With a button on each row linked to a script with the GTRR (Go to Related Record), you can easely navigate from Events to each individual, to photo's to DVDs.
The GTRR script will sort and isolate your records in each table.

Do the same in all the other tables, Individuals to see the events, Photo's to see the individuals, DVD to see the events etc.

The basic is a really good understanding of relationships and how to make them (from which perspectif) in the relationship graph.


RE: Many to Many Relationships help!

Thank you JeanW,

I can't find any reference to 'records further away in the graph' in the FM9 training manual though.

I'll attempt your suggestions shortly.


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close