×

Codd’s Rules in SQL

Codd’s Rules

Dr. Edgar F. Codd, in 1985, laid down 13 fundamental rules after doing large-scale research on the Relational Model of databases. According to him, every database must follow these rules to be considered as an accurate relational database (RDBMS). These 13 rules are referred to as Codd’s 12 Rules(Foundation rule is base for other rules).

The rules mentioned below are the 12 rules laid down by Codd:

Serial No.Rule
0Foundation Rule
1Information Rule
2Guaranteed Access Rule
3Systematic Treatment of NULL Values
4Active Online Catalog
5Comprehensive Data SubLanguage Rule
6View Updating Rule
7High-level Insert, Update, Delete Rule
8Physical Data Independence Rule
9Logical Data Independence Rule
10Integrity Independence
11Distribution Independence
12Non-Subversion Rule

Let’s discuss each of the above rules in detail.

Foundation Rule

It states that the database should be capable of managing all the records through its relational abilities.

Information Rule

This rule states that the records that are saved in a database can be either user data or can be metadata. But that data must be present as a value in a cell in the database table. It is important that every record in a database is stored in a tabular format, that is, in the form of tables.

Guaranteed Access Rule

This rule states that it should be guaranteed that every atomic data in the database can be accessed with the help of a combination of the keys (primary key), the attribute names and the table name. Also, no other attributes other than these, like pointer, should be able to access the data.

Systematic Treatment of NULL Values

It states that every NULL value in a table should be dealt methodically and uniformly. A NULL can be looked upon as either absence of data or unknown data or data which is not applicable. Hence this is a fundamental rule that should be followed.

Active Online Catalog

It expresses that the definition about the structural description of the complete database should be kept in an online catalog. These catalogs are known as data dictionary and they can be retrieved only by users who have proper authorization. These catalogs can be retrieved by using the corresponding query language, which is used to operate the database.

Comprehensive Data Sub-Language Rule

It expresses that a database can only be accessed by a linear syntax language that hold up data definition, data manipulation, and transaction operations. This language can be used straight or by using other applications. Accessing the database without using a language is considered to be a violation.

View Updating Rule

It states that every view of a database should be revisable both theoretically and also by the system.

High-Level Insert, Update and Delete Rule

It states that every row of a database should hold up high-level insertion, updation, deletion, union, intersection, and minus behaviours to retrieve the data in the table.

Physical Data Independence

It mentions that the data stored in a database should not depend on the application. This implies that changes in the structure of the database should not affect the accessing of the data by applications external to the database.

Logical Data Independence

It, like the previous rule, states that the logical data in a database should not be dependent on the client’s application. This means that any change in the data should not impact the application. This rule is one of the most tough ones to implement.

Integrity Independence

This rule also mentions that a database should not be dependent on the application utilizing it. This means that all the integrity constraints of the database should be modifiable without the need for any change in the application.

Distribution Independence

This rule mentions that the user should not feel or be able to visualise that the data is spread over multiple locations. The user should always feel that the data is situated at one specific location only. This rule is regarded as the foundation for the distributed database systems.

Non-Subversion Rule

This rule states that if a system possesses an interface that lays out access to low-level records, then that interface should not have the authorization to destabilize the system including its security and integrity restrictions.

Thus, these are the 12 rules laid down by Dr. Edgar F. Codd, which should be followed by a database to be called truly relational (RDBMS).


Related Topics

SQL SET Operator

In this tutorial, we will understand the operator who falls under the SET operator in SQL with the help of different examples. The SQL SET Operator is used to merge the...

5 minutes read.

SQL WHERE Clause

The WHERE clause is a search filter that returns only true records. The WHERE clause chooses the selected records based on the given conditions. The WHERE clause is used with...

4 minutes read.

SQL CROSS Join

In this tutorial, we will help you understand the concept of the SQL CROSS Join clause with the few examples. The SQL CROSS Join query is used to join one or...

5 minutes read.

SQL Data Control Language

Data Control Language decides to whom should (which user) permit access privileges. GRANT and REVOKE are the commands of DCL. GRANT: It gives privileges to user. REVOKE: It takes back privileges from granted...

1 minute read.

SQL SELECT MAX

The SQL Max() function is an aggregate function in SQL. This function returns the values which are greater in the condition. The condition may be a number, or it may...

5 minutes read.

SQL Commands

SQL commands are classified into four groups on the basis of their nature. DDL (Data Definition Language) DML (Data Manipulation Language) DCL (Data Control Language) DQL (Data Query Language) NOTE: This...

1 minute read.

Types of SQL JOIN

The SQL JOIN combines one or more than one tables based on their relationship. The SQL JOIN involves a parent table and a child table relationship. There are different types of...

10 minutes read.

SQL IN vs SQL EXISTS

SQL IN vs SQL EXISTS This article discusses in detail about the IN and the EXISTS operators in SQL. It is a common question between developers that what is the difference...

3 minutes read.

TCL Commands in SQL

In Structured Query Language, TCL is an abbreviation for Transaction Control Language. A single unit of work in a database is formed after the consecutive execution of commands is known...

6 minutes read.

SQL CONSTRAINTS

SQL Constraints specifies the rules/limitations/restrictions for data present in table. SQL Constraints are specified at the time of table creation or after table creation using ALTER command. There are two...

5 minutes read.

How to use HAVING clause in SQL

In this article, we will learn about the HAVING clause concept and how to use it in SQL. What is the HAVING clause? In Structured Query Language, HAVING Clause used with GROUP...

7 minutes read.

SQL SELECT SUM

The SQL Sum() function is an aggregate function in SQL that returns the total values of an expression. The expression may be numerical, or it may be an expression. Syntax: SELECT SUM(columnname)...

3 minutes read.

How to compare date in SQL

In this section, we will learn about how dates can be compared in SQL. We can compare any random date with another date stored in a column of a table.This comparison...

4 minutes read.

SQL SELECT MIN

The SQL Min() function is an aggregate function in SQL. SQL Min() returns the minimum value of a given condition. The expression may be numerical, or it may be an expression. The syntax...

5 minutes read.

SQL Data Types

In SQL DATA TYPES, each column holds value. Data types can be an integer type, character type, etc., and such data is stored in the database table. The data type is...

4 minutes read.

SQL DELETE

In this tutorial, you will learn about the SQL DELETE concept by using examples. In Structured Query Language (SQL), we fetch the data from the database table using SELECT Statement and...

3 minutes read.

DML Commands in SQL

DML is an abbreviation of Data Manipulation Language. Data Manipulation Language commands in Structured Query Language manipulate the data in the database. DML commands are used to retrieve records, add records,...

4 minutes read.

SQL SELECT Statement

The SQL SELECT statement is used to retrieve the data from the tables. We can also retrieve the selected records from the table using the query condition. The SQL SELECT...

5 minutes read.

Drop vs Truncate in SQL

In this article, we will learn and understand the Drop and Truncate commands and the difference between these two commands. What is Drop Command? Drop is a Data Definition Language command in...

6 minutes read.

Where vs Having

Difference Between Where and Having The WHERE and HAVING clauses in SQL are used to filter records stored in tables in the databases. The dissimilarities between the WHERE and HAVING clause...

3 minutes read.