8QP - QUERY PROCESSING (CHAPTER 13) Prof. Ghandeharizadeh 1...

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

View Full Document Right Arrow Icon
09/27/09 Prof. Ghandeharizadeh 1 QUERY PROCESSING (CHAPTER 13)
Background image of page 1

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

View Full DocumentRight Arrow Icon
09/27/09 Prof. Ghandeharizadeh 2 Software Architecture of a DBMS File System Buffer Pool Manager Abstraction of records Index structures Query Interpretor Query Optimizer Relational Algebra operators: , σ , ρ , δ , , , , ÷ , - Query Parser
Background image of page 2
09/27/09 Prof. Ghandeharizadeh 3 TERM DEFINITION P(R): Number of pages that constitute R t(R): Number of tuples that constitute R ν(A,R): the number of unique values for attribute A of R min(A,R): the minimum value for attribute A of R max(A,R): the maximum value for attribute A of R P(I R,A ): the number of pages that constitute the B + -tree index on attribute A of R d(I R,A ): the depth of a B + -tree index on attribute A of R lp(I R,A ): the number of leaf pages for a B + -tree index on attribute A of R B(I R,A ): the number of buckets for a hash index on attribute A of R
Background image of page 3

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

View Full DocumentRight Arrow Icon
09/27/09 Prof. Ghandeharizadeh 4 HEAP FILE ORGANIZATION Assume a student table: Student(name, age, gpa, major) t(Student) = 16 P(Student) = 4 Bob, 21, 3.7, CS Mary, 24, 3, ECE Tom, 20, 3.2, EE Kathy, 18, 3.8, LS Kane, 19, 3.8, ME Lam, 22, 2.8, ME Chang, 18, 2.5, CS Vera, 17, 3.9, EE Louis, 32, 4, LS Martha, 29, 3.8, CS James, 24, 3.1, ME Pat, 19, 2.8, EE Chris, 22, 3.9, CS Chad, 28, 2.3, LS Leila, 20, 3.5, LS Shideh, 16, 4, CS
Background image of page 4
09/27/09 Prof. Ghandeharizadeh 5 Non-Clustered Hash Index A non-clustered hash index on the age attribute with 4 buckets, h(age) = age % B Bob, 21, 3.7, CS Mary, 24, 3, ECE Tom, 20, 3.2, EE Kathy, 18, 3.8, LS Kane, 19, 3.8, ME Lam, 22, 2.8, ME Chang, 18, 2.5, CS Vera, 17, 3.9, EE Louis, 32, 4, LS Martha, 29, 3.8, CS James, 24, 3.1, ME Pat, 19, 2.8, EE Chris, 22, 3.9, CS Chad, 28, 2.3, LS Leila, 20, 3.5, LS Shideh, 16, 4, CS (29, (3,2)) (24, (1, 2)) (32, (3,1)) (20, (1,3)) (18, (1, 4)) (22, (2,2)) (22, (4,1)) (19, (2, 1)) (28, (4,2)) (20, (4,3)) (16, (4,4)) 0 1 2 3 (19, (3, 4)) (18, (2,3)) (24, (3,3))
Background image of page 5

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

View Full DocumentRight Arrow Icon
09/27/09 Prof. Ghandeharizadeh 6 Clustered Hash Index A clustered hash index on the age attribute with 4 buckets, h(age) = age % B Mary, 24, 3, ECE Tom, 20, 3.2, EE Kathy, 18, 3.8, LS Kane, 19, 3.8, ME Lam, 22, 2.8, ME Chang, 18, 2.5, CS Louis, 32, 4, LS Martha, 29, 3.8, CS James, 24, 3.1, ME Pat, 19, 2.8, EE Chris, 22, 3.9, CS Chad, 28, 2.3, LS Leila, 20, 3.5, LS Shideh, 16, 4, CS 0 1 2 3
Background image of page 6
09/27/09 Prof. Ghandeharizadeh 7 Non-Clustered Secondary B + -Tree A non-clustered secondary B+-tree on the gpa attribute Bob, 21, 3.7, CS Mary, 24, 3, ECE Tom, 20, 3.2, EE Kathy, 18, 3.8, LS Kane, 19, 3.8, ME Lam, 22, 2.8, ME Chang, 18, 2.5, CS Vera, 17, 3.9, EE Louis, 32, 4, LS Martha, 29, 3.8, CS James, 24, 3.1, ME Pat, 19, 2.8, EE Chris, 22, 3.9, CS Chad, 28, 2.3, LS Leila, 20, 3.5, LS Shideh, 16, 4, CS (3.7, (1, 1)) (3.8, (3,2)) (3.8, (2,1)) (3.9, (2,4)) (4, (3,1)) (3.8, (1,4)) (3.9, (4,1)) (4, (4,4)) (2.3, (4, 2)) (2.5, (2,3)) (2.8, (2,2)) (3.1, (3,3)) (3.2, (1,3) (2.8, (3,4)) (3, (1,2)) (3.5, (4,3)) 3.6
Background image of page 7

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

View Full DocumentRight Arrow Icon
09/27/09 Prof. Ghandeharizadeh 8 Non-Clustered Primary B + -Tree A non-clustered primary B+-tree on the gpa attribute Bob, 21, 3.7, CS Mary, 24, 3, ECE Tom, 20, 3.2, EE Kathy, 18, 3.8, LS Kane, 19, 3.8, ME Lam, 22, 2.8, ME Chang, 18, 2.5, CS Vera, 17, 3.9, EE Louis, 32, 4, LS Martha, 29, 3.8, CS James, 24, 3.1, ME Pat, 19, 2.8, EE Chris, 22, 3.9, CS Chad, 28, 2.3, LS Leila, 20, 3.5, LS Shideh, 16, 4, CS (3.7, (3, 1)) (3.8, (3,2)) (3.8, (3,3)) (3.9, (4,2)) (4, (4,3)) (3.8, (3,4)) (3.9, (4,1)) (4, (4,4)) (2.3, (1, 1)) (2.5, (1,2)) (2.8, (1,3)) (3.1, (2,2)) (3.2, (2,3) (2.8, (1,4)) (3, (2,1)) (3.5, (2,4)) 3.6
Background image of page 8
09/27/09 Prof. Ghandeharizadeh 9 Clustered B + -Tree A clustered B+-tree on the gpa attribute It is impossible to have a clustered secondary B + -tree on an attribute.
Background image of page 9

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

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

This note was uploaded on 01/11/2009 for the course CSCI 485 taught by Professor Ghandeharizadeh during the Fall '08 term at USC.

Page1 / 27

8QP - QUERY PROCESSING (CHAPTER 13) Prof. Ghandeharizadeh 1...

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

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