22-qp - Announcements (Tue. Nov. 29) Query Processing: A...

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

View Full Document Right Arrow Icon
1 Query Processing: A Systems View CPS 116 Introduction to Database Systems 2 Announcements (Tue. Nov. 29) ± Extra credit (20 points, assigned by email Nov. 7) due in one week (Dec. 6) ± Homework #4 deadline extended—due next Thursday (Dec. 8) ² Please start now! ± Sign up (via email) for a 30-minute slot in the project demo period, Dec. 12-14 ± Final exam 2-4pm Dec. 13 ² 4-5pm reserved for 2 project demos 3 A query’s trip through the DBMS Parser Validator Optimizer Executor Result SQL query SELECT title, SID FROM Enroll, Course WHERE Enroll.CID = Course.CID; Parse tree < SFW > < select-list > < from-list > < where-cond > < table >< table > < Query > Enroll Course Physical plan PROJECT ( title , SID ) MERGE-JOIN ( CID ) SCAN ( Enroll ) SCAN ( Course ) SORT ( CID ) Logical plan ¼ title , SID ¾ Enroll . CID = Course . CID Enroll Course £ 4 Parsing and validation ± Parser: SQL ! parse tree ² Good old lex & yacc will do ² Detect and reject syntax errors ± Validator: parse tree ! logical plan ² Detect and reject semantic errors • Nonexistent tables/views/columns? • Insufficient access privileges? • Type mismatches? –E x amp l e s : AVG(name) , name + GPA , Student UNION Enroll ² Also •Expand * • Expand view definitions ² Information required for semantic checking is found in system catalog (contains all schema information) 5 Logical plan ± Nodes are logical operators (often relational algebra operators) ± There are many equivalent logical plans ¼ title ¾ Student . name =“Bart” A Student . SID = Enroll . SID A
Background image of page 1

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

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

Page1 / 3

22-qp - Announcements (Tue. Nov. 29) Query Processing: A...

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

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