1 / 9

INNER JOIN (EQUI-JOIN) Predicate

INNER JOIN (EQUI-JOIN) Predicate. source tables. SELECT * FROM employee, department WHERE employee.DepartmentID = department.DepartmentID. is equivalent to. SELECT * FROM employee INNER JOIN department ON employee.DepartmentID = department.DepartmentID.

rufus
Télécharger la présentation

INNER JOIN (EQUI-JOIN) Predicate

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. INNER JOIN (EQUI-JOIN) Predicate source tables SELECT * FROM employee, department WHERE employee.DepartmentID = department.DepartmentID is equivalent to SELECT * FROM employee INNERJOIN department ON employee.DepartmentID = department.DepartmentID or the same using another syntactic sugar SELECT Employee.lastName, DepartmentID, Department.DepartmentName FROM Employee INNERJOIN Department USING(DepartmentID); the result of employee department taken fromhttp://en.wikipedia.org/wiki/Join_(SQL)

  2. NATURAL JOIN Predicate source tables SELECT * FROM employee NATURAL JOIN department the result taken fromhttp://en.wikipedia.org/wiki/Join_(SQL)

  3. CROSS JOIN (CARTESIAN PRODUCT) Predicate source tables SELECT * FROM employee CROSS JOIN department is the same as implicit expression SELECT * FROM employee, department; the result of employee department … … … … taken fromhttp://en.wikipedia.org/wiki/Join_(SQL)

  4. LEFT OUTER JOIN Predicate source tables SELECT * FROM employee LEFT OUTER JOIN department ON employee.DepartmentID = department.DepartmentID the result taken fromhttp://en.wikipedia.org/wiki/Join_(SQL)

  5. RIGHT OUTER JOIN Predicate source tables SELECT * FROM employee RIGHT OUTER JOIN department ON employee.DepartmentID = department.DepartmentID the result taken fromhttp://en.wikipedia.org/wiki/Join_(SQL)

  6. FULL OUTER JOIN Predicate source tables SELECT * FROM employee FULL OUTER JOIN department ON employee.DepartmentID = department.DepartmentID the result taken fromhttp://en.wikipedia.org/wiki/Join_(SQL)

  7. THETA-JOIN (Θ-JOIN) Predicate Θ  {< , > , = ,  ,  ,  } an example …. There is possible to define yet more abstract joins such as SEMI-JOIN, ANTI-JOIN etc. taken fromhttp://en.wikipedia.org/wiki/Join_(relational_algebra)#Joins_and_join-like_operators

  8. RDM example – Doctor’s Office conceptual model of the problem possible relational implementation

  9. Query example What are surnames and addresses of doctors having diagnosis alergy?

More Related