Problem solve Get help with specific problems with your technologies, process and projects.

Transitive joins

I'm trying to understand what the term "transitive join" means. Could you please explain, and perhaps give a simple example?

Literally, a transitive join is a join that "goes across" (if I remember my high school Latin, which was several decades ago). Merriam-Webster's second definition of transitive is:

being or relating to a relation with the property that if the relation holds between a first element and a second and between the second element and a third, it holds between the first and third elements

<equality is a transitive relation>

So in a transitive join, if rows of table A are joined to rows of table B, and those rows of table B are joined to rows of table C, then the rows of A could also be joined to rows of C, assuming, of course, that the same columns of B join to A and to C.

In fact, a good database optimizer may actually "throw in" the additional join clauses to join A to C, thus allowing more efficient paths to the final result set. An example of this is described in Join transitive closure on the Sybase Web site.

For More Information

Dig Deeper on Oracle and SQL