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.

FieldTypeDescription
idstringUnique identifier (UUID) for the entity
labelstringDisplay name shown inside the node circle
labelsstring[]Optional additional schema labels for graph DB design (e.g., ["Person", "Employee"])
nodeTypestringDiscriminator: "entity" (default) or "projection"
x, ynumberCanvas position coordinates (optional, calculated by force simulation if unset)
isPinnedbooleanWhether the node has a fixed position, exempt from force simulation
colorstringStroke/outline colour (CSS colour value, defaults to theme colour)
propertiesGraphNodeProperty[]Typed attributes for this entity
tagsstring[]Labels for filtering and organisation

Property Structure

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

FieldTypeDescription
namestringProperty identifier (e.g., "customerId", "email")
typestringAbstract type from the type system
descriptionstringDocumentation for this property
requiredbooleanWhether the property must have a value
nullablebooleanWhether null is an acceptable value
uniquebooleanUniqueness constraint
indexedbooleanWhether the property should be indexed
defaultValuestringDefault value expression
keyRolePropertyKeyRoleKey semantics: none, primary, natural, surrogate, composite-part, or foreign
fkResolutionForeignKeyResolutionTarget entity and property for foreign key resolution
derivationModestringHow the value is obtained: stored, derived, or computed-on-read
derivationPathsstring[]Dot-grammar source paths for derived properties

Abstract Types

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

TypeDescriptionTypical Use
stringVariable-length textNames, codes, short identifiers
integerWhole numbersCounts, quantities, sequence numbers
floatFloating-point numbersMeasurements, percentages, ratios
decimalFixed-precision numbersCurrency, financial calculations
booleanTrue or falseFlags, toggles, status indicators
dateCalendar date without timeBirthdates, effective dates
datetimeDate with time componentTimestamps, audit trails, event logs
uuidUniversally unique identifierPrimary keys, correlation IDs
jsonStructured JSON dataConfiguration blobs, metadata
textLong-form text contentDescriptions, notes, rich content
binaryRaw binary dataFile attachments, images, certificates
enumEnumerated value setStatuses, categories, fixed option lists

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.

Key RoleAbbreviationDescription
none-No key role (default for most properties)
primaryPKCanonical identifier for the entity
naturalNKBusiness-meaningful identifier (e.g., email, ISBN, tax number)
surrogateSKSystem-generated identifier (e.g., auto-increment, UUID)
composite-partCPParticipates in a composite key alongside other CP properties
foreignFKReferences another entity's key, optionally resolved to a specific target

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.

ConstraintApplicable TypesDescription
minValueinteger, float, decimalMinimum numeric value
maxValueinteger, float, decimalMaximum numeric value
minLengthstring, textMinimum character length
maxLengthstring, textMaximum character length
patternstringRegex validation pattern
enumValuesenumArray of allowed string values

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.

Governance
Classification levels (internal, confidential, sensitive, PII), retention policies, compliance notes, encryption requirements, and access restrictions.
Persistence Projection
Controls whether the property is included in the persistence layer and supports column name overrides for the target store.
Search Projection
Configures search index behaviour: searchable, filterable, sortable, facetable, with analyser overrides, boost weights, and vector search settings.
API Projection
Determines whether the property is exposed in the API layer, with field name overrides and read-only flags.