Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are Codd rules?

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

This article uses easy-to-understand examples to introduce what is the Codd rules, the code is very detailed, interested friends can refer to, hope to be helpful to you.

The Codd rule, also known as Codd's law, is made up of 13 rules that determine whether DBMS can be considered a prerequisite for relational DBMS (RDBMS). To put it simply, it is a standard method for evaluating whether DBMS (database management system) is a relational DBMS. Let's introduce what are the 13 rules of Codd in detail. I hope it will be helpful to you.

What is a relational DBMS?

Relational DBMS (RDBMS), that is, relational database management system, is a DBMS designed for relational databases. It has a row-based table structure for joining related data elements and includes functions to maintain data security, accuracy, integrity and consistency.

Description: a relational database is a database that uses rows and columns to store data in a structured format, with a relational structure; so the values in each table are related to each other, and the table may also be related to other tables. The relational structure enables queries to be run across multiple tables at a time.

13 rules of Codd

Codd's 13 rules define an ideal relational database that is used as a guide for designing relational database systems today. Let's look at these 13 rules:

1. Basic rules:

For a system to qualify as RDBMS, the system must meet the requirements of relational, database, and management systems, and must be able to fully manage the database through relational functions.

2. Information rules:

All information in the database (possibly user data or metadata) must be represented logically (that is, as values in the table), and rows and columns must be strictly unordered.

3. Guaranteed access rules:

Ensure that each data element (value) is logically accessible through a combination of table name, primary key (row value), and attribute name (column value).

4. Systematic handling of null values (NULL values):

DBMS must support null values, allow each field to be empty, systematically represent missing and inapplicable information, and be independent of the data type.

5. Dynamic online catalogue based on relational model:

The database system must support online, inline relational directories accessed by authorized users through their regular query language.

That is, users must be able to access the structure (directory) of the database using the same query language they use to access the database data.

6. Rules of integrated data sublanguage:

The database system must support at least one relational language and have the following characteristics:

1), with linear syntax

2), can be used interactively or in an application

3), support data definition (including view definition), data operation (update and retrieval), security and integrity constraints, and transaction management operations (start, commit and rollback).

7. View update rules:

You can use different logical combinations called views to complete the data representation. All views that are theoretically updatable must also be updated by the system.

8. Relationship-level operations (insert, update and delete):

There must be Insert,Delete,Update operations for each relationship level, and the system must support setting insert, update, and delete operators at once. This means that data can be retrieved from a relational database in a dataset consisting of multiple rows and / or tables.

This rule states that any searchable set should support insert, update, and delete operations, rather than just individual rows in a single table.

9. Physical data independence:

Changes at the physical level (how the data is stored, whether arrays or linked lists, etc.) must not have any impact on the way external applications access the data, and the application must not be required to change according to structure.

10. Logical data independence:

The logical data in the database must be independent of its user's view (application). Changes made at the logical level (tables, columns, rows, etc.) affect applications that cannot use it.

Example: if you split the table into two tables, the new view should use the result as a join between the two tables.

Note: this rule is the most difficult to satisfy, and logical data independence is more difficult to achieve than physical data independence.

11. Integrity independence:

Integrity constraints must be defined and separated from the application. It must be possible to change such constraints when appropriate without unnecessary impact on existing applications.

12. Distribution independence:

All parts and locations of the database should not be visible to the users of the database, and the database should work normally regardless of the distribution of the database in the network. The end user should get the impression that it is stored in the same place. This lays the foundation for distributed database.

13. Non-conversion rules:

If low-level language access is allowed to the system, it should not break or bypass the integrity rules of the high-level language to change the data. This can be done through some kind of lookup or encryption.

On what is the Codd rules to share here, I hope that the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report