Subject Correct join design
Author Rick DeBay
Given this relationship

AccountData1 --FK--> Account <--FK-- AccountData2

And the requirement to retrieve data from AccountData1 and AccountData2
(nothing is required from Account), what is the correct join?

AccountData1 join Account on AccountData1.fk = Account.id join
AccountData2 on AccountData2.fk = Account.id

AccountData1 join AccountData2 on AccountData1.fk = AccountData2.fk

The second version saves a join by cutting out the join to Account, as
we don't need any data from it. But this leaves out the element that
defines their relationship, which may not be desirable from a
maintenance/documentation point of view.
What I'm looking for is not what works or what is legal syntax, but what
is the pedantic answer, and how or whether it will affect performance.

Rick DeBay
Senior Software Developer
RxStrategies.net