Jumat, 19 Februari 2016

[MS_AccessPros] Join me in a discussion of .... joins

 

Bad pun most definitely intentional and offered without apology.

 

I would like to expand my knowledge of joins especially in the following scenario.

 

Table1 is the primary table and has say, 100 records.

 

Tables2, 3, and 4 are relate subsidiary tables with foreign keys related to Table1’s primary key. Table 2 has 30 related records, Table3 has 10 and Table4 has 35.

 

As I see it, there are two different ways of setting up the joins with a number of variations that I won’t introduce here.

 

Scenario 1:

 

Table1 - Left - Table2 – Left - Table3 – Left – Table4

 

Scenario 2:

 

Table1 – Left – Table2

Table1 – Left - Table3

Table1 – Left - Table4

 

From what I have observed, queries using either of these scenarios yield the same 100 records with null records where none of them have a foreign key to one of Table1’s records.

 

My question is whether there are any significant differences, or hidden pitfalls to either of these approaches and which yields the more efficient query.

 

 

Glenn

 

 

__._,_.___

Posted by: "Glenn Lloyd" <argeedblu@gmail.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (1)

.

__,_._,___

Tidak ada komentar:

Posting Komentar