csce520-lect9 - Structured Query Language SQL Section 2...

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

View Full Document Right Arrow Icon
Structured Query Language SQL Section 2
Background image of page 1

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

View Full DocumentRight Arrow Icon
Farkas CSCE 520  2 Reading Assignments Database Systems The Complete Book: Chapters 6.2, 6.3,  6.4  Oracle9 Programming: Chapters 2.1, 2.2, 2.3, 2.4 Following lecture slides are modified from Jeff Ullman’s slides  for Fall 2002 -- Stanford  
Background image of page 2
Farkas CSCE 520  3 Example Database Dog-Kennel database Dog(name ,age,weight,breed ) Kennel(name ,license#,address ,phone) Owner(name, SSN ,phone) Boards(K.name,K.address,D.name,D.breed ) Owns(O.SSN,D.name, D.breed) Pays(O.SSN,  K.name,K.address,amount)
Background image of page 3

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

View Full DocumentRight Arrow Icon
Farkas CSCE 520  4 Multi-relational Queries Combine data from more than 1 relation List all relations in the FROM clause Attributes with the same name must be  distinguished
Background image of page 4
Farkas CSCE 520  5 Example List the name of the owner and the  name of his/her dog for all G.S. dogs  SELECT  Owner.name, D.name FROM  Owns, Owner WHERE  D.breed=‘G.S.’ AND              Owner.SSN=O.SSN  Result Owner.name D.name Mary Smith Pepper John White Rudy-Rose
Background image of page 5

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

View Full DocumentRight Arrow Icon
Farkas CSCE 520  6 Semantics of multi-relational queries
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 12/13/2011 for the course CSCE 522 taught by Professor Farkas during the Fall '11 term at South Carolina.

Page1 / 19

csce520-lect9 - Structured Query Language SQL Section 2...

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

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