Many To Many relationship in Query

G

Guest

Hello,

Is there a way to make a query with 'many to Many' relationship

between the tables\querys, that it based on ('outer join' in sql) ?

thanks a lot.

Yariv
 
L

Larry Linson

???? ????? said:
Hello,

Is there a way to make a query with 'many to Many' relationship

between the tables\querys, that it based on ('outer join' in sql) ?

thanks a lot.

The way to handle many-to-many relationships is to have a "junction" or
"intersection" table with foreign key to each of the tables. A query will
include all three tables with appropriate Joins.

For example, in a database relating Students to Classes... in which one
student may be taking multiple classes and each class has multiple students,
you'd have three tables:

Students
Classes
StudentInClass - the "junction" table with FK to Students and to Classes

Larry Linson
Microsoft Access MVP
 
G

Guest

thanks
--
תודה רבה


Larry Linson said:
The way to handle many-to-many relationships is to have a "junction" or
"intersection" table with foreign key to each of the tables. A query will
include all three tables with appropriate Joins.

For example, in a database relating Students to Classes... in which one
student may be taking multiple classes and each class has multiple students,
you'd have three tables:

Students
Classes
StudentInClass - the "junction" table with FK to Students and to Classes

Larry Linson
Microsoft Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top