DNA: updated from data-model.md

Root ·

Updated from docs/dna/data-model.md in the Knowen repository: How Knowen works is kept with the code.

Changes to the content

# Nodes, edges and versions

**Nodes.** A node is a row in `nodes`: a title, Markdown content, its creator, and `node_id`, the graph it belongs to. A node of a private graph carries the id of that graph's root; a public node has none. Each person's private graphs hang under their own **private space** (a node tagged `personal_root`, titled "Private graphs"), which only they see.

**Edges.** Every connection is a row in `edges`, from parent to child, with a type:
- `Edge`: parent and child, the explanation graph itself. A node may have many parents, all equal.
- `VisibleEdge`: a private graph attached under a public node (see [Attach](dna:attach/nodes/29525)).
- `AttachEdge`: a private graph attached under a node of another private graph.
- `MergeEdge`: one of your graphs joined into another.
- `SemanticEdge`: suggested "related" links computed from the text, shown beside the graph, never in it.

Walks over a graph's own content (its members, the Trash, forks) follow parent edges only, so an attached graph never becomes part of the graph it hangs under.

**Versions.** Each commit stores a version of the node (the `changes` table, through PaperTrail) with the change's title, its description, who made it and when. History, diffs, restore and rollback all read these versions; nothing is overwritten.

**Provenance.** When a merge puts text into the public graph, `node_provenances` records where it came from: `created` (a new node from yours), `enriched` (your text folded into an existing node) or `forked`. Credit, ownership and rollback start from it.

**Owners.** No owner list is stored. `NodeOwners` works it out from the creator and the merged edits that were not rolled back, and falls back to Root at the top level and wherever nobody is on record (see [Who owns what](dna:who-owns-what))/nodes/29577)).
⏎
---
⏎
**Part of** [Nodes](/nodes/29537) and [History, versions and rollback](/nodes/29539): all its parents are equal.

# Parents

* Nodes
* History, versions and rollback

Feedback00

No feedback yet. Say whether this change improves the node.

Sign in to add a new comment.