Files
rdbms-playground/website/src/content/docs/getting-started/example-library.md
T
claude@clouddev1 0fcb7b1105 docs: website docs structure + first content pages
Phase D foundation. Configures the pragmatic four-section sidebar
(Getting started / Guides / Reference / Concepts) and replaces the
template example pages with grounded content built on the shared
"library" example database (authors/books/members/loans):

- Getting started: installation, first project, simple vs advanced,
  the example library.
- Reference: Types (all ten + serial/shortid + advanced aliases),
  Tables (create/drop, compound PK, advanced CREATE TABLE).
- Concepts: projects & storage (readable files, derived database,
  autosave, temp projects).
- Guides: Build the library (draft, to be refined for teaching).

Command syntax grounded in en-US.yaml usage/help, command.rs, and
types.rs (verified against tests). Records the settled doc decisions
in STYLE.md. Build green (10 pages, Pagefind); content clean of
"DSL"/engine-name.
2026-06-06 07:34:57 +00:00

1.3 KiB

title, description, sidebar
title description sidebar
The example library The small library database used throughout these docs.
order
4

Most examples in this documentation use the same small database: a library with authors, books, members, and loans. Keeping one familiar set of tables makes it easier to focus on the concept each page is teaching.

The tables

Table Columns
authors author_id (serial, primary key), name (text), birth_year (int)
books book_id (serial, primary key), title (text), author_id (int → authors), published (int), isbn (text, unique)
members member_id (serial, primary key), name (text), joined (date)
loans loan_id (serial, primary key), book_id (int → books), member_id (int → members), loaned_on (date), returned_on (date)

The relationships

  • An author has many books. books.author_id points at authors.author_id — a one-to-many relationship.
  • Members borrow books. Each row in loans ties one book to one member, so loans connects books and members — a many-to-many relationship expressed through a bridging table.

You will build these tables and relationships step by step in Build the library. Individual reference pages use whichever part of this schema illustrates the command at hand.