Skip to main content
Products -> ERDPricingDocsBlogSign in한국어Start with ERD

Core Concepts

Ainecto's data model is intentionally close to a real relational database. If you know how databases work, you already know most of this.


Diagram

A diagram is the top-level container — one diagram represents one logical schema. Each diagram has:

  • A name and an optional note
  • An owner (the user who created it)
  • A list of tables, relationships (refs), enums, and table groups
  • An auto-generated UUID that uniquely identifies it across the system
  • Optional shareToken for public read-only sharing

Diagrams have version history — see Version History.


Table

A table is a database table. Each table has:

FieldDescription
nameTable name (unique within schemaName)
schemaNameOptional schema (e.g., public, auth)
aliasShort alias for use in relationships
noteFree-text description
headerColorVisual color for the canvas header
columnsOrdered list of columns
indexesIndexes defined on the table

Tables can belong to a table group for visual organization.

Column

Each column has:

FieldDescription
nameColumn name
typeSQL type (e.g., bigint, varchar(255), timestamp)
isPkPrimary key flag
isUniqueUnique constraint
isNotNullNot-null constraint
isIncrementAuto-increment
defaultValueDefault value (literal or function)
noteInline comment

Index

Indexes are defined per table:

FieldDescription
nameIndex name
isPkMarks the primary key index
isUniqueUnique index
typeIndex type (e.g., BTREE, HASH, GIN)
columnsOrdered list of columns with sortOrder (ASC/DESC)

Relationship (Ref)

A ref is a foreign key relationship between two columns (or column sets, for composite keys).

FieldDescription
nameOptional ref name
fromTableUuid / fromColumnUuidsThe referencing side
toTableUuid / toColumnUuidsThe referenced side
relationshipCardinality (see below)
onDeleteAction on delete (CASCADE, SET NULL, RESTRICT, etc.)
onUpdateAction on update

Cardinality types

SymbolMeaning
>Many-to-one
<One-to-many
-One-to-one
<>Many-to-many

Note: Relationships in Ainecto use UUIDs, not table or column names. This makes refs stable across renames. The visual editor abstracts this away, but the API and MCP tools require UUIDs.


Enum

An enum is a named set of allowed values, useful for fields like status or role.

FieldDescription
nameEnum name
schemaNameOptional schema
valuesList of {value, note} entries
noteFree-text description

Columns can reference an enum as their type.


Table Group

A table group visually groups related tables on the canvas with a colored container. Groups don't change the schema — they're a layout / organization tool.

FieldDescription
nameGroup name
colorContainer color
tablesMember tables

Table groups require a paid plan.


Identity & UUIDs

Every entity (diagram, table, column, ref, enum, group) has a 32-character hex UUID. UUIDs are stable across renames and are how the API, MCP server, and version history identify things.

You generally won't see UUIDs in the visual editor — they're mostly relevant when you call the REST API or the MCP tools.


Permissions

Each diagram has access controls per user:

RoleCan viewCan editCan deleteCan manage shares
OWNER
EDITOR
VIEWER
NONE

In addition, a diagram can have a public share token that lets anyone with the link view (read-only) without signing in. See Collaboration.