Skip to content
Back to blog

How Codd's Relational Model Became SQL

5 min read
How Codd's Relational Model Became SQL

SQL did not begin as one finished idea waiting to be translated into code. Edgar Codd first separated the logical representation of data from its physical storage, Donald Chamberlin and Raymond Boyce then designed an approachable query language, and several research and commercial systems tested those decisions in practice. Standardization established a shared syntactic foundation only after implementations had already made choices of their own, which explains why modern SQL is recognizable across database systems yet still varies noticeably from one product to another.

Codd separated data from access paths

In the hierarchical and network database systems of the 1960s, an application often needed to know which links to follow and in what order to reach a record. This navigational approach tied a query to the storage design, so changing a structure or access path could require changes to the code that depended on it.

In his 1970 paper "A Relational Model of Data for Large Shared Data Banks", Codd made a different problem central. Users and most applications should work with a logical representation of data without depending on its internal organization. He described a model based on relations, meaning sets of tuples, together with operations that derive new relations from existing ones.

A table is a convenient way to display a relation, so rows and columns quickly became the familiar explanation of the model. Codd's proposal was not simply to replace one storage layout with tables, however. Its central contribution was data independence and the ability to state the desired result without manually traversing physical pointers. Codd received the 1981 ACM A.M. Turing Award for his contributions to the theory and practice of database management.

The mathematical model needed a language

The relational model explained how to describe data and operations, but users still needed a practical way to write requests. IBM explored that problem through System R, a research system intended to test whether a relational interface could coexist with query optimization, transactions, recovery, and the other capabilities expected from a full database system.

Chamberlin and Boyce first worked on a language called SQUARE, then simplified its notation and moved it closer to English phrasing. Their 1974 paper "SEQUEL: A Structured English Query Language" presented a language for both professional programmers and people who used a database less frequently. A user named the required columns, sources, and conditions without prescribing a path through the stored records:

SELECT name, age
FROM users
WHERE age > 18

SEQUEL stood for Structured English Query Language, but the name did not last. In Chamberlin's oral history, the change is described in practical terms: the word was already somebody else's trademark, so he removed its vowels and produced SQL, which could still expand to Structured Query Language. At a 1995 reunion of project members, the trademark holder was identified as Britain's Hawker Siddeley. The trademark prompted a new name, but it was not a technical turning point in the design of the language.

Boyce was not a minor contributor to that work. He managed the language-oriented System R group and designed SEQUEL with Chamberlin, but died suddenly from a brain aneurysm in June 1974. Chamberlin later stressed that half of their joint work belonged to Boyce. His contribution also survives in the name Boyce-Codd Normal Form, which addresses anomalies and redundancy in relational schema design.

System R was a major branch, not the only one

System R is sometimes called the first relational DBMS, but that wording erases the parallel work of other teams. IBM's own 1976 architecture paper described System R as a research vehicle rather than a planned product. The project tested not only a query language but also access-path selection, cost-based optimization, locking, logging, and recovery, so its influence extended well beyond SQL syntax.

UC Berkeley was building Ingres at almost the same time. It also followed the relational model, but used QUEL, a language closely related to relational calculus. The original description of Ingres reports that an initial QUEL implementation became operational in October 1974, and its authors credited SEQUEL with demonstrating the appeal of readable keywords. The two projects were not a simple sequence in which one team invented everything and another copied it. They turned a common theoretical foundation into working systems in different ways and learned from published ideas.

System R's practical results helped SQL move beyond a prototype. The project's 1981 retrospective describes its goal as combining the usability of the relational model with the functions and performance needed for everyday production work. Its research influenced IBM SQL/DS and DB2, while developers outside IBM could study the published language. Project members later assembled "The 1995 SQL Reunion", a detailed first-hand account that presents SQL as the product of researchers, product teams, and several companies rather than a single finished invention handed directly to the market.

The standard defined a core, not one dialect

By the middle of the 1980s, SQL already existed in several products, so standards committees were documenting a language with real-world use and accumulated differences rather than starting from a blank page. The United States adopted ANSI X3.135-1986, followed in June 1987 by the international ISO 9075:1987. The goal was portability for database definitions and applications, but a standard did not make every implementation discard its established syntax and proprietary features at once.

Later editions added more parts to SQL, while products implemented different versions, subsets, and extensions. PostgreSQL therefore has constructs such as ILIKE, RETURNING, and ON CONFLICT; MySQL provides AUTO_INCREMENT; SQLite has its own PRAGMA statements and WITHOUT ROWID tables. The project documentation identifies these differences directly: PostgreSQL calls ILIKE a nonstandard extension, MySQL documents AUTO_INCREMENT separately, and SQLite warns that PRAGMA is specific to SQLite.

SQL is not a literal notation for relational algebra either. The practical language includes schema definition, data modification, transaction control, NULL, ordering, and mechanisms that were not part of Codd's original mathematical model in the same form. Its longevity comes less from theoretical purity than from a useful division of responsibility: developers describe the data they want, and the database system decides how to obtain it.

Codd's relational model branched into System R (SEQUEL) and Ingres (QUEL), leading to SQL standardization and modern database dialects

What the SQL Formatter does

The SQL Formatter runs entirely in the browser and formats a query from its tokens without sending the text to a server. It recognizes keywords, strings, identifiers, line and block comments, and PostgreSQL dollar-quoted strings, then applies indentation and line breaks around the main clauses.

The interface provides four keyword vocabularies: Standard SQL, MySQL, PostgreSQL, and SQLite. Selecting a dialect improves recognition and highlighting for characteristic constructs, but it does not check the query grammar or guarantee that the chosen database will execute it. That distinction matters for unusual or complex syntax because the formatter uses tokenization rather than building a full syntax tree.

You can choose upper or lower case for keywords, indent with two spaces, four spaces, or a tab, and switch between formatted and compact output. The comparison shows the original and resulting UTF-8 byte sizes, the percentage change, and the output line count. To try it quickly, paste the query below, select Format, and then change the keyword case:

select u.id,u.name,count(o.id) as orders from users u left join orders o on u.id=o.user_id where u.active=1 group by u.id,u.name having count(o.id)>5 order by orders desc

Formatting helps with reading, review, and documentation, but the parser of the target database must still validate the query before execution. That boundary reflects SQL's history: the language has a common framework, while the selected implementation gives some constructs their final meaning.

Frequently asked questions

What exactly did Edgar Codd propose?

Codd proposed describing data as relations and working with it at a logical level, without requiring users to know the physical access paths. A table is a convenient representation of a relation, but the relational model is broader than the familiar tabular interface.

Who created SQL?

Donald Chamberlin and Raymond Boyce developed SEQUEL at IBM for the System R project and published its description in 1974. When they learned that SEQUEL was already a trademark, Chamberlin removed the vowels and renamed the language SQL.

Was System R the first relational DBMS?

System R was one of the most important early prototypes, but it was neither the only implementation nor an uncontested first. UC Berkeley was developing Ingres with the QUEL language at roughly the same time, while other groups also explored relational systems.

Why does SQL still have dialects after standardization?

Commercial products began implementing SQL before the first standard appeared, then evolved at different speeds and added their own capabilities. The standards established a common core rather than identical implementations, so PostgreSQL, MySQL, SQLite, and other systems still differ in syntax and features.

Does the SQL Formatter validate a query?

No. The tool recognizes tokens, keywords, strings, and comments, then applies line breaks and indentation. Selecting a dialect changes the highlighting vocabulary, but it does not turn the formatter into a parser, validator, or SQL execution environment.

Related Articles