Deciding When to Write EQUI-JOINS and OUTER-JOINS: Assume you - TopicsExpress



          

Deciding When to Write EQUI-JOINS and OUTER-JOINS: Assume you have table Dept with 10 Rows and EMP with 50 Rows. And if the relationship between these two table is 1 to many (mandatory- meaning each department will have an employee and vice versa) then you can surely go in for EQUI-JOINS and output should be 50 Rows (without any limiting where condition). If the relationship is 1 to many (optional-meaning there are deparments without Employee or Employee without department) then Equi-joins might not necessarily be the right join operator (depending out the output required). For example, if user is looking for all the records in DEPT irrespective of matching records in EMP... or if user is looking for all the records in EMP irrespective of matching records in DEPT then EQUI-JOINs would not work. Think of OUTER-JOINS (left, right, full?)
Posted on: Thu, 24 Oct 2013 17:41:14 +0000

Trending Topics



Recently Viewed Topics




© 2015