1 The mental model
Everything in Relatude.DB is a node. A node has:
| Ingredient | What it is |
|---|---|
Guid Id |
The public identity. The engine also keeps an internal int id (__Id) for its indexes. |
NodeMeta Meta |
Metadata the system manages: timestamps, culture, revision, access, display name, address. |
| Scalar properties | string, int, decimal, DateTime, bool, Guid, GeoCoordinate, FileValue, PasswordValue, arrays… |
| Embedded data | Sub-objects stored inside the node: Embedded<T>, EmbeddedMap<TKey,TValue>. |
| References | A stored Guid (or Guid[]) pointing at other nodes. One-directional, with no reverse index. |
| Relations | Graph edges, declared as classes of their own. Bidirectional, indexed and traversable. |
There is no separate schema language: your C# types are the schema. Point the engine at a namespace and it builds the datamodel from your interfaces and classes.
- Interfaces are the model — A node type can be an interface, a class, a record or a struct. No attribute is needed: every type in a namespace you register becomes a node type unless it is marked [Exclude]. [Node] only tunes a type (see stable type…