翻译:Codd 的12条规则

Codd's 12 Rules
Codd 的12条规则

Dr. E.F. Codd, an IBM researcher, first developed the relational data model in 1970. In 1985, Dr. Codd published a list of 12 rules that concisely define an ideal relational database, which have provided a guideline for the design of all relational database systems ever since.
E.F. Codd 博士是IBM研究员,他在1970年第一个提出了关系型数据模型。在1985年,Codd 博士发布了12条规则,这些规则简明的定义出一个关系型数据库的理念,它们被作为所有关系数据库系统的设计指导性方针,直到今天依然如此。


I use the term "guideline" because, to date, no commercial relational database system fully conforms to all 12 rules. They do represent the relational ideal, though. For a few years, scorecards were kept that rated each commercial product's conformity to Codd's rules. Today, the rules are not talked about as much but remain a goal for relational database design.
我使用“指导性方针”(guideline)这个词是因为,没有一个商业 RDBS完全合乎所有12条原则。尽管它们都声称如此。在很多年里,合乎 Codd 的规则是评价每一个商用产品的重要得分部分。今天,这些原则已不像从前那样提得频繁,但对于关系型数据库设计仍然很有价值。


Following is a list of Codd's 12 rules, including his original name for each rule and a simplified description. I also have included a note where certain rules are problematic to implement. Don't worry if some of these items are confusing to you, as we move further through this newsletter series we will fill in the details.
以下是 Codd 的12条原则,包括它们最初的名称和简单的描述。我也包括进来了一些记录,是某些原则中关于实现的疑问之处。不要担心会被其中的内容搞糊涂,我们可以通过新闻邮件进行更详细的讨论。


Rule 1: The Information Rule
原则 1: 信息原则

All data should be presented to the user in table form. Last week's newsletter already discussed the basics of this rule.
所有的数据应该在表里提供给用户。上周的新闻邮件已经论述了这个原则里的基础原则。
(某倒想看看上周的新闻邮件……)


Rule 2: Guaranteed Access Rule
原则 2: 确保访问原则

All data should be accessible without ambiguity. This can be accomplished through a combination of the table name, primary key, and column name.
所有的数据应该是可访问的,不具有歧义的。这些可以通过表名,主键和列名(字段名)的合作来完成。


Rule 3: Systematic Treatment of Null Values
原则 3: 系统的对待空值

A field should be allowed to remain empty. This involves the support of a null value, which is distinct from an empty string or a number with a value of zero. Of course, this can't apply to primary keys. In addition, most database implementations support the concept of a nun- null field constraint that prevents null values in a specific table column.
一个字段应该允许被保持为空。这样能支持一个空值,它与空字符串和零值截然不同。当然,这对于主键是不支持的。另外,大部分的数据库实现支持 nun-null 字段概念,这将预防用 null 规定表列。


Rule 4: Dynamic On-Line Catalog Based on the Relational Model A relational database must provide access to its structure through the same tools that are used to access the data. This is usually accomplished by storing the structure definition within special system tables.
原则 4: 动态在线编目以关系模型A为基础,关系型数据库必须提供用访问数据相同的工具访问其结构的功能。这通常通过保存结构定义为系统表来实现。


Rule 5: Comprehensive Data Sublanguage Rule
原则 5: 包容性数据子语言原则

The database must support at least one clearly defined language that includes functionality for data definition, data manipulation, data integrity, and database transaction control. All commercial relational databases use forms of the standard SQL (Structured Query Language) as their supported comprehensive language.
数据库必须支持至少一个确切的定义语言包括数据定义,数据操纵,数据完整和数据库事务控制等功能。所有的商业关系数据库都建立在标准 SQL(结构化查询语言)作为它们支持的包容性语言。


Rule 6: View Updating Rule
规则 6: 视图更新原则

Data can be presented to the user in different logical combinations, called views. Each view should support the same full range of data manipulation that direct-access to a table has available. In practice, providing update and delete access to logical views is difficult and is not fully supported by any current database.
数据能以不同的逻辑组合提供给用户,被称为视图。每一个视图应该支持相同的全范围数据操纵,能够直接访问表。在现实中,提供更新和删除访问逻辑视图是非常困难的,当前任何数据库都不能完全支持。


Rule 7: High-level Insert, Update, and Delete
原则 7: 高级插入、更新和删除

Data can be retrieved from a relational database in sets constructed of data from multiple rows and/or multiple tables. This rule states that insert, update, and delete operations should be supported for any retrievable set rather than just for a single row in a single table.
数据能够从关系数据库中被重新找回,从多个列和/或多个表中构造成为数据集。这条规则说明了插入、更新和删除操作应该被所有可获取的数据集支持,甚至要超过仅仅一个单独列放在一个单独表中。


Rule 8: Physical Data Independence
原则 8: 物理数据无关性

The user is isolated from the physical method of storing and retrieving information from the database. Changes can be made to the underlying architecture ( hardware, disk storage methods ) without affecting how the user accesses it.
用户应与数据库的物理储存和重寻方法相隔离。对底层架构的改变(硬件,磁盘存储方法),不会影响到用户的访问。


Rule 9: Logical Data Independence
原则 9: 逻辑数据无关性

How a user views data should not change when the logical structure (tables structure) of the database changes. This rule is particularly difficult to satisfy. Most databases rely on strong ties between the user view of the data and the actual structure of the underlying tables.
当数据库的逻辑结构(表结构)发生变化的时候,用户的视图数据不应该变化。这条原则显然是很难确保的。大多数数据库需要依赖在用户视图数据和实际底层表结构之间的强联系。


Rule 10: Integrity Independence
原则 10: 完整性无关性

The database language (like SQL) should support constraints on user input that maintain database integrity. This rule is not fully implemented by most major vendors. At a minimum, all databases do preserve two constraints through SQL. No component of a primary key can have a null value. (see rule 3)
If a foreign key is defined in one table, any value in it must exist as a primary key in another table.
数据库语言(比如SQL)应该支持约束用户输入来维护数据库的完整性。这条规则在大多数主要版本里不能被完全支持。至少,所有的数据库的SQL都有两条约束被保留:

没有一个主键部分具有一个空值。
如果一个外键定义在一个表中,其中的所有值必须在另一个表里作为主键存在。


Rule 11: Distribution Independence
规则 11: 分布无关性

A user should be totally unaware of whether or not the database is distributed (whether parts of the database exist in multiple locations). A variety of reasons make this rule difficult to implement; I will spend time addressing these reasons when we discuss distributed databases.
一个用户应该完全觉察不到数据库是如何分布的(不管部分数据库在许多位置存在)。种种原因使这条规则难以实现;当我们讨论分布式数据库时我将花时间解说这个问题。


Rule 12: Nonsubversion Rule
规则 12: 没有子版本规则

There should be no way to modify the database structure other than through the multiple row database language (like SQL). Most databases today support administrative tools that allow some direct manipulation of the datastructure. Over the life of this newsletter, I will be expanding on the concepts covered by each of Codd's rules. I will use the relational query language of choice, SQL, to illustrate these concepts and explain relational database structure in detail.
应该没有超过多列数据库语言(如SQL)的途径来修改数据库结构。大多数今天的数据库支持用一些管理工具直接对数据结构进行操纵。在这系列邮件的最后,我将详述具体每一个 Codd 的规则。我将用所选的关系查询语言,SQL,来详阐述这些具体内容,并解释关系型数据库结构的详细情况。

原文来自: http://www.zhanling.com/zhanling/qiu/blogview.asp?logID=83&cateID=3


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值