ch4_SQL_intermediate

ch4_SQL_intermediate - Chapter 4: Intermediate SQL Chapter...

Info iconThis preview shows pages 1–13. Sign up to view the full content.

View Full Document Right Arrow Icon
Chapter 4: Intermediate SQL Chapter 4: Intermediate SQL
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
©Silberschatz, Korth and Sudarshan 4.2 Database System Concepts - 6 th Edition Chapter 4: Intermediate SQL Chapter 4: Intermediate SQL Join Expressions Views Transactions Integrity Constraints SQL Data Types and Schemas Authorization
Background image of page 2
©Silberschatz, Korth and Sudarshan 4.3 Database System Concepts - 6 th Edition Joined Relations Joined Relations Join operations take two relations and return as a result another relation. A join operation is a Cartesian product which requires that tuples in the two relations match (under some condition). It also specifies the attributes that are present in the result of the join. The join operations are typically used as subquery expressions in the from clause.
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
©Silberschatz, Korth and Sudarshan 4.4 Database System Concepts - 6 th Edition Join operations – Example Join operations – Example Relation course Relation prereq Note: prereq information missing for CS-315 and course information missing for CS-437.
Background image of page 4
©Silberschatz, Korth and Sudarshan 4.5 Database System Concepts - 6 th Edition Outer Join Outer Join An extension of the join operation that avoids loss of information. Computes the join and then adds tuples form one relation that does not match tuples in the other relation to the result of the join. Uses null values.
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
©Silberschatz, Korth and Sudarshan 4.6 Database System Concepts - 6 th Edition Left Outer Join Left Outer Join course natural left outer join prereq Note: read prere_id as prereq_id
Background image of page 6
©Silberschatz, Korth and Sudarshan 4.7 Database System Concepts - 6 th Edition Right Outer Join Right Outer Join course natural right outer join prereq
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
©Silberschatz, Korth and Sudarshan 4.8 Database System Concepts - 6 th Edition Full Outer Join Full Outer Join course natural full outer join prereq
Background image of page 8
©Silberschatz, Korth and Sudarshan 4.9 Database System Concepts - 6 th Edition Joined Relations Joined Relations Join operations take two relations and return as a result another relation. These additional operations are typically used as subquery expressions in the from clause Join condition – defines which tuples in the two relations match, and what attributes are present in the result of the join. Join type – defines how tuples in each relation that do not match any tuple in the other relation (based on the join condition) are treated.
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
©Silberschatz, Korth and Sudarshan 4.10 Database System Concepts - 6 th Edition Joined Relations – Examples Joined Relations – Examples course inner join prereq on course.course_id = prereq.course_id course left outer join prereq on course.course_id = prereq.course_id
Background image of page 10
©Silberschatz, Korth and Sudarshan 4.11 Database System Concepts - 6 th Edition Joined Relations – Examples Joined Relations – Examples course natural right outer join prereq course right outer join prereq using ( course_id )
Background image of page 11

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
©Silberschatz, Korth and Sudarshan 4.12 Database System Concepts - 6 th Edition Views Views
Background image of page 12
Image of page 13
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 09/10/2011 for the course CS 308 taught by Professor Frankl during the Spring '11 term at NYU Poly.

Page1 / 51

ch4_SQL_intermediate - Chapter 4: Intermediate SQL Chapter...

This preview shows document pages 1 - 13. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online