Download presentation
Presentation is loading. Please wait.
1
ONE PASS ALGORITHM PRESENTED BY: PRADHYUMAN RAOL ID : 114 Instructor: Dr T.Y. LIN
2
Agenda One Pass algorithm Tuple-at-a-Time Unary Operators Binary Operations
3
One-Pass Algorithms One Pass Algorithm: Some methods involve reading the data only once from disk. They work only when at least one of the arguments of the operation fits in main memory.
4
Tuple-at-a-Time We read the blocks of R one at a time into an input buffer, perform the operation on the tuple, and more the selected tuples or the projected tuples to the output buffer. Examples: Selection & Projection
5
Tuple at a time Diagram Input bufferOutput buffer Unary operator R
6
Unary Operators The unary operations that apply to relations as a whole, rather than to one tuple at a time. Duplicate Elimination (R) :Check whether that tuple is already there or not. M= Main memory B( (R))= Size of Relation R Assumption: B( (R)) <= M
7
Unary Operators Grouping : A grouping operation gives us zero or more grouping attributes and presumably one or more accumulated value or values for each aggregation. Min or Max Count Sum Average
8
Binary Operations Set Union Set Intersection Set Difference Bag Intersection Bag Difference Product Natural join
9
Thank You
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.