0% found this document useful (0 votes)
318 views2 pages

Codd's 12 Rules for Relational Databases

E.F Codd invented the relational model for database management. He established 12 rules for relational database management systems (RDBMS) to follow. The rules include: storing all data and metadata in tables, guaranteeing access to each unique data element through table name, primary key and attribute, systematically handling null values, maintaining an online data dictionary to describe the database structure, using a powerful query language to access and update data, supporting relational operations like joins on tables, and maintaining logical and physical data, integrity, and distribution independence.

Uploaded by

Coder Coder
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
318 views2 pages

Codd's 12 Rules for Relational Databases

E.F Codd invented the relational model for database management. He established 12 rules for relational database management systems (RDBMS) to follow. The rules include: storing all data and metadata in tables, guaranteeing access to each unique data element through table name, primary key and attribute, systematically handling null values, maintaining an online data dictionary to describe the database structure, using a powerful query language to access and update data, supporting relational operations like joins on tables, and maintaining logical and physical data, integrity, and distribution independence.

Uploaded by

Coder Coder
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Codd's Rule for Relational DBMS

E.F Codd was a Computer Scientist who invented the Relational model for Database management. Based
on relational model, the Relational database was created.

Rule 1: Information rule

All information(including metadata) is to be represented as stored data in cells of tables. The rows and
columns have to be strictly unordered.

Rule 2: Guaranted Access

Each unique piece of data(atomic value) should be accesible by : Table Name + Primary Key(Row) +
Attribute(column).

Rule 3: Systematic treatment of NULL

Null has several meanings, it can mean missing data, not applicable or no value. It should be handled
consistently. Also, Primary key must not be null, ever. Expression on NULL must give null.

Rule 4: Active Online Catalog( Data Dictionary)

Database dictionary(catalog) is the structure description of the complete Database and it must be stored
online. The Catalog must be governed by same rules as rest of the database. The same query language
should be used on catalog as used to query 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

All the view that are theoretically updatable should be updatable by the system as well.

Rule 7: Relational Level Operation

There must be Insert, Delete, Update operations at each level of relations. Set operation like Union,
Intersection and minus should also be supported.

Rule 8: Physical Data Independence

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

If there is change in the logical structure(table structures) of the database the user view of data should not
change. Say, if a table is split into two tables, a new view should give result as the join of the two tables.
This rule is most difficult to satisfy.

Rule 10: Integrity Independence

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 make 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: Nonsubversion 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.

Common questions

Powered by AI

Rule 12 enhances the security and integrity of a relational database system by ensuring that any low-level access methods cannot subvert or bypass established integrity rules to alter data. This is achieved through mechanisms like locking or encryption, which enforce strict controls on data manipulation paths. As a result, this rule fortifies the system against unauthorized modifications, ensuring that integrity constraints and transactional correctness are maintained even in the presence of direct data manipulation attempts .

Codd's Rule 2, Guaranteed Access, is important for maintaining data granularity and retrieval efficiency because it requires that each atomic piece of data be accessible through a simple combination of table name, primary key, and attribute. This ensures high granularity by allowing precise data retrieval without ambiguity. It enhances retrieval efficiency by providing a systematic and direct method to locate data, facilitating fast and accurate access across complex database structures while minimizing query complexity and execution time .

Rule 4 is critical for maintaining database transparency and consistency because it requires the database dictionary, which holds the structure description of the entire database, to be stored online and accessible like other database data. By applying the same querying language for the catalog as the database, this rule ensures uniformity in database operations and access, preventing discrepancies between how metadata and actual data are handled. This approach strengthens transparency and consistency in database management systems .

Codd's Rule 1, the Information Rule, impacts the structure of a relational database by requiring all information, including metadata, to be stored as data within the cells of tables. This ensures that data is organized in a strict row and column format without any particular order. The implication of this rule is a standardized method of data storage, which supports consistency and enhances accessibility for retrieval and manipulation .

Rule 10's implication of Integrity Independence mandates that databases enforce integrity constraints independently, without reliance on external programs. This has significant impacts on database design and management by necessitating the inclusion of all relevant constraints—such as key, check, and trigger rules—within the database's internal dictionary. This makes the system self-sufficient, facilitating overall data integrity management and reducing dependency on front-end applications. Consequently, databases become more robust, centralized environments capable of autonomously maintaining data correctness and reliability .

The principles of Rule 8, Physical Data Independence, significantly benefit large-scale database administration by ensuring that changes in hardware or data storage infrastructure do not affect the application layer. This allows for seamless enhancements, such as hardware upgrades or file reorganizations, without disrupting service continuity. As a result, administrators can optimize resources, manage system growth more effectively, and flexibly reorganize data physicality without impacting user operations or requiring extensive rewriting of applications .

Rule 11, Distribution Independence, plays a crucial role in distributed databases by allowing systems to function seamlessly regardless of how data is distributed across a network. It ensures that the distribution is transparent to end-users, who perceive the system as a singular entity. This rule supports efficient data management in distributed environments by simplifying data retrieval and processing across multiple locations, which is essential for scalability, reliability, and performance in geographically distributed database systems .

Codd's Rule 5 influences system compatibility and efficiency by mandating the use of a single well-structured language, such as SQL, for all forms of database access. This requirement ensures that all database interactions are standardized, reducing complexity and potential errors from varied interaction methods. It also enhances interoperability between different systems and tools, as they rely on a consistent language framework. This rule promotes efficient system operation, effectively balancing ease of use with comprehensive access capabilities .

Implementing Codd's Rule 9, which involves Logical Data Independence, poses challenges as it requires changes in the database's logical structure not to affect user views. This is difficult because it demands sophisticated views and potentially complex restructuring mechanisms to ensure that user interactions remain unchanged despite underlying updates. Limitations include increased system complexity, and potential performance issues due to necessary processing layers that abstract the logical changes from users. Achieving this independence fully is difficult, making it one of the hardest rules to satisfy .

Codd's Rule 3 affects database integrity and operations by mandating that NULL, a representation for missing, inapplicable, or absent values, is handled consistently. Specifically, it ensures that primary keys cannot be NULL, upholding the integrity of data identification. Moreover, expressions involving NULL must yield NULL to maintain data consistency in operations, thereby ensuring logical processes and data accuracy within database systems .

You might also like