Data Views: Persistence Mode
Create Data Views in persistence mode to visualise entity-relationship schemas with database-profile-aware type resolution. Inspect entities via the Entity Overlay with ERD-style columns showing key roles, types, constraints, and foreign key references.
A persistence mode Data View is a force-directed graph projection of model entities, designed for database architects and developers. Entities appear as interactive nodes on a graph canvas. Click any node to open the Entity Overlay, which displays the full property table with ERD-style columns - key roles, field names, concrete database types, constraints, and foreign key references - all resolved through the selected database profile.
How Persistence Views Connect to the Model
A Data View file references the model via its modelFilePath field and selects a database profile via databaseProfileId. On load, the view host reads the model through the ModelViewService, resolves entities for the included set, and renders them as nodes on the force-directed graph canvas.
Entity Overlay Columns
When you click a node (or press Alt+Enter), the Entity Overlay opens with a property table showing these columns.
| Column | Content | Source |
|---|---|---|
| Key | PK, FK, NK, SK, CK badge | Model property key role |
| Field | Property name (formatted by profile) | Database profile naming convention |
| Type | Concrete database type | Database profile type mapping |
| Nullable | YES/NO | Model property nullable flag |
| Unique | YES/NO | Model property unique flag |
| Default | Default value expression | Model property default value |
| FK Ref | Target entity.property | Model FK relationship |
| Constraints | CHECK, constraint list | Model property constraints |
| Index | Index name | Model property index |
| Comments | Description text | Model property description |
Relationship Pills
The Entity Overlay shows relationship context alongside the property table.
| Side | Shows | Interaction |
|---|---|---|
| Left (incoming) | Entities that reference this entity via FK | Click to navigate to that entity's overlay |
| Right (outgoing) | Entities this entity references via FK | Click to navigate to that entity's overlay |
| Info button (i) | Relationship detail tooltip | Shows join columns, cardinality, constraint name |
Database Profile Selection
The top bar contains a profile selector listing all database profiles registered in the project. Switching profiles triggers a full re-resolution of types and names across all entities. Built-in vendor templates are available for all major database engines, or create a custom profile for any other database.
| Vendor Template | Example Types | Naming Convention |
|---|---|---|
| (No profile) | string, integer, boolean | Original model names |
| SQL Server | NVARCHAR(255), INT, BIT | PascalCase |
| PostgreSQL | VARCHAR(255), INTEGER, BOOLEAN | snake_case |
| MySQL | VARCHAR(255), INT, TINYINT(1) | snake_case |
| Oracle | VARCHAR2(255), NUMBER(10), NUMBER(1) | SCREAMING_SNAKE_CASE |
| MongoDB | String, Int32, Boolean | camelCase |
| SQLite | TEXT, INTEGER, REAL | snake_case |
| Snowflake | VARCHAR, NUMBER(38,0), BOOLEAN | SCREAMING_SNAKE_CASE |
| MariaDB | VARCHAR, INT, TINYINT(1) | snake_case |
| CockroachDB | STRING, INT8, BOOL | snake_case |
| Azure Table Storage | String, Int32, Boolean + PartitionKey/RowKey | PascalCase |
| Azure Cosmos DB | string, number, boolean + id/partitionKey | camelCase |
| Amazon DynamoDB | S, N, BOOL + pk/sk | camelCase |
| Apache Cassandra | text, int, boolean + partitionKey | snake_case |
Connections and Relationships
Edges between nodes on the graph canvas are inferred from relationships in the model. When both the source and target entities of a model edge are included in the view, an edge is drawn between their nodes with cardinality labels. Edges are not manually created - they follow the model's relationship definitions.
Side-by-Side Comparison
Pin an Entity Overlay to dock it below the canvas. Then click another node to open a second overlay. This lets you compare two entities' schemas side by side. When the docked overlays share a foreign key relationship, connecting lines are drawn between the relevant FK and PK rows, making it easy to trace joins across entities.
Entity Picker
The entity picker controls which model entities appear in the view.
| Feature | Description |
|---|---|
| Fuzzy search | Type in the search field to filter entities by name with ranked results (exact, prefix, fuzzy) |
| Group filtering | Filter to show only entities belonging to a specific model group or subdomain |
| Tag filtering | Filter entities by tag to focus on specific categories |
| Bulk selection | Select or deselect all visible entities with a single action |
| Entity count | The top bar displays the count of included entities vs. total available |
| 50-node cap | Each view supports up to 50 entities for visual clarity and performance |