SQL Technical Space

Table of Contents

SQL (Structured Query Language) is the standard declarative language for defining and manipulating relational data — schemas, tables, constraints, and the queries and procedural functions that operate on them. ORE Studio runs on PostgreSQL 18+, an open-source relational database that extends standard SQL with its own procedural language (PL/pgSQL) for functions and triggers, plus extensions the schema relies on (pg_trgm, btree_gist, pgcrypto).

This page's role is to capture the domain concepts of the SQL technical space — what it is, its Part, and how its facets map onto components — in prose, for a human reader coming to this TS for the first time. It does not enumerate facets or archetypes: for that inventory — every facet, its archetype count, and a link to its literate source — see ores.sql, the generated TS inventory page.

The SQL technical space covers all database artefacts generated by ores.codegen. Unlike the C++ TS, the SQL TS has a single implicit part — SQL files are not split by compile-time role (there is no header/implementation distinction in SQL).

The SQL TS projects that live in the repository are placed under projects/ores.sql/. All DDL output is managed by the schema lifecycle there. For the MASD concepts see MASD, Physical Space, and Facet.

Part

The SQL TS has a single part corresponding to the schema directory:

Part Directory Contains
schema/ projects/ores.sql/create/ DDL scripts, trigger scripts, drop scripts

Population scripts and service setup scripts live under related directories (projects/ores.sql/populate/, projects/ores.sql/service/) but are still part of the same TS.

Component mapping

SQL TS projections land in the following components:

Facet Target component
Schema ores.sql/create
Service ores.sql/service
Populate ores.sql/populate

All SQL artefacts are managed centrally in ores.sql rather than distributed per-entity-group, because the database schema is a shared resource across all components.

See also

Emacs 29.3 (Org mode 9.6.15)