- Cartesian Product
Join: a selection with an equality between one column of each table on top of a product is a Join, which is computed without materialising the product (hash join, Merge Join). With an arbitrary join condition the worst case falls back to t… §
- List Intersection
The same zipper principle merges (union) the lists: emit every element from both lists, advancing the pointer at the smaller element. This implements OR-semantics; Lecture 2 merges scored lists and sums the scores of equal doc IDs. The SQL… §
- Merge Join
Compute the single-column equi-Join X⋈j1,j2Y of tables X (with n1 rows) and Y (with n2 rows) on join columns j1 of X and j2 of Y. Assume the join-column values are available in sorted order as pairs §
- Query Optimization
Given n input tables A,B,C,… that a SQL query combines by binary joins, query optimization is the problem of finding, among all possible query plans, one with minimal total cost. A plan is a parenthesised expression such as… §
- Relational Algebra
| FROM T1 JOIN T2 ON T1.a = T2.b | Join T1⋈a,bT2 (VL05) | §
More generally, a Join is a selection on a Cartesian product that is computed without materialising the product (hash join, Merge Join). §
- Relational Model
The operations on tables (Relational Algebra: projection, selection, Cartesian Product, Join, Grouping) take tables and return a table, so they can be composed into query plans. SQL references columns by name cj; the formal operations r… §
- SPARQL Query Structure
| join | same variable in several triples | explicit equality conditions (Join) | §
- SPARQL to SQL Translation
Each join equality is an equi-Join condition; a shared SPARQL variable is exactly a join. §
- SQL Query Structure
| FROM | 1 | the Cartesian Product of all listed tables (or their Join with JOIN … ON) | ×, ⋈ | §
See Join for the definitions. §
- VL05 – Joins and more SQL
See Join. §
Inner and outer joins (Slide 18). The join defined above only includes rows whose join value occurs in both tables: an inner join (the default). Variants: §
- VL06 – Indexing, Query Optimization, ACID
Motivation (Slide 5). To accelerate a join, precompute an index on the join columns: §
Join — index-based join in SQLite3 and the merge join fed by B+ tree leaves §
- VL07 – Knowledge Graphs, SPARQL, SPARQL to SQL
| Join | the same variable in different triples (cf. Join) | explicit equality conditions | §
where the sum is over all variables v of the query and mv is the number of occurrences of v in the query triples (SPARQL to SQL Translation). Each join equality is an equi-Join condition in the sense of SQL’s FROM/WHERE. §
- SQL and Query Planning
Join — equi-join as a product + selection computed without the product; outer and natural joins, hash join §
| 2 | Product + equality selection is still too large | single-column equi-join, never materialising the product | Join | §
- Optional Graph PatternADIS
In SPARQL 1.1 OPTIONAL is defined as a left join. It corresponds to SQL’s LEFT OUTER JOIN (Join): rows of the left side without a partner are kept and padded with NULL. §
- Spatial JoinADIS
for a distance d. It is a non-equi Join: the condition compares geometries, not values for equality. §
- Advanced SPARQLADIS
| triple with shared variable | join: rows that match | + new variables | equi-Join | §