Codd’s 12 rules

 Codd’s 12 rules

·         Mathematical theory of relational algebra and calculus.

·         This theory was proposed by Dr. E. F. Code in 1970.

·         Code publish their research paper with the title “A relational model of data for large shared data banks”.

·         Mr Codd gives 12 rules.

 According to these rules, for a database to be relational it has to satisfy at least 6 of the 12 rules.

 Rules are: -

1.    Rule: - Information rule

 All information in the database should be represented in one and only one way.

 A set of related tables forms a database and all the data is represented as the table.

 

2.     Rule: - Guarantee access rule

 Each piece of data must be logically accessible by referencing a table table’s primary key value or a column.

 

3.     Rule: - Systematic treatment of null value:

 Null values representing missing and inapplicable information in a systematic way and independent of the data type.

 

4.      Rule: - Database description rule: - 

 This rule is represented at the logical level so authorized users can apply the same relational language.

 In this rule, the database is self-describing called metadata.

 This data is stored in a system table which is known as a data dictionary and system catalogue.

 

5.      Rules: - Comprehensive data sublanguage rule:

 Rdbms supports several languages, languages whose statements are expressible, have well-defined syntax, and are comprehensible.

These are:

 Data definition

 View definition

 Data manipulation

 Integrity constraint

 Authorization

 Transaction etc.

 

6.     Rule:  View updating rule:

 This rule provides alternatives for viewing data.

 Views are the abstractions of the source table which is known as the virtual table.

 It is not a copy of the data in the source table.

 A view can be manipulated in the same way as a source table.

 If you change data in a view, these are changing underlying data in the source table and vice versa.

 

7.     Rule: High-level insert, update, and delete:

 These rules are capable of handling tables and retrieving data.

 Rdbms must support basic relational algebra operations such as selection, projection, join, and set operations (union, intersection, division, and difference).

 

8.      Rule: - Physical data independence:

According to this rule applications that access data in a RDBMS must be unaffected by changes in the way the data is physically stored.

 It improves the performance.

 

9.       Rule: - Logical data independence: -  

The structure of the table and relationship can change without changing the function of the application and ad hoc query.

 

10.                     . Rule: - Integrity independence:

Integrity constraint defines a particular relational database in a relational data sublanguage and is stored in the data dictionary, not in the application program.

 Data integrity means consistency and the accuracy of the data in the database.

 Data integrity can be enforced.

 Declarative data integrity involves declaring constraints on columns and procedural data integrity is maintained through stored procedure.

 

11.                     Rule: - Distribution independence:

 Rdbms must support distributed operations.

 Data in a relational database can be stored centrally or distributed.

 So, users can join data from tables on different servers by distributed queries and from other relational databases by heterogeneous queries.

 Data integrity must be maintained regardless of the number of copies of data and where it resides.

 

12.                     Rule: - Non-subversion rule:

 RDBMS supports a low-level (single record at a time) language that cannot be used for sub-versions or bypass the integrity rule or constraints, expressed in high-level relational language.

 We cannot get in the back door and change the data in such a manner as data integrity is violet.


============================================================


Post a Comment

0 Comments