DEV Community

Jaimin Bariya
Jaimin Bariya

Posted on

The Journey from Edgar F. Codd to Modern SQL: How Relational Databases Changed the World

When you think of databases today, one of the most popular and widely used languages is SQL (Structured Query Language).

  • But where did it come from?
  • How did it evolve into the foundation of data management in every industry?

Let’s journey back to the origin of relational databases, how a visionary named Edgar F. Codd changed everything, and how his groundbreaking ideas evolved into SQL, the language that powers most modern databases.


The Birth of the Relational Database Model: Edgar F. Codd’s Vision

  • In the 1960s and early 1970s, data was stored in hierarchical and network models. These systems were cumbersome and required programmers to write complex code just to retrieve or manipulate data.

  • That’s when Edgar F. Codd, a British computer scientist working at IBM, stepped in with a revolutionary idea: relational databases.

  • In 1970, Codd published his landmark paper titled "A Relational Model of Data for Large Shared Data Banks". This paper introduced the concept of storing data in relations (tables) and made querying data a lot simpler.

  • Instead of relying on complicated navigation through hierarchical structures, Codd proposed a way to store data in rows and columns, much like a simple spreadsheet, but far more powerful and efficient.

Relational Algebra and Relational Calculus

To manipulate and query these relations (or tables), Codd introduced two key concepts in his 1971 work: Relational Algebra and Relational Calculus. Both are mathematical foundations for how data can be retrieved and managed in a database, but they have some differences.

Relational Algebra: The Procedural Approach

Relational algebra is a procedural way of querying data. It focuses on how to retrieve the data by using specific operations like:

  • Selection (σ): Filtering rows based on conditions.
  • Projection (π): Selecting specific columns.
  • Union (∪): Combining two sets of data.
  • Join (⨝): Merging tables based on relationships.

This approach defines step-by-step operations for retrieving the data, which is essentially what SQL does behind the scenes today.

Relational Calculus: The Declarative Approach

On the other hand, relational calculus is declarative. Instead of focusing on how to get the data, it tells you what data you want. There are two types of relational calculus:

  • Tuple Relational Calculus (TRC): Focuses on filtering tuples (rows).
  • Domain Relational Calculus (DRC): Focuses on filtering based on domain values (specific columns).

This approach is reflected in the way we write SQL queries today. When you write a query, you declare what data you want, and the database engine figures out how to get it for you.


The Development of SQL: A New Language for a New Model

Codd’s work had a profound impact on the computing world. His ideas became the foundation for relational database management systems (RDBMS), and as more companies began to see the power of his model, IBM took the lead in building the first commercial relational database system.

In the mid-1970s, IBM developed a language called SEQUEL (Structured English Query Language), which later evolved into SQL. SEQUEL was designed to make querying databases easier by using simple English-like statements to access and manipulate data.

SQL and Relational Algebra: Procedural Operations in Action

At its core, SQL is based on relational algebra, implementing many of its fundamental operations, such as:

  • SELECT (Relational Algebra: Selection and Projection): This retrieves specific rows and columns from a table based on conditions.
  • JOIN (Relational Algebra: Join): SQL allows us to combine data from multiple tables using various types of joins (INNER, OUTER, LEFT, RIGHT).
  • UNION: SQL can merge data from different tables into one result set.
  • GROUP BY and HAVING: SQL’s ability to group data and apply conditions on grouped data mimics algebraic operations.

For example, the SQL query:

SELECT OrderID, CustomerName, TotalAmount 
FROM Orders 
WHERE OrderDate > '2024-01-01' AND TotalAmount > 100;
Enter fullscreen mode Exit fullscreen mode

This is SQL implementing selection (filtering rows) and projection (choosing specific columns), two key concepts of relational algebra.

Relational Calculus and SQL: The Declarative Nature

SQL also incorporates the declarative style from relational calculus, where you specify what you want but not how to retrieve it. When you write an SQL query like the one above, you're essentially stating:

  • “Give me the OrderID, CustomerName, and TotalAmount for all orders placed after January 1, 2024, where the TotalAmount is greater than $100.”

You don’t need to worry about the algorithm the database will use to get that data. The SQL engine will figure out the best way to do that efficiently, just as relational calculus describes.


SQL Takes Over: The Standard for Databases

By the late 1970s and early 1980s, SQL became the standard query language for relational databases. In 1986, the American National Standards Institute (ANSI) officially adopted SQL as the standard language for relational databases, cementing its place in history. IBM's SQL-based product, DB2, was among the first commercial RDBMSs, and soon after, companies like Oracle, Microsoft, and Sybase followed with their own SQL-based systems.

Today, SQL is used in virtually every industry to manage, query, and manipulate data in relational databases. From banking systems and healthcare to e-commerce platforms and social media, SQL serves as the backbone of data-driven applications around the world.


Conclusion: From Codd’s Vision to the Future of Databases

The evolution from Edgar F. Codd’s relational model to modern SQL has been nothing short of transformative. Codd’s ideas gave rise to an efficient and powerful way to organize and query data, which led to the development of SQL, the language that dominates database management today.

While new database technologies such as NoSQL have emerged to handle specific types of data (like documents or graphs), relational databases and SQL continue to be the standard for most applications, due to their simplicity, power, and flexibility.

Codd’s work continues to be foundational, reminding us of how mathematical concepts like relational algebra and relational calculus can change the world of computing and beyond.


Fun Fact: Every time you use a search engine, check your bank statement, or place an order on an e-commerce site, there’s a good chance you’re interacting with SQL and benefiting from the relational database model created by Codd more than 50 years ago!

Top comments (1)

Collapse
 
jaiminbariya profile image
Jaimin Bariya

.