docs(#246): correct the diagram edge-weight rule - #247
Merged
Conversation
Line weight encodes cardinality, and it is binary: thick = 1:1 (the foreign key
is the child's entire primary key); thin = multi-valued (the child adds
primary-key attributes of its own, newly declared or inherited from another FK).
The old table inverted this ('thick = Master-Part'); a master->part edge is
actually thin, since a part adds a key attribute. Note the rule is rename-safe (a
renamed FK can still be 1:1) and is the same fact as the underline rule viewed
from the edge. Pairs with datajoint-python #1532.
This was referenced Aug 10, 2026
fix(#1532): diagram edge weight encodes cardinality, not master-part
datajoint/datajoint-python#1533
Merged
…tion Fix stale rows in the Table Tiers table (Lookup and Part are now rectangles, not 'plain text'; Part is smaller/muted white), and update the make_mermaid() output example to the current palette and cardinality linkStyle. Companion to the edge-weight rule correction in this PR.
MilagrosMarin
approved these changes
Aug 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the incorrect edge-weight rule in
reference/specs/diagram.md§ Visual Encoding. Documentation companion to datajoint/datajoint-python#1532 (the generator correctness fix).The error
The old table stated the weight rule inverted:
|
Thick line|Master-Part relationship||
Thin line|Multi-valued foreign key|Line weight encodes cardinality, and it is binary:
Master-part is not a weight: a part almost always adds a key attribute, so a master→part edge is thin. Attributing thick to master-part inverted the encoding on exactly the edges a reader checks first.
Also documented
Not in this PR
The modernized diagram style (tier palette, entity groups, direction, renamed-edge color) documentation lands with the generator restyle (#1532 parts 2–4), so the spec and renderer stay in step.