Logo
NeoArc Studio

Entities and Properties

Define entities as graph nodes with typed properties, constraints, key roles, foreign key resolution, and derivation modes.

Entities are the fundamental building blocks of the data model. Each entity is a node in the graph, representing a distinct concept such as a customer, order, or product. Entities carry typed properties that describe their attributes, along with constraints and key roles that define identity and referential integrity.

Entity Structure

Every entity node in the model has the following core fields.

Property Structure

Each property on an entity is a GraphNodeProperty with the following fields.

The 12 Abstract Types

Properties use abstract types that are database-agnostic. Each maps to concrete types via database profiles.

Key Roles

Each property has a key role that defines its identity semantics. Key roles are intrinsic to the property and are not inferred from relationships.

Foreign Key Resolution

When a property has the foreign key role, it optionally links to a target entity and property. Resolution is explicit and user-initiated, never inferred automatically. A foreign key property exists in two states: marker-only (no resolution) or resolved (linked to a target).

interface ForeignKeyResolution {
  /** The node (entity) this FK references */
  targetNodeId: string;
  /** Specific property on the target node (optional) */
  targetPropertyName?: string;
  /** Whether to create/show an edge for this resolution */
  showEdge?: boolean;
}

Advanced Validation Constraints

Beyond the basic required, nullable, unique, and indexed flags, properties support fine-grained validation.

Property Derivation Modes

Properties specify how their values are obtained, which affects storage and computation behaviour.

Governance and Projections

Properties optionally carry governance metadata and projection configurations that control how data appears across different layers of the architecture.