slides17 - Schedule Today: Mar. 7 (TH) x More OQL. x Read...

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

View Full Document Right Arrow Icon
Winter 2002 Arthur Keller – CS 180 17–1 Schedule Today: Mar. 7 (TH) More OQL. Read Sections 9.2-9.3. Mar. 12 (T) Semistructured Data, XML, XQuery. Read Sections 4.6-4.7. Assignment 8 due. Mar. 14 (TH) Data Warehouses, Data Mining. Project Part 7 due. Mar. 16 (Sa) Final Exam. 12–3PM. In class.
Background image of page 1

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

View Full DocumentRight Arrow Icon
Winter 2002 Arthur Keller – CS 180 17–2 Subqueries Used mainly in FROM clauses and with quantifiers EXISTS and FORALL . Example: Subquery in FROM Find the manufacturers of the beers served at Joe's. SELECT DISTINCT b.manf FROM ( SELECT s.beer FROM Sells s WHERE s.bar.name = "Joe's Bar" ) b
Background image of page 2
Winter 2002 Arthur Keller – CS 180 17–3 Quantifiers Boolean-valued expressions for use in WHERE -clauses. FOR ALL x IN <collection> : <condition> EXISTS x IN <collection> : <condition> The expression has value TRUE if the condition is true for all (resp., at least one) elements of the collection. Example Find all bars that sell some beer for more than $5. SELECT b.name FROM Bars b WHERE EXISTS s IN b.beersSold : s.price > 5.00 Problem How would you find the bars that only sold beers for more than $5?
Background image of page 3

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

View Full DocumentRight Arrow Icon
Winter 2002 Arthur Keller – CS 180 17–4 Example Find the bars such that the only beers they sell for more than $5 are manufactured by Pete’s. SELECT b.name FROM Bars b WHERE FOR ALL be IN ( SELECT s.beer FROM b.beersSold s WHERE s.price > 5.00 ) :
Background image of page 4
Winter 2002 Arthur Keller – CS 180 17–5 Extraction of Collection Elements a) A collection with a single member: Extract the member with ELEMENT . Example
Background image of page 5

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

View Full DocumentRight Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/21/2011 for the course CS CS 180 taught by Professor Dr.arthur during the Fall '01 term at The University of Akron.

Page1 / 17

slides17 - Schedule Today: Mar. 7 (TH) x More OQL. x Read...

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

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