Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Resolving a Many-to-Many Relationship

Status
Not open for further replies.

bostonfrog

Programmer
Jul 14, 2003
79
MX
Is there any "formula-like" way of resolving the issue of a many-to-many table relationship? If, for example, I had two tables, 1 called PASSENGERS and another called FLIGHTS, I might be in quandary because a passenger could have many flights, and flights could have many passengers. Employing database rules, I would include the PK from each table to form a new "bridge" table consisting of a CPK using the primary key from both the PASSENGERS and FLIGHTS tables, such as possibly PASSENGER_TICKETS (CPK: FlightID/PassengerID). But is simply thinking about what 2 tables might have in common the only way to create the new bridge table to maintain the 1-to-many relationship, or is there some way of analyzing the field names in both tables to help one in defining what that new one should be?
-- Michel
 
Hi

"But is simply thinking about what 2 tables might have in common the only way to create the new bridge table ", the answer has to be yes, column names are arbitary, we (should) give meaningful names so that we can understand what is going on, but as far as the computer (or Access) is concerned, they could be called Field1, Field2 etc. Given that field or column names do not HAVE to have meaning, I do not see how any analysis of the names can yield reliable meaningful results ?

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
In Layman's terms: Access is not going to be able to find relationships and build them by itself unless you go through and code all the conditions as to which would define the relationships you want Access to look for.

If I take a peek in your Windows, to fix a problem, does that make me a "Peeping Tom"? Hmmmmmmmmmmv [pc1][shocked]
 
I didn't mean giving the fields arbitrary names like Field1 or Field2. I was just wondering if, based on the field names, it might help in developing a possible new table or tables, that's all.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top