SchemaHand · schema handoff

Schema diagram with editable notes

Tables and relationships from your SQL. Scroll inside the diagram to explore a large schema.

3 SQL statement(s) in the source were not used in this snapshot. This edition does not treat them as understood tables or relationships. Unused statement starts: CREATE SCHEMA app | CREATE SCHEMA audit | CREATE INDEX idx_orders_customer ON app.orders (customer_id)

Edit table and column notes below, then save a new copy. Names, columns and relationships stay unchanged.

Relationships

Editable notes

Open a table to edit its notes. Changes stay in this browser until you save a new copy.

app.customers

People and companies who buy from us.

Synthetic client-facing note: this table lists made-up buyers in the demo shop. It is not a real customer list. Add your own wording here, then use Save edited copy. That save does not change dictionary.csv.

ColumnTypeNotes
idINTEGERprimary key
full_nameVARCHAR
emailTEXTUnique email address used for login.
statusVARCHAR
created_atTIMESTAMP WITHOUT TIME ZONE

app.addresses

ColumnTypeNotes
idINTEGERprimary key
customer_idINTEGERlinks to app.customers(id)
line1VARCHAR
cityVARCHAR
postal_codeVARCHAR

app.categories

ColumnTypeNotes
idINTEGERprimary key
nameVARCHAR
parent_category_idINTEGERlinks to app.categories(id)

app.suppliers

ColumnTypeNotes
idINTEGERprimary key
nameVARCHAR
activeBOOLEAN

app.products

Items we sell to customers.

ColumnTypeNotes
idINTEGERprimary key
skuVARCHAR
nameVARCHAR
priceNUMERIC
category_idINTEGERlinks to app.categories(id)
supplier_idINTEGERlinks to app.suppliers(id)

app.orders

ColumnTypeNotes
idINTEGERprimary key
customer_idINTEGERlinks to app.customers(id)
billing_address_idINTEGERlinks to app.addresses(id)
shipping_address_idINTEGERlinks to app.addresses(id)
order_dateDATE
total_amountNUMERIC

app.order_items

ColumnTypeNotes
order_idINTEGERprimary key, links to app.orders(id)
product_idINTEGERprimary key, links to app.products(id)
quantityINTEGER
unit_priceNUMERIC

app.payments

ColumnTypeNotes
idINTEGERprimary key
order_idINTEGERlinks to app.orders(id)
amountNUMERIC
methodVARCHAR
paid_atTIMESTAMP WITHOUT TIME ZONE

app.invoices

ColumnTypeNotes
idINTEGERprimary key
order_idINTEGERlinks to app.orders(id)
customer_idINTEGERlinks to app.customers(id)
issued_atTIMESTAMP WITHOUT TIME ZONE
total_amountNUMERIC

app.inventory

ColumnTypeNotes
idINTEGERprimary key
product_idINTEGERlinks to app.products(id)
warehouseVARCHAR
quantity_on_handINTEGER

audit.login_events

ColumnTypeNotes
idINTEGERprimary key
customer_idINTEGERlinks to app.customers(id)
user_agentTEXTRaw browser string, kept only for fraud checks.
happened_atTIMESTAMP WITHOUT TIME ZONE

audit.change_log

ColumnTypeNotes
idINTEGERprimary key
customer_idINTEGERlinks to app.customers(id)
table_nameVARCHAR
changed_atTIMESTAMP WITHOUT TIME ZONE