Skip to content

Commit 98c838a

Browse files
docs(design): use DataJoint operators, not relational-algebra notation
Replace primed set-variables and union/intersection symbols with DataJoint expressions (`&`, restrict-by-list for OR, chained `&` for AND).
1 parent 5b5ff31 commit 98c838a

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

DESIGN-expand-restrict.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ exactly one parent row. Propagating a restriction across that edge is itself a
1919
foreign-key attributes (`&` with a query expression). It works in either
2020
direction:
2121

22-
- **downstream** (parent restricted `T'` → child): `S' = S & T'`the children
23-
whose parent is in `T'`.
24-
- **upstream** (child restricted `S'` → parent): `T' = T & S'`the parents
25-
referenced by `S'`.
22+
- **downstream** (a restriction on the parent, carried to the child):
23+
`child & parent_restricted` — the child rows whose parent is in the restricted set.
24+
- **upstream** (a restriction on the child, carried to the parent):
25+
`parent & child_restricted` — the parent rows referenced by the restricted child.
2626

2727
Downstream and upstream are the *same* operation pointed opposite ways along the
2828
same FK. This is the whole engine; everything below is about how the edge rule
@@ -143,8 +143,9 @@ descendant; `expand` + combine cannot assemble it, `restrict.restrict` does.
143143
**intersects** a propagated condition in (carve). One representation, so they
144144
chain in any order — `Diagram.expand(seed, "both").restrict(cond).restrict(cond)`
145145
— and the current "cascade and restrict are mutually exclusive" wall is
146-
removed. Per-table combine is unambiguous because composition order is explicit
147-
(∪ at a grow step, ∩ at a carve step).
146+
removed. Per-table combine is unambiguous because composition order is explicit:
147+
a grow step ORs rows in (restrict by a list, `[cond, …]`), a carve step ANDs a
148+
further restriction on (chained `&`).
148149
- **Materialization is a delete-time concern, not part of traversal.** Freezing a
149150
group's keys before deleting (delete runs parts-before-masters) matters only
150151
when a traversal feeds `delete`; the read-only closures never pay for it.

0 commit comments

Comments
 (0)