Example schemas

18 realistic .forge applications exercising the schema language across many domains. Some are adapted from well-known open-source apps and classic sample databases; others are synthetic. Every one passes validate --strict and generate all.

HR Directory

Adapted

Geo hierarchy, employee self-reference, a mutual FK cycle, and temporal job history — the small intro example.

7 models · Oracle HR (UPL)

Music Store

Adapted

Many-to-many playlists, an InvoiceLine join-with-payload, self-referential reports_to, @soft_delete, money as i64 cents.

10 models · Chinook (MIT)

Wholesale Orders

Adapted

An OrderDetail join with a discount payload, self-referential employees, multi-FK orders, and composite indexes.

8 models · Northwind (MIT port)

DVD Rental

Adapted

Two many-to-many relations on one model, dual FK to the same model, a store↔staff mutual cycle, and a geo chain — the most complex example.

13 models · Sakila / Pagila (BSD)

Code Hosting

Adapted

Fork-lineage self-reference, PR head/base dual FK, org/team RBAC joins, and issue↔label many-to-many.

11 models · Gitea (MIT)

Publishing & Membership

Adapted

@fulltext, three many-to-many pairs, a subscription-billing join, and ISO currency as char(3).

7 models · Ghost (MIT)

Social Graph

Adapted

Reply-thread self-reference, follow/block join models (dual FK to Account), and notifications.

7 models · Mastodon (design-inspired)

Student Information System

Synthetic

A textbook many-to-many-with-payload (Enrollment grade), section/term/course FKs, and GPA constraints.

7 models · Teaching SIS

Healthcare

Synthetic

Appointments, role-as-string providers, prescriptions and diagnoses, and a composite scheduling index.

6 models · Synthetic

Hotel Reservations

Synthetic

A RoomType template vs Room inventory split, date-range availability, and i64 money.

6 models · Synthetic

Food Delivery

Synthetic

A struct GeoPoint (required + optional), an OrderItem join, and a timestamped status-event audit log.

8 models · Synthetic

Banking Ledger

Synthetic

Double-entry transactions, a Transfer dual FK to Account, joint-account many-to-many, and char(3) currency.

6 models · Synthetic

Airline Reservations

Synthetic

Flight dual FK to Airport, a unique-seat composite index (seat lock), and IATA codes as char(3).

7 models · Synthetic

Blog CMS

Synthetic

snake_case component refs (tsx:// / jsx:// / api://), self-referential comments and categories, @fulltext, and @soft_delete.

5 models · Synthetic

Project Management

Synthetic

An Org→Team→Project→Issue hierarchy, sub-issue self-reference, label many-to-many, and dual composite indexes.

8 models · Synthetic

SaaS Multi-tenant

Synthetic

Per-tenant *Organization scoping, a Membership RBAC join, API keys, and an audit log.

7 models · Synthetic

E-commerce Store

Synthetic

Product variants, CartItem/OrderItem joins, money as i64 minor units, and SKU/order-number natural keys.

9 models · Synthetic

IoT Sensors

Synthetic

A +u64 high-volume PK, a fixed array [f64; 3], a struct Calibration, and append-heavy telemetry.

3 models · Synthetic

Search documentation

Find pages across the ForgeDB docs