

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
An in-depth look into the process of querying a database system, covering the various stages from parsing and validation to logical and physical plan execution. It includes examples of parse trees, logical plans, and physical plans, as well as discussions on iterator interfaces and the differences between blocking and non-blocking iterators.
Typology: Slides
1 / 3
This page cannot be seen from the preview
Don't miss anything!


3
FROM Enroll, Course WHERE Enroll.CID = Course.CID;
< select-list > < from-list >
< where-cond >
< table > < table >
< Query >
Enroll Course
PROJECT ( title , SID ) MERGE-JOIN ( CID )
SCAN ( Enroll )
SCAN ( Course )
Enroll Course
4
5
Enroll
Enroll
Course
Student
6
PROJECT ( title ) INDEX-NESTED-LOOP-JOIN ( CID )
Index on Enroll( SID )
Index on Course ( CID )
Index on Student ( name )
INDEX-SCAN ( name = “Bart”)
PROJECT ( title ) MERGE-JOIN ( CID )
SORT ( CID )SCAN (Course) MERGE-JOIN ( SID )
SCAN ( Enroll )
SCAN ( Student )
FILTER ( name = “Bart”)
SELECT Course.title FROM Student, Enroll, Course WHERE Student.name = ‘Bart’ AND Student.SID = Enroll.SID AND Enroll.CID = Course.CID;
9
10
11
R.open(); S.open(); r = R.getNext();
do { s = S.getNext(); if (s == null) { S.close(); S.open(); s = S.getNext(); if (s == null) return null; r = R.getNext(); if (r == null) return null; } } until (r joins with s); return rs;
R.close(); S.close();
12