Getting Started with the Data Model
Create and configure the central data model that serves as the single source of truth for all entities, properties, and relationships in your project.
The data model is the central definition of your project's entities, their properties, and the relationships between them. It is stored as a single model.neoarc file at the workspace root, backed by a GraphDocument with isProjectModel: true and authoringMode: "graph-db". Every view (ERD, graph, search) derives its data from this model, so changes propagate automatically to all perspectives.
How the Model Fits into a Project
A NeoArc Studio project is defined by a project.neoarc.json file located at .neoarc-studio/project.neoarc.json. This file contains a modelConfig.modelFilePath property that points to the central model file, typically model.neoarc at the workspace root. The project file also references database profiles that map abstract model types to concrete database types.
{
"schemaVersion": "1.0.0",
"meta": { "generator": "NeoArc Studio", "generatorVersion": "1.0.0" },
"id": "project-uuid",
"name": "My Architecture Project",
"modelConfig": {
"modelFilePath": "model.neoarc"
},
"databaseProfiles": [
{ "id": "profile-1", "name": "SQL Server", "filePath": "sqlserver.neoarc-db-profile.json" }
],
"transitions": []
}
Creating Your First Model
Follow these steps to set up a data model from scratch.
Abstract Type System
The model uses a set of abstract property types that are database-agnostic. These types map to concrete database types through database profiles, so a single model supports multiple target databases simultaneously.
| Abstract Type | Description | Example Concrete Mapping |
|---|---|---|
| string | Variable-length text | NVARCHAR(255), VARCHAR |
| integer | Whole numbers | INT, BIGINT, INTEGER |
| float | Floating-point numbers | FLOAT, REAL, DOUBLE |
| decimal | Fixed-precision numbers | DECIMAL(18,2), NUMERIC |
| boolean | True or false | BIT, BOOLEAN, BOOL |
| date | Date without time | DATE |
| datetime | Date with time | DATETIME2, TIMESTAMP |
| uuid | Universally unique identifier | UNIQUEIDENTIFIER, UUID |
| json | Structured JSON data | NVARCHAR(MAX), JSONB |
| text | Long-form text | NVARCHAR(MAX), TEXT |
| binary | Binary data | VARBINARY(MAX), BYTEA |
| enum | Enumerated values | NVARCHAR(50), ENUM |
Views Derived from the Model
The model serves three types of derived views, each providing a different visual perspective on the same underlying data.