DBMS - Codd's 12 Rules

Dr. Edgar F. Codd developed twelve foundational rules that a database must adhere to in order to qualify as a true relational database. These rules emphasize the importance of relational capabilities in managing stored data.

Rule 1: Information Rule

All data, whether user data or metadata, must be stored in tables. Every piece of information in a database should reside in a table cell, ensuring a tabular structure.

Rule 2: Guaranteed Access Rule

Every data element must be accessible by referencing a combination of table name, primary key (row identifier), and attribute name (column identifier). Accessing data by any other means, such as pointers, is not permitted.

Rule 3: Systematic Treatment of NULL Values

NULL values must have a uniform and systematic treatment. A NULL can indicate missing data, unknown data, or data that is not applicable.

Rule 4: Active Online Catalog

The database structure must be stored in an online catalog, also known as a data dictionary, accessible by authorized users. Users should use the same query language to access both the catalog and the database.

Rule 5: Comprehensive Data Sub-Language Rule

The database must support a single language that includes capabilities for data definition, manipulation, and transaction management. Accessing data without using this language is considered a violation.

Rule 6: View Updating Rule

Any database view that can theoretically be updated should be updatable by the system.

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

The database must support high-level operations for inserting, updating, and deleting data. These operations should not be limited to single rows and must support set operations like union, intersection, and minus.

Rule 8: Physical Data Independence

Physical changes to the database, such as modifications to storage structures, should not impact the way data is accessed by external applications.

Rule 9: Logical Data Independence

Changes to the logical structure, such as merging or splitting tables, should not affect applications using the database. This rule is one of the most challenging to implement.

Rule 10: Integrity Independence

All integrity constraints should be stored independently in the database and be modifiable without affecting applications that access the database.

Rule 11: Distribution Independence

Users should not be aware of whether data is distributed across multiple locations. The database should present data as if it is located in a single site.

Rule 12: Non-Subversion Rule

If the database system provides an interface for low-level access to records, this interface must not bypass security or integrity constraints.

These twelve rules form the basis for understanding and evaluating relational databases, emphasizing accessibility, independence, and data integrity.