Entity Relationship (@er)

Coming Soon - ER diagrams are planned for a future release.

Entity Relationship diagrams show database schemas, entities, and their relationships.

Planned Syntax

@er
[entities]
  User
    id: UUID PK
    email: VARCHAR(255) UNIQUE
    name: VARCHAR(100)
    created_at: TIMESTAMP

  Order
    id: UUID PK
    user_id: UUID FK
    status: ENUM
    total: DECIMAL
    created_at: TIMESTAMP

  OrderItem
    id: UUID PK
    order_id: UUID FK
    product_id: UUID FK
    quantity: INT
    price: DECIMAL

  Product
    id: UUID PK
    name: VARCHAR(255)
    price: DECIMAL
    stock: INT

[relationships]
  User ||--o{ Order: places
  Order ||--|{ OrderItem: contains
  Product ||--o{ OrderItem: included_in
Rendered diagram

Use Cases

  • Database schema documentation

  • Data model design

  • API resource relationships

  • Domain modeling

Planned Features

Feature
Description

Entities

Tables with attributes

Attributes

Columns with types

Primary keys

PK marker

Foreign keys

FK marker

Relationships

Cardinality notation

Constraints

UNIQUE, NOT NULL, etc.

Relationship Notation

Planned cardinality syntax:

Notation
Meaning

||--||

One to one

||--o{

One to many

o{--o{

Many to many

||--|{

One to one or many

Current Alternatives

Until @er is fully implemented, you can use @arch with cylinder shapes:

Rendered diagram

Roadmap

See the Roadmap for planned release timeline.

Get Notified

Star the GitHub repositoryarrow-up-right to be notified when ER diagrams are released.

Last updated