Week 04 Lectures
Tuples
Tuples
Records vs Tuples
Converting Records to Tuples
Operations on Records
Operations on Tuples
Fixed-length Records
Variable-length Records
Data Types
Field Descriptors
Ex1: How big is a
FieldDesc
?
PostgreSQL Tuples
PostgreSQL Attribute Values
Implementing Relational Operations
DBMS Architecture (revisited)
Relational Operations
Cost Models
Cost Models
Query Types
Example File Structures
Ex2: Operation Costs
Scanning
Scanning
Selection via Scanning
Ex3: Cost of Search in Hashed File
Iterators
Example Query
Ex4: Implement next_tuple()
Relation Copying
Ex5: Cost of Relation Copy
Scanning in PostgreSQL
Scanning in other File Structures
Sorting
The Sort Operation
Two-way Merge Sort
Comparison for Sorting
Cost of Two-way Merge Sort
n-Way Merge Sort
Cost of n-Way Merge Sort
Ex6: Cost of n-Way Merge Sort
Sorting in PostgreSQL
Implementing Projection
The Projection Operation
Sort-based Projection
Ex7: Cost of Sort-based Projection
Cost of Sort-based Projection
Hash-based Projection
Ex8: Cost of Hash-based Projection
Cost of Hash-based Projection
Produced: 10 Mar 2020