Codd's twelve rules are a set of thirteen rules (numbered zero to twelve) proposed by Edgar F. Codd,
designed to define what is required from a database management system in order for it to be considered relational.
The bottom line is this:
Inside PL/SQL programs, the most flexible, and often the best-performing, of the collections is the index-by table.
Use nested tables when working with nested table data stored in the database. Nested tables are appropriate for large collections that the application typically stores and retrieves a portion of at a time.
Use VARRAYs when working with VARRAY table data stored in the database. This type of collection is appropriate for small collections that the application stores and retrieves in their entirety.
Codd's 12 Rules for Normalization
Codd's 12 rules are a set of thirteen rules proposed by Edgar F. "Ted" Codd, designed to define what is required from a database management system in order for it to be considered relational, i.e., a RDBMS.
Codd produced these rules as part of a personal campaign to prevent his vision of the relational database being diluted,
as database vendors scrambled in the early 1980s to repackage existing products with a relational veneer.
Rule 12 was particularly designed to counter such a positioning.
In fact, however, the rules are so strict that even systems whose only interface is the SQL language fail on some of the criteria.
Codd's 12 rules
The system must qualify as relational, as a database, and as a management system.
For a system to qualify as a relational database management system (RDBMS), that system must use its relational facilities (exclusively) to manage the database.
The information rule:
All information in the database to be represented in one and only one way, namely by values in column positions within rows of tables.
The guaranteed access rule:
All data must be accessible with no ambiguity.
This rule is essentially a restatement of the fundamental requirement for primary keys.
It says that every individual scalar value in the database must be logically addressable by specifying the name of the containing table,
the name of the containing column and the primary key value of the containing row.
Systematic treatment of null values:
The DBMS must allow each field to remain null (or empty).
Specifically, it must support a representation of "missing information and inapplicable information" that is systematic, distinct from all regular values
(for example, "distinct from zero or any other number," in the case of numeric values), and independent of data type. It is also implied that such representations must be
manipulated by the DBMS in a systematic way.
Active online catalog based on the relational model:
The system must support an online, inline, relational catalog that is accessible to authorized users by means of their regular query
language. That is, users must be able to access the database's structure (catalog) using the same query language that they use to
access the database's data.
The comprehensive data sublanguage rule:
The system must support at least one relational language that
(a) Has a linear syntax
(b) Can be used both interactively and within application programs,
(c) Supports data definition operations (including view definitions), data manipulation operations (update as well as retrieval),
security and integrity constraints, and transaction management operations (begin, commit, and rollback).
The view updating rule:
All views that are theoretically updatable must be updatable by the system.
High-level insert, update, and delete:
The system must support set-at-a-time insert, update, and delete operators.
Physical data independence:
Changes to the physical level (how the data is stored, whether in arrays or linked lists etc.) must not require a change to an
application based on the structure.
Logical data independence:
Changes to the logical level (tables, columns, rows, and so on) must not require a change to an application based on the structure.
Logical data independence is more difficult to achieve than physical data independence.
Integrity constraints must be specified separately from application programs and stored in the catalog. It must be possible to change
such constraints as and when appropriate without unnecessarily affecting existing applications.
The distribution of portions of the database to various locations should be invisible to users of the database. Existing applications
should continue to operate successfully :
(a) when a distributed version of the DBMS is first introduced; and
(b) when existing distributed data are redistributed around the system.
The nonsubversion rule:
If the system provides a low-level (record-at-a-time) interface, then that interface cannot be used to subvert the system, for example,
bypassing a relational security or integrity constraint.