SlideShare a Scribd company logo
B.Tech, CSE & IT, IV/V Sem, II/III Year
CS 502/IT405: Data Base Management System
Archana Tomar
Asst. Prof. ,Department Of Computer Science & Engineering
Unit 3
Cost optimization Technique part-2
Lecture No. 41
Outlines
• Prerequisite
• Cost optimization
• Join Algorithms
• Example
• Exercise
• Learning Outcomes
• References
DBMS
Prerequisite
• Query language
• Relational Algebra operations
• Set operation
Cost Based Optimization
DBMS <SELO: 5,12> <Reference No.: R1,R2> 1
Information about relations and attributes:
• NR: number of tuples
• BR: number of blocks
• SR: size of a tuple of R.
• FR: blocking factor; (FR = [NR/BR])
• V(A, R): number of distinct values
• SC(A, R): selectivity of attribute SC(A, R) = NR/V(A, R).
<Reference No.: R1,R2>
DBMS <SELO: 5,12> 2
Information about indexes:
• HTI: number of levels in index I (B+-tree).
• LBI: number of blocks occupied by leaf nodes in index I (first-level blocks).
• ValI: number of distinct values for the search key
Selection Operation
<Reference No.: R1,R2>
DBMS <SELO: 5,12> 3
σA=a(R)
where a is a constant value,
A an attribute of R
• File Scan
• S1 – Linear search cost(S1)= BR
Continue.
<Reference No.: R1,R2>
DBMS <SELO: 5,12> 4
• S2 – Binary search,
the file ordered based on attribute A (primary index)
cost(S2) = [log2 (BR)] +[SC(A, R)/ FR ] − 1
• If A is primary key, then SC(A, R) = 1, hence cost(S2) = [log2 (BR)].
Join Operations
– Nested-Loop Join
– Block Nested-Loop Join
– Index Nested-Loop Join
– Sort-Merge Join
– Hash-Join
<Reference No.: R1,R2>
DBMS <SELO: 5,12> 5
Nested-Loop Join
Evaluate the condition join R ✶ S
• for each tuple tR in R do begin
for each tuple tS in S do begin
check whether pair (tR, tS) satisfies join condition
if they do, add tR ◦ tS to the result
end
End
<Reference No.: R1,R2>
DBMS <SELO: 5,12> 6
An Improvement: Block Nested-Loop Join
for each block BR of R do begin
for each block BS of S do begin
for each tuple tR in BR do
for each tuple tS in BS do check whether pair (tR, tS) satisfies join
condition if they do, add tR ◦ tS to the result
end end end end
<Reference No.: R1,R2>
DBMS <SELO: 5,12> 7
• Example: –
• Compute CUSTOMERS ✶ ORDERS, with CUSTOMERS as the outer relation
<Reference No.: R1,R2>
DBMS <SELO: 5,12> 8
Sort-Merge Join
• first sort both relations on join attribute
• Join steps are similar to the merge stage
<Reference No.: R1,R2>
DBMS <SELO: 5,12> 9
Cost of computing for all joins
Assignment/Exercise
Difference between Nested Loop join and Sort Merge Join
13
DBMS
Learning Outcomes
• Understand about cost based optimization technique.
10
References
1. Korth, Silbertz,Sudarshan, “Fundamental of Database System”, McGraw Hill
2. https://www.cs.ucdavis.edu/~green/courses/ecs165a-w11/8-query.pdf
11
12

More Related Content

Similar to lecture 41 cost optimization.pptx

Dbms final quiz1
Dbms final quiz1Dbms final quiz1
Dbms final quiz1
nanmannit
 
Query Optimization - Brandon Latronica
Query Optimization - Brandon LatronicaQuery Optimization - Brandon Latronica
Query Optimization - Brandon Latronica
"FENG "GEORGE"" YU
 
Amazon DynamoDB 深入探討
Amazon DynamoDB 深入探討Amazon DynamoDB 深入探討
Amazon DynamoDB 深入探討
Amazon Web Services
 
Relational Database Design
Relational Database DesignRelational Database Design
Relational Database Design
Prabu U
 
Relational Database and Relational Algebra
Relational Database and Relational AlgebraRelational Database and Relational Algebra
Relational Database and Relational Algebra
Pyingkodi Maran
 
Relational Algebra and it's Operations pptx
Relational Algebra and it's Operations pptxRelational Algebra and it's Operations pptx
Relational Algebra and it's Operations pptx
danishriasat792
 
Instruction Set Architecture: MIPS
Instruction Set Architecture: MIPSInstruction Set Architecture: MIPS
Instruction Set Architecture: MIPS
Prasenjit Dey
 
Lesson 2 network database system
Lesson 2 network database systemLesson 2 network database system
Lesson 2 network database system
GiO Friginal
 
Database Management System Review
Database Management System ReviewDatabase Management System Review
Database Management System Review
Kaya Ota
 
Join operation
Join operationJoin operation
Join operation
Jeeva Nanthini
 
Bit Vectors Siddhesh
Bit Vectors SiddheshBit Vectors Siddhesh
Bit Vectors Siddhesh
Siddhesh Bhobe
 
System Software
System SoftwareSystem Software
System Software
PandurangBiradar2
 
Unit 04 dbms
Unit 04 dbmsUnit 04 dbms
Unit 04 dbms
anuragmbst
 
design-compiler.pdf
design-compiler.pdfdesign-compiler.pdf
design-compiler.pdf
FrangoCamila
 
AWS December 2015 Webinar Series - Design Patterns using Amazon DynamoDB
AWS December 2015 Webinar Series - Design Patterns using Amazon DynamoDBAWS December 2015 Webinar Series - Design Patterns using Amazon DynamoDB
AWS December 2015 Webinar Series - Design Patterns using Amazon DynamoDB
Amazon Web Services
 
Lesson11 transactions
Lesson11 transactionsLesson11 transactions
Lesson11 transactions
teddy demissie
 
uniT 4 (1).pptx
uniT 4 (1).pptxuniT 4 (1).pptx
uniT 4 (1).pptx
YashWaghmare27
 
Relational algebr
Relational algebrRelational algebr
Relational algebr
Visakh V
 
RDBMS
RDBMSRDBMS
RDBMS
NilaNila16
 
Lecture21-Query-Optimization-1April-2018.pptx
Lecture21-Query-Optimization-1April-2018.pptxLecture21-Query-Optimization-1April-2018.pptx
Lecture21-Query-Optimization-1April-2018.pptx
RishabMishra25
 

Similar to lecture 41 cost optimization.pptx (20)

Dbms final quiz1
Dbms final quiz1Dbms final quiz1
Dbms final quiz1
 
Query Optimization - Brandon Latronica
Query Optimization - Brandon LatronicaQuery Optimization - Brandon Latronica
Query Optimization - Brandon Latronica
 
Amazon DynamoDB 深入探討
Amazon DynamoDB 深入探討Amazon DynamoDB 深入探討
Amazon DynamoDB 深入探討
 
Relational Database Design
Relational Database DesignRelational Database Design
Relational Database Design
 
Relational Database and Relational Algebra
Relational Database and Relational AlgebraRelational Database and Relational Algebra
Relational Database and Relational Algebra
 
Relational Algebra and it's Operations pptx
Relational Algebra and it's Operations pptxRelational Algebra and it's Operations pptx
Relational Algebra and it's Operations pptx
 
Instruction Set Architecture: MIPS
Instruction Set Architecture: MIPSInstruction Set Architecture: MIPS
Instruction Set Architecture: MIPS
 
Lesson 2 network database system
Lesson 2 network database systemLesson 2 network database system
Lesson 2 network database system
 
Database Management System Review
Database Management System ReviewDatabase Management System Review
Database Management System Review
 
Join operation
Join operationJoin operation
Join operation
 
Bit Vectors Siddhesh
Bit Vectors SiddheshBit Vectors Siddhesh
Bit Vectors Siddhesh
 
System Software
System SoftwareSystem Software
System Software
 
Unit 04 dbms
Unit 04 dbmsUnit 04 dbms
Unit 04 dbms
 
design-compiler.pdf
design-compiler.pdfdesign-compiler.pdf
design-compiler.pdf
 
AWS December 2015 Webinar Series - Design Patterns using Amazon DynamoDB
AWS December 2015 Webinar Series - Design Patterns using Amazon DynamoDBAWS December 2015 Webinar Series - Design Patterns using Amazon DynamoDB
AWS December 2015 Webinar Series - Design Patterns using Amazon DynamoDB
 
Lesson11 transactions
Lesson11 transactionsLesson11 transactions
Lesson11 transactions
 
uniT 4 (1).pptx
uniT 4 (1).pptxuniT 4 (1).pptx
uniT 4 (1).pptx
 
Relational algebr
Relational algebrRelational algebr
Relational algebr
 
RDBMS
RDBMSRDBMS
RDBMS
 
Lecture21-Query-Optimization-1April-2018.pptx
Lecture21-Query-Optimization-1April-2018.pptxLecture21-Query-Optimization-1April-2018.pptx
Lecture21-Query-Optimization-1April-2018.pptx
 

Recently uploaded

欧洲杯赌球-欧洲杯赌球竞猜官网-欧洲杯赌球竞猜网站|【​网址​🎉ac10.net🎉​】
欧洲杯赌球-欧洲杯赌球竞猜官网-欧洲杯赌球竞猜网站|【​网址​🎉ac10.net🎉​】欧洲杯赌球-欧洲杯赌球竞猜官网-欧洲杯赌球竞猜网站|【​网址​🎉ac10.net🎉​】
欧洲杯赌球-欧洲杯赌球竞猜官网-欧洲杯赌球竞猜网站|【​网址​🎉ac10.net🎉​】
juliancopeman444
 
Clyde the cat and Space Poems by Basak Serin
Clyde the cat and Space Poems by Basak SerinClyde the cat and Space Poems by Basak Serin
Clyde the cat and Space Poems by Basak Serin
Basak24
 
The Future of Independent Filmmaking Trends and Job Opportunities
The Future of Independent Filmmaking Trends and Job OpportunitiesThe Future of Independent Filmmaking Trends and Job Opportunities
The Future of Independent Filmmaking Trends and Job Opportunities
LetsFAME
 
Morgan Freeman is Jimi Hendrix: Unveiling the Intriguing Hypothesis
Morgan Freeman is Jimi Hendrix: Unveiling the Intriguing HypothesisMorgan Freeman is Jimi Hendrix: Unveiling the Intriguing Hypothesis
Morgan Freeman is Jimi Hendrix: Unveiling the Intriguing Hypothesis
greendigital
 
Leonardo DiCaprio Super Bowl: Hollywood Meets America’s Favorite Game
Leonardo DiCaprio Super Bowl: Hollywood Meets America’s Favorite GameLeonardo DiCaprio Super Bowl: Hollywood Meets America’s Favorite Game
Leonardo DiCaprio Super Bowl: Hollywood Meets America’s Favorite Game
greendigital
 
原版制作(MUN毕业证书)纽芬兰纪念大学毕业证PDF成绩单一模一样
原版制作(MUN毕业证书)纽芬兰纪念大学毕业证PDF成绩单一模一样原版制作(MUN毕业证书)纽芬兰纪念大学毕业证PDF成绩单一模一样
原版制作(MUN毕业证书)纽芬兰纪念大学毕业证PDF成绩单一模一样
sh8tjqt6
 
Sara Saffari: Turning Underweight into Fitness Success at 23
Sara Saffari: Turning Underweight into Fitness Success at 23Sara Saffari: Turning Underweight into Fitness Success at 23
Sara Saffari: Turning Underweight into Fitness Success at 23
get joys
 
The Enigmatic Portrait, In the heart of a sleepy town
The Enigmatic Portrait, In the heart of a sleepy townThe Enigmatic Portrait, In the heart of a sleepy town
The Enigmatic Portrait, In the heart of a sleepy town
John Emmett
 
Tom Cruise Daughter: An Insight into the Life of Suri Cruise
Tom Cruise Daughter: An Insight into the Life of Suri CruiseTom Cruise Daughter: An Insight into the Life of Suri Cruise
Tom Cruise Daughter: An Insight into the Life of Suri Cruise
greendigital
 
The Enigma of the Midnight Canvas, In the heart of Paris
The Enigma of the Midnight Canvas, In the heart of ParisThe Enigma of the Midnight Canvas, In the heart of Paris
The Enigma of the Midnight Canvas, In the heart of Paris
John Emmett
 
一比一原版(UCSF毕业证)旧金山分校毕业证如何办理
一比一原版(UCSF毕业证)旧金山分校毕业证如何办理一比一原版(UCSF毕业证)旧金山分校毕业证如何办理
一比一原版(UCSF毕业证)旧金山分校毕业证如何办理
ytunuq
 
一比一原版(mcmaste毕业证书)加拿大麦克马斯特大学毕业证如何办理
一比一原版(mcmaste毕业证书)加拿大麦克马斯特大学毕业证如何办理一比一原版(mcmaste毕业证书)加拿大麦克马斯特大学毕业证如何办理
一比一原版(mcmaste毕业证书)加拿大麦克马斯特大学毕业证如何办理
abqenm
 
University of Western Sydney degree offer diploma Transcript
University of Western Sydney degree offer diploma TranscriptUniversity of Western Sydney degree offer diploma Transcript
University of Western Sydney degree offer diploma Transcript
soxrziqu
 
Abraham Laboriel Records ‘The Bass Walk’ at Evergreen Stage
Abraham Laboriel Records ‘The Bass Walk’ at Evergreen StageAbraham Laboriel Records ‘The Bass Walk’ at Evergreen Stage
Abraham Laboriel Records ‘The Bass Walk’ at Evergreen Stage
DiaDan Holdings Ltd
 
Sunny and Rishi 3 Written by Basak Serin
Sunny and Rishi 3 Written by Basak SerinSunny and Rishi 3 Written by Basak Serin
Sunny and Rishi 3 Written by Basak Serin
Basak24
 
Leonardo DiCaprio House: A Journey Through His Extravagant Real Estate Portfolio
Leonardo DiCaprio House: A Journey Through His Extravagant Real Estate PortfolioLeonardo DiCaprio House: A Journey Through His Extravagant Real Estate Portfolio
Leonardo DiCaprio House: A Journey Through His Extravagant Real Estate Portfolio
greendigital
 
Taylor Swift: Conquering Fame, Feuds, and Unmatched Success | CIO Women Magazine
Taylor Swift: Conquering Fame, Feuds, and Unmatched Success | CIO Women MagazineTaylor Swift: Conquering Fame, Feuds, and Unmatched Success | CIO Women Magazine
Taylor Swift: Conquering Fame, Feuds, and Unmatched Success | CIO Women Magazine
CIOWomenMagazine
 
The Gallery of Shadows, In the heart of a bustling city
The Gallery of Shadows, In the heart of a bustling cityThe Gallery of Shadows, In the heart of a bustling city
The Gallery of Shadows, In the heart of a bustling city
John Emmett
 
Brian Peck Leonardo DiCaprio: A Unique Intersection of Lives and Legacies
Brian Peck Leonardo DiCaprio: A Unique Intersection of Lives and LegaciesBrian Peck Leonardo DiCaprio: A Unique Intersection of Lives and Legacies
Brian Peck Leonardo DiCaprio: A Unique Intersection of Lives and Legacies
greendigital
 
From Teacher to OnlyFans: Brianna Coppage's Story at 28
From Teacher to OnlyFans: Brianna Coppage's Story at 28From Teacher to OnlyFans: Brianna Coppage's Story at 28
From Teacher to OnlyFans: Brianna Coppage's Story at 28
get joys
 

Recently uploaded (20)

欧洲杯赌球-欧洲杯赌球竞猜官网-欧洲杯赌球竞猜网站|【​网址​🎉ac10.net🎉​】
欧洲杯赌球-欧洲杯赌球竞猜官网-欧洲杯赌球竞猜网站|【​网址​🎉ac10.net🎉​】欧洲杯赌球-欧洲杯赌球竞猜官网-欧洲杯赌球竞猜网站|【​网址​🎉ac10.net🎉​】
欧洲杯赌球-欧洲杯赌球竞猜官网-欧洲杯赌球竞猜网站|【​网址​🎉ac10.net🎉​】
 
Clyde the cat and Space Poems by Basak Serin
Clyde the cat and Space Poems by Basak SerinClyde the cat and Space Poems by Basak Serin
Clyde the cat and Space Poems by Basak Serin
 
The Future of Independent Filmmaking Trends and Job Opportunities
The Future of Independent Filmmaking Trends and Job OpportunitiesThe Future of Independent Filmmaking Trends and Job Opportunities
The Future of Independent Filmmaking Trends and Job Opportunities
 
Morgan Freeman is Jimi Hendrix: Unveiling the Intriguing Hypothesis
Morgan Freeman is Jimi Hendrix: Unveiling the Intriguing HypothesisMorgan Freeman is Jimi Hendrix: Unveiling the Intriguing Hypothesis
Morgan Freeman is Jimi Hendrix: Unveiling the Intriguing Hypothesis
 
Leonardo DiCaprio Super Bowl: Hollywood Meets America’s Favorite Game
Leonardo DiCaprio Super Bowl: Hollywood Meets America’s Favorite GameLeonardo DiCaprio Super Bowl: Hollywood Meets America’s Favorite Game
Leonardo DiCaprio Super Bowl: Hollywood Meets America’s Favorite Game
 
原版制作(MUN毕业证书)纽芬兰纪念大学毕业证PDF成绩单一模一样
原版制作(MUN毕业证书)纽芬兰纪念大学毕业证PDF成绩单一模一样原版制作(MUN毕业证书)纽芬兰纪念大学毕业证PDF成绩单一模一样
原版制作(MUN毕业证书)纽芬兰纪念大学毕业证PDF成绩单一模一样
 
Sara Saffari: Turning Underweight into Fitness Success at 23
Sara Saffari: Turning Underweight into Fitness Success at 23Sara Saffari: Turning Underweight into Fitness Success at 23
Sara Saffari: Turning Underweight into Fitness Success at 23
 
The Enigmatic Portrait, In the heart of a sleepy town
The Enigmatic Portrait, In the heart of a sleepy townThe Enigmatic Portrait, In the heart of a sleepy town
The Enigmatic Portrait, In the heart of a sleepy town
 
Tom Cruise Daughter: An Insight into the Life of Suri Cruise
Tom Cruise Daughter: An Insight into the Life of Suri CruiseTom Cruise Daughter: An Insight into the Life of Suri Cruise
Tom Cruise Daughter: An Insight into the Life of Suri Cruise
 
The Enigma of the Midnight Canvas, In the heart of Paris
The Enigma of the Midnight Canvas, In the heart of ParisThe Enigma of the Midnight Canvas, In the heart of Paris
The Enigma of the Midnight Canvas, In the heart of Paris
 
一比一原版(UCSF毕业证)旧金山分校毕业证如何办理
一比一原版(UCSF毕业证)旧金山分校毕业证如何办理一比一原版(UCSF毕业证)旧金山分校毕业证如何办理
一比一原版(UCSF毕业证)旧金山分校毕业证如何办理
 
一比一原版(mcmaste毕业证书)加拿大麦克马斯特大学毕业证如何办理
一比一原版(mcmaste毕业证书)加拿大麦克马斯特大学毕业证如何办理一比一原版(mcmaste毕业证书)加拿大麦克马斯特大学毕业证如何办理
一比一原版(mcmaste毕业证书)加拿大麦克马斯特大学毕业证如何办理
 
University of Western Sydney degree offer diploma Transcript
University of Western Sydney degree offer diploma TranscriptUniversity of Western Sydney degree offer diploma Transcript
University of Western Sydney degree offer diploma Transcript
 
Abraham Laboriel Records ‘The Bass Walk’ at Evergreen Stage
Abraham Laboriel Records ‘The Bass Walk’ at Evergreen StageAbraham Laboriel Records ‘The Bass Walk’ at Evergreen Stage
Abraham Laboriel Records ‘The Bass Walk’ at Evergreen Stage
 
Sunny and Rishi 3 Written by Basak Serin
Sunny and Rishi 3 Written by Basak SerinSunny and Rishi 3 Written by Basak Serin
Sunny and Rishi 3 Written by Basak Serin
 
Leonardo DiCaprio House: A Journey Through His Extravagant Real Estate Portfolio
Leonardo DiCaprio House: A Journey Through His Extravagant Real Estate PortfolioLeonardo DiCaprio House: A Journey Through His Extravagant Real Estate Portfolio
Leonardo DiCaprio House: A Journey Through His Extravagant Real Estate Portfolio
 
Taylor Swift: Conquering Fame, Feuds, and Unmatched Success | CIO Women Magazine
Taylor Swift: Conquering Fame, Feuds, and Unmatched Success | CIO Women MagazineTaylor Swift: Conquering Fame, Feuds, and Unmatched Success | CIO Women Magazine
Taylor Swift: Conquering Fame, Feuds, and Unmatched Success | CIO Women Magazine
 
The Gallery of Shadows, In the heart of a bustling city
The Gallery of Shadows, In the heart of a bustling cityThe Gallery of Shadows, In the heart of a bustling city
The Gallery of Shadows, In the heart of a bustling city
 
Brian Peck Leonardo DiCaprio: A Unique Intersection of Lives and Legacies
Brian Peck Leonardo DiCaprio: A Unique Intersection of Lives and LegaciesBrian Peck Leonardo DiCaprio: A Unique Intersection of Lives and Legacies
Brian Peck Leonardo DiCaprio: A Unique Intersection of Lives and Legacies
 
From Teacher to OnlyFans: Brianna Coppage's Story at 28
From Teacher to OnlyFans: Brianna Coppage's Story at 28From Teacher to OnlyFans: Brianna Coppage's Story at 28
From Teacher to OnlyFans: Brianna Coppage's Story at 28
 

lecture 41 cost optimization.pptx

  • 1. B.Tech, CSE & IT, IV/V Sem, II/III Year CS 502/IT405: Data Base Management System Archana Tomar Asst. Prof. ,Department Of Computer Science & Engineering Unit 3 Cost optimization Technique part-2 Lecture No. 41
  • 2. Outlines • Prerequisite • Cost optimization • Join Algorithms • Example • Exercise • Learning Outcomes • References DBMS
  • 3. Prerequisite • Query language • Relational Algebra operations • Set operation
  • 4. Cost Based Optimization DBMS <SELO: 5,12> <Reference No.: R1,R2> 1 Information about relations and attributes: • NR: number of tuples • BR: number of blocks • SR: size of a tuple of R. • FR: blocking factor; (FR = [NR/BR]) • V(A, R): number of distinct values • SC(A, R): selectivity of attribute SC(A, R) = NR/V(A, R).
  • 5. <Reference No.: R1,R2> DBMS <SELO: 5,12> 2 Information about indexes: • HTI: number of levels in index I (B+-tree). • LBI: number of blocks occupied by leaf nodes in index I (first-level blocks). • ValI: number of distinct values for the search key
  • 6. Selection Operation <Reference No.: R1,R2> DBMS <SELO: 5,12> 3 σA=a(R) where a is a constant value, A an attribute of R • File Scan • S1 – Linear search cost(S1)= BR
  • 7. Continue. <Reference No.: R1,R2> DBMS <SELO: 5,12> 4 • S2 – Binary search, the file ordered based on attribute A (primary index) cost(S2) = [log2 (BR)] +[SC(A, R)/ FR ] − 1 • If A is primary key, then SC(A, R) = 1, hence cost(S2) = [log2 (BR)].
  • 8. Join Operations – Nested-Loop Join – Block Nested-Loop Join – Index Nested-Loop Join – Sort-Merge Join – Hash-Join <Reference No.: R1,R2> DBMS <SELO: 5,12> 5
  • 9. Nested-Loop Join Evaluate the condition join R ✶ S • for each tuple tR in R do begin for each tuple tS in S do begin check whether pair (tR, tS) satisfies join condition if they do, add tR ◦ tS to the result end End <Reference No.: R1,R2> DBMS <SELO: 5,12> 6
  • 10. An Improvement: Block Nested-Loop Join for each block BR of R do begin for each block BS of S do begin for each tuple tR in BR do for each tuple tS in BS do check whether pair (tR, tS) satisfies join condition if they do, add tR ◦ tS to the result end end end end <Reference No.: R1,R2> DBMS <SELO: 5,12> 7
  • 11. • Example: – • Compute CUSTOMERS ✶ ORDERS, with CUSTOMERS as the outer relation <Reference No.: R1,R2> DBMS <SELO: 5,12> 8
  • 12. Sort-Merge Join • first sort both relations on join attribute • Join steps are similar to the merge stage <Reference No.: R1,R2> DBMS <SELO: 5,12> 9
  • 13. Cost of computing for all joins
  • 14. Assignment/Exercise Difference between Nested Loop join and Sort Merge Join 13 DBMS
  • 15. Learning Outcomes • Understand about cost based optimization technique. 10
  • 16. References 1. Korth, Silbertz,Sudarshan, “Fundamental of Database System”, McGraw Hill 2. https://www.cs.ucdavis.edu/~green/courses/ecs165a-w11/8-query.pdf 11
  • 17. 12