Tuesday, June 23, 2009

CODD's Rules

Edgar F. Codd is a father of RDBMS ( Relational database management system )
He has putforth twelve rules which DBMS must follow ( 10 followed by Oracle 2 partialy followed )
These rules are
  • Information rule
  • Gauranted access
  • Systematic treatement to NULL
  • Active online catalog
  • Comprehensive data language
  • View updating rule
  • High level Insert,Update,Delete
  • Physical data independence
  • Logical data indepence
  • Distributed independence
  • Integrity indepence
  • No subversion rule

Information rule: It states that all information shold be stored in tables. Information about the tables should also be stored in tables.
Guaranted Access: It states that if you know table name and primary key you should be able to recover unique record.
Systematic treatement to NULL: It states that NULL is not confined to any datatype but it can be stored in all datatypes.
Active Online Catalog: It states that all information about databases should be stored in data dictionary which should be maintained by DBMS.
Comprehensive data language: This rule states that all data should be accessible by language. All DBMS follows this by providing SQL.
View updating rule: All views should be able to do DML operations. (Not followed by all DMBS not even Oracle).
High level Insert,Update,Delete: High level insert update delete should be possible i.e. it should affect multiple records with single query
Physical data independence: This rule states that where data is stored should be taken care by Operating System. This rule is partially followed by Oracle. Oracle tells OS where to store data using hash.
Logical data indepence: This rule states that data can be present anywhere physically but it should be accessible using same query. e.g. when we run select query we get desired result every time even when DBMS keeps on modifying location where data is stored for efficiency purposes.
Integrity independence:
  1. Entety integrity - Concept of primary key
  2. Referncial integrity - Concept of foreign key
  3. Domail integrity - Concept of data type

Distributed independence: DBMS should support distributed database. Followed by oracle.
Non-subversion rule: If relational system has low level language this language should not bypass integrity constraints