Published on

November 15, 2003

The 12 Rules of Relational Databases

Relational databases are a fundamental component of modern data management systems. They provide a structured and efficient way to store and retrieve data. In 1985, E.F. Codd, a pioneer in the field of databases, formulated a set of rules that define what a relational database system must support in order to be considered truly relational. These rules, known as the 12 rules of relational databases, provide a framework for evaluating the capabilities of a database system.

1. Information Rule

The information rule states that data should be presented in a simple, consistent, and versatile manner. In a relational database, data is organized into tables, with each row representing a single fact and each column describing a property of an object. This rule ensures that data is structured and easy to understand.

2. Guaranteed Access Rule

The guaranteed access rule ensures that each value in a relational database can be uniquely identified and accessed. This is achieved by specifying the table name, primary key, and column name. This rule emphasizes the importance of primary keys in relational databases.

3. Systematic Treatment of Null Values

A fully relational database system must provide a systematic way to handle missing information, represented by null values. Null values are treated as unknown and are not the same as an empty string or zero. This rule ensures consistency in handling missing data.

4. Dynamic Relational Online Catalogue

In addition to user-defined data, a relational database contains data about itself, known as metadata. This metadata describes the structure of the database and its objects. The online catalog, or data dictionary, allows authorized users to query and access this metadata. This rule enables the database to be self-describing.

5. Comprehensive Data Sublanguage Rule

A relational database system should provide a comprehensive data sublanguage that allows users to communicate with the database. This language should support data definition, data manipulation, authorization, integrity constraints, and transactional processing. SQL is the most common language used for querying relational databases.

6. View Updating Rule

Views are virtual tables or abstractions of the source tables in a relational database. They allow users to present data in a customized way without duplicating the underlying data. The view updating rule states that if data is changed in a view, it should also be changed in the underlying table. However, there are limitations to this rule, especially when a view addresses a part of a table that includes no candidate key.

7. High-level Insert, Update, and Delete

A relational database system should support basic relational algebraic operations, such as selection, projection, and joins, as well as set operations like union, intersection, division, and difference. These operations allow users to manipulate data and create new relations based on existing tables.

8. Physical Data Independence

The physical layer of a database system should be independent of the logical layer. Users and applications should not depend on the physical structure of the database. The storage engine of the database is responsible for implementing the physical layer, while the relational engine communicates with the database without user interaction.

9. Logical Data Independence

Users and applications should be independent of the logical structure of a database. The logical structure can be modified without requiring changes to the database or applications. This rule allows for flexibility in modifying the relationships between tables without affecting the functionality of applications.

10. Integrity Independence

A relational database system should implement data integrity as an internal part of the database. Data integrity ensures the consistency and correctness of the data. Changes to integrity constraints should not affect applications, simplifying their development. However, complete integrity independence is not always possible.

11. Distribution Independence

A relational database system should be able to work with distributed databases. It should support distributed queries and allow views to join data from tables on different servers or different database management systems. The user should not have to be aware of whether a database is distributed or not.

12. Nonsubversion Rule

If a relational database system supports a low-level language for single-record operations, it should not be used to bypass or subvert the data integrity rules expressed in the high-level relational language. This rule ensures that the integrity of the data is maintained regardless of the language used for data manipulation.

These 12 rules form the foundation of relational databases and provide a framework for evaluating the capabilities of a database system. While no fully relational database system exists that satisfies all of these rules, they serve as a guide for designing and implementing robust and efficient database systems.

References:
1. Codd, E.F. “Is Your DBMS Really Relational?” and “Does Your DBMS Run By the Rules?” ComputerWorld, October 14 1985 and October 21 1985.
2. Codd, E.F. The Relational Model for Database Management, Version 2; Addison-Wesley; 1990.

Click to rate this post!
[Total: 0 Average: 0]

Let's work together

Send us a message or book free introductory meeting with us using button below.