Joins: Difference between revisions

From Algorithm Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(5 intermediate revisions by the same user not shown)
Line 6: Line 6:
== Parameters ==  
== Parameters ==  


<pre>n, m: sizes of input tables</pre>
$m,n$: sizes of input tables


== Table of Algorithms ==  
== Table of Algorithms ==  
Line 24: Line 24:
|}
|}


== Time Complexity graph ==  
== Time Complexity Graph ==  


[[File:Joins - Time.png|1000px]]
[[File:Joins - Time.png|1000px]]
== Space Complexity graph ==
[[File:Joins - Space.png|1000px]]
== Pareto Decades graph ==
[[File:Joins - Pareto Frontier.png|1000px]]

Latest revision as of 09:07, 28 April 2023

Description

An SQL join clause - corresponding to a join operation in relational algebra - combines columns from one or more tables in a relational database.

Parameters

$m,n$: sizes of input tables

Table of Algorithms

Name Year Time Space Approximation Factor Model Reference
Nested loop join 1960 $O(nm)$ $O({1})$ Exact Deterministic
Sort merge join 1960 $O(nlogn + mlogm)$ $O(n+m)$? Exact Deterministic
Hash join 1960 $O(n+m)$ $O(n+m)$? Exact Deterministic

Time Complexity Graph

Joins - Time.png