Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Catalog · How the catalog works

Random project

IPC2026

Participant material for the keynote and course 'Designing Databases with Delphi' — IPC 2026, Salamanca.

View on GitHub

Anyone may press Interesting, signed in or not. It helps others find this project.

Member rating

No ratings yet.

Sign in to rate this project.

README

IPC 2026 — Pascal and Databases

Participant material for the keynote and the course "Designing Databases with Delphi" by Olaf Monien at the International Pascal Congress 2026 (Salamanca).

Language: English.

Material is added here as the event progresses. Each day's code is compiled and, where applicable, test-covered — not pseudocode.

Contents

Keynote

  • KeyNote/IPC2026_Keynote_Pascal_and_Databases.pdf — the plenary deck. Arc: simplicity (Wirth → Pascal → Cantù) → Delphi's DB-access history → "queries on TForm1" → FireDAC done right → the ecosystem → an SSOT data layer → VCL + FMX → human- and agent-legible architecture.

Course

  • Database/ — the shared demo database used by every day.
    • northwind_current.db — Northwind (SQLite), dates shifted to today (full, ~16k orders).
    • northwind_compact.db — compact variant (93 customers, 200 most-recent orders, ~0.7 MB) for the first exercises.
    • shift_dates.py — reproducible date-shift script.
    • README_Database.md — transformation details.
  • Day1/ — Foundations & the right architecture from line 1.
    • Handout_Day1.md, Exercises_Day1.md
    • slides/IPC2026_Day1_Course_Intro.pdf
    • code/ — a console app (no UI by design) plus a DUnitX test project: all DB access in a data module, the schema generated from a single source of truth.
  • Day2/ — FireDAC master-detail, the fast designer way.
    • Handout_Day2.md
    • slides/IPC2026_Day2_FireDAC_MasterDetail.pdf
    • code/ — a VCL customers→orders browser wired in the designer; the deliberate counterpoint to Day 1's architecture.
  • Day3/ — one data core, two UIs (VCL + FMX), with DX.Data complementing FireDAC.
    • Handout_Day3.md, Exercises_Day3.md
    • slides/IPC2026_Day3_OneCore_TwoUIs.pdf
    • code/ — the Northwind Explorer: search, browse (FireDAC master-detail) and edit customers in both VCL and FMX over one shared, UI-agnostic core. Entities are the schema single source of truth (DX.Data); validation derives from it; FireDAC stays the core and DX.Data fills the gaps. Schema-driven DUnitX tests (8/8). DX.Data and DUnitX are git submodules under code/libs/ — clone with --recurse-submodules.
  • Day4/ — server-capable & the AI-supported finish: the same core, now behind HTTP.
    • Handout_Day4.md, Exercises_Day4.md
    • slides/IPC2026_Day4_ServerAndAgent.pdf
    • code/ — the unchanged Day 3 core taken into a stateless REST server (Horse): handlers are pure dispatch through DMCustomers (no SQL, no business logic in routes), with a VCL REST client that reuses the Northwind Explorer UI over HTTP. Plus a scale demo measuring the ORM cost (N+1 vs. one GROUP-BY JOIN) and an agent-supported change that flows through the single source of truth. Full DUnitX suite (DM, schema, validation, sales, server, REST client). DX.Data, DUnitX and Horse are git submodules under code/libs/ — clone with --recurse-submodules.

Quick start

Place the database next to the demo app (or let the demo resolve it from the repo's Database/ folder), include the FireDAC SQLite driver, and inject the database path — don't hardcode it. Each code/ folder ships a build-scripts/DelphiBuildDPROJ.ps1; build with Delphi 12+ (the script auto-detects the newest installed version).

text
pwsh -File Day2/code/build-scripts/DelphiBuildDPROJ.ps1 -ProjectFile Day2/code/demo/Day2.dproj

Inspecting the data

HeidiSQL (heidisql.com) — free, open source, built with Delphi — opens the SQLite files directly. (It uses its own data-access layer, not FireDAC.)