diff --git a/crates/query-ops/docs/diagrams/architecture.dot b/crates/query-ops/docs/diagrams/architecture.dot
index 62eb353..a073ed4 100644
--- a/crates/query-ops/docs/diagrams/architecture.dot
+++ b/crates/query-ops/docs/diagrams/architecture.dot
@@ -31,15 +31,20 @@ style = "dashed"
color = "#888888"
fontcolor = "#555555"
margin = 18
-edge_table [label = <
-| Table: edge |
+author_table [label = <
+| Table: author |
| • arity 2 |
-| • rows: (src, dst) |
+| • rows: (name, book) |
>, fillcolor = "#E8F4FD", color = "#2196F3"]
-labeled_table [label = <
-| Table: labeled |
+bestseller_table [label = <
+| Table: bestseller |
| • arity 1 |
-| • rows: (node) |
+| • rows: (book) |
+
>, fillcolor = "#E8F4FD", color = "#2196F3"]
+price_table [label = <
+| Table: price |
+| • arity 2 |
+| • rows: (book, dollars) |
>, fillcolor = "#E8F4FD", color = "#2196F3"]
}
@@ -49,27 +54,20 @@ style = "dashed"
color = "#9C27B0"
fontcolor = "#7B1FA2"
margin = 14
-self_loops [label = <
-| self_loops |
-| pattern: [Var X, Var X] |
-| filter: row[0] == row[1] |
-| cols: [X] |
+author_rel [label = <
+| author_rel |
+| pattern: [Var name, Var book] |
+| cols: [name, book] |
>, fillcolor = "#F3E5F5", color = "#9C27B0"]
-edge_xy [label = <
-| edge_xy |
-| pattern: [Var X, Var Y] |
-| filter: none |
-| cols: [X, Y] |
+bestseller_rel [label = <
+| bestseller_rel |
+| pattern: [Var book] |
+| cols: [book] |
>, fillcolor = "#F3E5F5", color = "#9C27B0"]
-labeled_x [label = <
-| labeled_x |
-| pattern: [Var X] |
-| cols: [X] |
-
>, fillcolor = "#F3E5F5", color = "#9C27B0"]
-labeled_y [label = <
-| labeled_y |
-| pattern: [Var Y] |
-| cols: [Y] |
+price_rel [label = <
+| price_rel |
+| pattern: [Var book, Var dollars] |
+| cols: [book, dollars] |
>, fillcolor = "#F3E5F5", color = "#9C27B0"]
}
@@ -79,53 +77,46 @@ style = "dashed"
color = "#4CAF50"
fontcolor = "#388E3C"
margin = 14
-q1 [label = <
-| Q1: semijoin |
-| edge(X, X), labeled(X) |
-| keep left rows whose [X] is in right |
-| cols: [X] |
+semijoin_step [label = <
+| semijoin |
+| authors of bestsellers |
+| shared: book |
+| cols: [name, book] |
>, fillcolor = "#E8F5E9", color = "#4CAF50"]
-q2 [label = <
-| Q2: natural_join |
-| edge(X, Y), labeled(Y) |
-| emit left ++ (right \ shared) per match |
-| cols: [X, Y] |
+natural_join_step [label = <
+| natural_join |
+| attach each book's price |
+| shared: book |
+| cols: [name, book, dollars] |
>, fillcolor = "#E8F5E9", color = "#4CAF50"]
}
-subgraph cluster_outputs {
-label = "Outputs (binding relations)"
+subgraph cluster_output {
+label = "Output (binding relation)"
style = "dashed"
color = "#888888"
fontcolor = "#555555"
margin = 18
-q1_out [label = <
-| Q1 result |
-| labeled self-loops |
-| cols: [X] |
-
>, fillcolor = "#ECEFF1", color = "#607D8B"]
-q2_out [label = <
-| Q2 result |
-| edges into labeled nodes |
-| cols: [X, Y] |
+result [label = <
+| Q result |
+| authors of bestsellers with each book's price |
+| cols: [name, book, dollars] |
>, fillcolor = "#ECEFF1", color = "#607D8B"]
}
// Atom scans consume tables
-edge_table -> self_loops [color = "#2196F3"]
-edge_table -> edge_xy [color = "#2196F3"]
-labeled_table -> labeled_x [color = "#2196F3"]
-labeled_table -> labeled_y [color = "#2196F3"]
+author_table -> author_rel [color = "#2196F3"]
+bestseller_table -> bestseller_rel [color = "#2196F3"]
+price_table -> price_rel [color = "#2196F3"]
-// Q1: edge(X, X), labeled(X) -> semijoin
-self_loops -> q1 [label = "left", color = "#9C27B0"]
-labeled_x -> q1 [label = "right", color = "#9C27B0"]
+// semijoin narrows author_rel to bestseller authors
+author_rel -> semijoin_step [label = "left", color = "#9C27B0"]
+bestseller_rel -> semijoin_step [label = "right", color = "#9C27B0"]
-// Q2: edge(X, Y), labeled(Y) -> natural_join
-edge_xy -> q2 [label = "left", color = "#9C27B0"]
-labeled_y -> q2 [label = "right", color = "#9C27B0"]
+// natural_join attaches price
+semijoin_step -> natural_join_step [label = "left", color = "#4CAF50"]
+price_rel -> natural_join_step [label = "right", color = "#9C27B0"]
-// Final outputs
-q1 -> q1_out [color = "#4CAF50"]
-q2 -> q2_out [color = "#4CAF50"]
+// Final output
+natural_join_step -> result [color = "#4CAF50"]
}
diff --git a/crates/query-ops/docs/diagrams/architecture.svg b/crates/query-ops/docs/diagrams/architecture.svg
index 1d3a2be..f02b646 100644
--- a/crates/query-ops/docs/diagrams/architecture.svg
+++ b/crates/query-ops/docs/diagrams/architecture.svg
@@ -1,299 +1,159 @@
+ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
-