Opening the shared document…
Diagram playground
Write a diagram as text and it renders here as you type. Canvas editing for six of ten notations. Nothing leaves your browser. Syntax reference ·
1
archlab 1.0 er
2
title "Shop orders"
3
4
@er
5
entity customer "Customer" [PostgreSQL]
6
desc "Anyone who has ever placed an order"
7
attr id uuid pk
8
attr email string uk
9
desc "Lowercased on write, so it can be a unique key"
10
attr name string
11
attr created_at timestamptz
12
entity order "Order"
13
attr id uuid pk
14
attr customer_id uuid fk
15
attr placed_at timestamptz
16
attr total numeric(10,2)
17
entity order_line "Order line"
18
attr order_id uuid pk fk
19
attr sku string pk
20
attr quantity integer
21
attr unit_price numeric(10,2)
22
entity address "Address"
23
attr id uuid pk
24
attr customer_id uuid fk
25
attr line1 string
26
attr postcode string
27
entity audit_log "Audit log"
28
29
customer ||--o{ order : places
30
order ||--|{ order_line : contains
31
customer ||--o{ address : "ships to"
32
order }o..o{ audit_log : writes
Tab indents · Esc then Tab leaves the editor · worked examples
Read-only