Key Roles and Property Types
Define node properties with 12 abstract types and 6 key roles. Configure constraints including required, nullable, unique, and indexed. Add per-property projections (search, API, persistence), governance metadata (description, example, tags), and validation rules with min/max values, patterns, and enums.
Graph diagram nodes support typed properties similar to database columns. Each property has a data type, optional key role, and constraints. In Graph DB mode, these properties are used for Cypher export and schema validation.
Property Types
NeoArc supports 12 abstract property types. These map to platform-specific types during export (e.g. Neo4j, SQL, search indices).
| Type | Description | Example Values |
|---|---|---|
| string | Text values | "John Doe", "SKU-12345" |
| int | Whole numbers | 42, -17, 0 |
| float | Decimal numbers | 3.14, -0.5, 99.99 |
| boolean | True/false values | true, false |
| date | Date without time | 2026-02-05 |
| datetime | Date with time | 2026-02-05T14:30:00Z |
| uuid | Universally unique identifier | 550e8400-e29b-41d4-a716-446655440000 |
| json | Structured JSON data | {"tags": ["vip", "active"]} |
| enum | Enumerated value from a fixed set | "active", "inactive", "pending" |
| array | Ordered list of values | ["tag1", "tag2", "tag3"] |
| object | Nested key-value structure | {"address": {"city": "London"}} |
| number | Generic numeric value (int or float) | 42, 3.14 |
Key Roles
Key roles indicate how a property functions in the data model. These appear as badges (PK, FK, NK, etc.) next to property names.
| Role | Badge | Purpose | Validation |
|---|---|---|---|
| Primary | PK | Single-column primary identifier | Must be unique, typically uuid |
| Natural | NK | Business-meaningful unique identifier | Must be unique, often string |
| Surrogate | SK | System-generated identifier | Auto-generated, typically uuid or int |
| Composite Part | CP | Part of a composite key | Combined with other CP properties for uniqueness |
| Foreign | FK | Reference to another node | Must reference valid target node/property |
| None | (none) | Regular property | No special key constraints |
Key Role Examples
Constraints
Properties support four constraint flags that control data integrity.
Validation Rules
Properties can have validation rules that constrain acceptable values. These are enforced during schema validation and exported to Cypher constraints.
| Rule | Applies To | Description |
|---|---|---|
| minValue | int, float | Minimum numeric value (inclusive) |
| maxValue | int, float | Maximum numeric value (inclusive) |
| minLength | string | Minimum character length |
| maxLength | string | Maximum character length |
| pattern | string | Regular expression pattern |
| enumValues | string | List of allowed values |
Validation Rule Examples
// Price must be positive
{
"name": "price",
"type": "float",
"minValue": 0.01
}
// Status must be one of the allowed values
{
"name": "status",
"type": "string",
"enumValues": ["pending", "active", "completed", "cancelled"]
}
// Email must match pattern
{
"name": "email",
"type": "string",
"pattern": "^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$"
}
Foreign Key Resolution
Foreign key properties can reference specific properties on other nodes. This creates a navigable relationship in the schema.
Description Field
Every property supports a description field for documentation. Descriptions appear in tooltips and are included in Cypher export comments.
Default Values
Properties can specify default values that apply when no value is provided. Defaults are type-specific:
| Type | Default Examples |
|---|---|
| string | "unknown", "N/A", "" |
| int | 0, -1, 100 |
| float | 0.0, 1.0 |
| boolean | true, false |
| date | Current date expression |
| datetime | Current timestamp expression |
| uuid | Generated UUID expression |
| json | {}, [] |
Per-Property Projections
Each property supports projection flags that control how it appears across derived artefacts. Projections are configured in the property details panel.
Governance Metadata
Properties support governance metadata fields that improve documentation quality and support automated tooling.
| Field | Purpose |
|---|---|
| Description | Documents the property's purpose, expected values, and usage context. Included in Cypher export comments and tooltips |
| Example | A representative example value. Helps consumers understand the expected format and content |
| Tags | Free-form tags for categorising properties (e.g. PII, financial, audit). Used for filtering and compliance reporting |
Adding Properties
Mode Visibility
Property editing features vary by authoring mode:
| Feature | Mind Map | Conceptual | Graph DB |
|---|---|---|---|
| Property panel | Hidden | Basic | Full |
| Key role selection | Hidden | Shown | Enforced |
| Type selection | Hidden | Hidden | Shown |
| Constraints | Hidden | Hidden | Shown |
| Validation rules | Hidden | Hidden | Shown |
| FK resolution | Hidden | Hidden | Shown |