Codd’s 12 Rules in DBMS

Introduction

The Relational Model was proposed by Edgar F. Codd in 1970.
To define what a true relational database system should be, he introduced a set of principles known as Codd’s 12 Rules.

These rules act as a benchmark to evaluate whether a Database Management System (DBMS) can be considered a true Relational Database Management System (RDBMS).

Note: Codd actually numbered the rules from 0 to 12, making a total of 13. However, they are commonly referred to as the “12 Rules.”


Rule 0: Foundation Rule

A system can be called relational only if it manages data entirely through relational capabilities.

This means:

  • Data must be stored in tables (relations)
  • All operations must be performed using relational concepts

Rule 1: Information Rule

All information in the database must be represented only as values in tables.

This means:

  • Data is stored in rows and columns
  • No hidden storage formats

Example:
Student data must be stored as tuples in a STUDENT table.


Rule 2: Guaranteed Access Rule

Each data value must be accessible by specifying:

  • Table name
  • Primary key value
  • Column name

This ensures that every piece of data can be uniquely accessed.


Rule 3: Systematic Treatment of NULL Values

The DBMS must support NULL values systematically.

NULL represents:

  • Missing data
  • Unknown data
  • Not applicable data

NULL must be handled consistently across all operations.


Rule 4: Active Online Catalog

The database catalog (metadata) must be stored in the same relational format as regular data.

Metadata includes:

  • Table definitions
  • Column details
  • Constraints

Users should be able to query metadata using the same query language.


Rule 5: Comprehensive Data Sub-Language Rule

The system must support at least one language that provides:

  • Data definition (DDL)
  • Data manipulation (DML)
  • View definition
  • Integrity constraints
  • Authorization
  • Transaction control

In most systems, this language is SQL.


Rule 6: View Updating Rule

All views that are theoretically updatable must be updatable by the system.

A view is a virtual table created from one or more base tables.

If updating a view is logically possible, the DBMS should allow it.


Rule 7: High-Level Insert, Update, and Delete

The system must support set-level operations.

This means:

  • Multiple rows can be inserted, updated, or deleted in a single operation
  • Not limited to record-by-record processing

Example:
Updating salary for all employees in one command.


Rule 8: Physical Data Independence

Changes in physical storage should not affect application programs.

Examples:

  • Changing indexing method
  • Changing storage location

Applications should continue working without modification.


Rule 9: Logical Data Independence

Changes in logical structure should not affect application programs.

Examples:

  • Adding new columns
  • Adding new tables

Applications using the existing structure should not break.


Rule 10: Integrity Independence

Integrity constraints must be stored in the database catalog and not in application programs.

This ensures:

  • Centralized control
  • Consistent enforcement

Example:
Primary key and foreign key constraints should be defined in the DBMS.


Rule 11: Distribution Independence

The database should work the same way whether it is centralized or distributed.

Users should not need to know:

  • Where data is stored
  • Whether it is spread across multiple systems

Rule 12: Non-Subversion Rule

If a system provides low-level access, it must not bypass relational integrity rules.

This prevents:

  • Direct manipulation that violates constraints
  • Corruption of data integrity

All operations must respect relational rules.


Why Codd’s Rules Are Important

Codd’s Rules:

  • Define what makes a system truly relational
  • Promote data independence
  • Enforce strong integrity principles
  • Provide a theoretical foundation for RDBMS

Most modern systems like MySQL, PostgreSQL, Oracle, and SQL Server are inspired by these principles, though no system fully satisfies all rules perfectly.


Summary

  • Codd introduced 12 rules to define a true relational system
  • Rules ensure data consistency, independence, and integrity
  • They act as evaluation criteria for RDBMS
  • They strengthen the theoretical foundation of the relational model

Codd’s Rules are important from an academic and exam perspective, especially in university-level DBMS courses.