Download presentation
Presentation is loading. Please wait.
Published byShonda Martin Modified over 9 years ago
1
Fan Qi fan.qi@nus.edu.sg Database Lab 1, com1 #01-08 CS3223 Tutorial 5
2
Projection Aim: Remove unwanted attributes (Select A,B,C) Eliminate duplicates (Select Distinct) Approaches: Sorting Based Hash Based
3
Projection (Sorting) Step 1 Step 2Step 3
4
Projection (Optimized Sorting) Step 1 Step 2Step 3 Pass 0 Sorted Run Pass N Merge Phase Replace Step 1 by Pass 0 of Sorting Replace Step 3 by Pass N of Sorting; Pass 0 Sorted Run Pass N Merge Phase
5
Projection (Hash) Data cannot fit into main memory In order to build in- memory hash table for each R
6
Join Aim: Computing Cartesian Product of two sets ( Table A Join Table B) Algorithms: Iteration-based Nested loop Block nested loop Index-based Index nested loop Partition-based Sort-merge join Hash join
7
Join The one with smaller size
8
Question 1 Executives (ename, title, dname, address)
9
Question 2
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.