thecodex.expert · The Codex Family of Knowledge
SQL

What is SQL

SQL is declarative, not procedural — you describe WHAT data you want, and the database figures out HOW to get it, which is the opposite of how most programming languages work.

SQL:2016 / ANSI Est. 1974 Last verified:
Canonical Definition

SQL began as SEQUEL (Structured English Query Language), developed in 1974 by Donald Chamberlin and Raymond Boyce at IBM's San Jose Research Laboratory, to provide a usable query interface for System R, an experimental database implementing Edgar Codd's 1970 relational model. It was renamed SQL after a trademark conflict, standardized by ANSI in 1986 and ISO in 1987, and remains the dominant language for relational databases (PostgreSQL, MySQL, SQL Server, Oracle, SQLite) today — even though almost every vendor adds its own extensions on top of the standard.

From a mathematical paper to a real language

In 1970, IBM mathematician Edgar Codd published "A Relational Model of Data for Large Shared Data Banks," proposing that data be organized into tables (relations) rather than the rigid hierarchical or navigational structures common at the time. Codd's model was mathematically elegant but described in dense set-theory notation. Chamberlin and Boyce, working at IBM's System R project starting 1973, designed SEQUEL specifically to make Codd's ideas usable by people without a mathematics background — aiming for a syntax that read closer to English than to algebra.

Declarative: describe WHAT, not HOW

Unlike Python, Go, or JavaScript, SQL doesn't describe a sequence of steps to execute — it describes the shape of the result you want, and the database engine's query planner decides the actual execution strategy (which indexes to use, which join order is fastest, and so on).

SQLdeclarative.sql
SELECT name, email
FROM users
WHERE signup_date > '2026-01-01'
ORDER BY signup_date DESC;

-- You never wrote a loop or an index-lookup strategy —
-- the engine decides HOW to find and sort the matching rows.

One language, many engines

SQL is standardized (ANSI 1986, ISO 1987, revised periodically since), but every major database — PostgreSQL, MySQL, SQLite, SQL Server, Oracle — implements the core standard while adding its own extensions and quirks. Code written for one engine often needs adjustment to run on another, which is why this reference calls out engine-specific differences where they matter.

Sources

1
ISO/IEC 9075. Information technology — Database languages — SQL, the ISO SQL standard, and Codd, E.F. "A Relational Model of Data for Large Shared Data Banks," Communications of the ACM, 1970.