Pages

Friday 12 November 2021

CODD rules.


In 1985, Dr Edgar Frank Codd, A computer scientist working for IBM proposed the relational model for database management which forms the theoretical basis for relational databases. He defined thirteen rules, numbered from 0 to 12. Accordingly, if a database has to be called as true relational database management system, then it has to follow all these rules.

Rule 0
This rule states that for a system to qualify as an RDBMS, it must be able to manage database entirely through the relational capabilities.

Rule 1: Information rule
 All the information including metadata (data about data ) has to be represented as stored data in cells of tables.

Rule 2: Guaranteed Access Rule
Each unique piece of data(atomic value) should be accessible by Table Name + Primary Key(Row) + Attribute(column).

Rule 3: Systematic treatment of NULL
If any of the cell value is unknown, or not applicable or missing, it cannot be represent as zero or empty. It will be always represented as NULL. This NULL should be acting irrespective of the data type used for the cell.

Rule 4: Active Online Catalog Based On the Relational Model
Database dictionary (catalog) is the structure description of the complete Database and it must be stored online. We should be able to access these metadata by using same query language that we use to access the database.

Rule 5: Powerful and Well-Structured Language
One well structured language must be there to provide all manners of access to the data stored in the database. Example: SQL, etc. If the database allows access to the data without the use of this language, then that is a violation.

Rule 6: View Updation Rule
This rule states that views are also be able to get updated as we do with its table.

Rule 7: Relational Level Operation (High-Level Insert, Update And Delete Rule)
The system must support Insert, Update and Delete operations at each level of relations.

Rule 8: Physical Data Independence Rule
The physical storage of data should not matter to the system. If say, some file supporting table is renamed or moved from one disk to another, it should not effect the application.

Rule 9: Logical Data Independence
Here if there are any changes to the logical view, then it should not be reflected in the user view.

Rule 10: Integrity Independence Rule
The database should be able to enforce its own integrity rather than using other programs. Key and Check constraints, trigger etc, should be stored in Data Dictionary. This also makes RDBMS independent of front-end

Rule 11: Distribution Independence
A database should work properly regardless of its distribution across a network. Even if a database is geographically distributed, with data stored in pieces, the end user should get an impression that it is stored at the same place. This lays the foundation of distributed database.

Rule 12: Non- subversion Rule
If low level access is allowed to a system it should not be able to subvert or bypass integrity rules to change the data. This can be achieved by some sort of looking or encryption.

No comments:

Post a Comment

Conflict Serializability

Find out conflict serializability for the given transactions T1 T2 T3 R(X)     ...