Dr. E.F.
Codd formulated 12 rules to define what constitutes a fully
relational database system, known as Codd's 12 Rules. These rules
ensure that a database management system (DBMS) is truly relational and
follows the principles of the relational model. Below are the rules:
Rule 0: Foundation Rule
A system must qualify as a relational database management system
(RDBMS) and must use its relational capabilities to manage the database.
Rule 1: The Information Rule
All information in a relational database is represented explicitly at the
logical level and in exactly one way—by values in tables (relations).
Rule 2: Guaranteed Access Rule
Each and every data item (atomic value) is guaranteed to be accessible
by using a combination of the table name, primary key, and column name.
Rule 3: Systematic Treatment of Null Values
Null values (distinct from empty strings or zero) must be fully supported in
the system for representing missing or inapplicable information.
Rule 4: Dynamic Online Catalog Based on the Relational Model
The database's metadata (catalog) must be stored and managed as
ordinary data in tables, allowing authorized users to query the catalog
using the same relational language they use to query the database.
Rule 5: Comprehensive Data Sublanguage Rule
The system must support at least one relational language that:
Has a linear syntax.
Can be used interactively and through application programs.
Supports data definition, manipulation, and integrity constraints,
along with transaction management (begin, commit, rollback).
Rule 6: View Updating Rule
All views (virtual tables) must be updatable if the underlying base tables
are updatable.
Rule 7: High-Level Insert, Update, and Delete
The system must support set-based insert, update, and delete operations,
meaning it should operate on multiple rows at a time rather than one row
at a time.
Rule 8: Physical Data Independence
Changes to the physical storage of data (e.g., how it is stored on disk)
must not affect how data is accessed at the logical level.
Rule 9: Logical Data Independence
Changes to the logical structure of the database (e.g., adding columns or
tables) must not affect the user interface or applications built on the
database.
Rule 10: Integrity Independence
Integrity constraints (such as primary key, foreign key, and domain
constraints) must be stored in the catalog and not in the application,
allowing them to be modified without affecting applications.
Rule 11: Distribution Independence
The distribution of the database across multiple locations must not be
visible to users. A system must be able to function regardless of whether
it’s distributed or localized.
Rule 12: Non-Subversion Rule
If a system provides low-level access to the data (like record-at-a-time
access), there must be no way to bypass the integrity rules set through
the higher-level relational language.
These rules are fundamental to understanding the nature of relational
databases and ensure that a DBMS is truly relational and offers all the
benefits of data management and integrity.
4o