Dr. E.F. Codd, an IBM researcher, first developed the relational data modelin 1970.In 1985, Dr. Codd published a listof 12 rules that concisely define an ideal relationaldatabase, which have provided a guidelinefor the designof all relationaldatabase systems ever since. Iuse the term "guideline" because,to date, no commercial relationaldatabase system fully conformsto 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 arenot talked aboutas much but remain a goalfor relationaldatabase design. Followingis a listof 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 worryif some of these items are confusingto you,as we move further through this newsletter series we will fillin the details. 以下这12条规则的中文由 SilentKiller 翻译,不保证全部正确。
Rule 1: The InformationRuleAll data should be presentedto theuser in table form. Last week's newsletter already discussed the basics of this rule.
1,信息准则 关系数据库中的所有信息都应在逻辑层上用表中的值显式的表示。
Rule 2: Guaranteed Access Rule All data should be accessible without ambiguity. This can be accomplished through a combination of the table name, primary key, and column name.
2,保证访问准则 依于表名,主键和列名,保证能以逻辑方式访问数据库中的每个数据项。
Rule 3: Systematic Treatment of Null Values 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 applyto primary keys.In addition, mostdatabase implementations support the conceptof a nun- null fieldconstraint that preventsnull values in a specifictable column.
3,空值的系统化处理 RDBMS支持空值(不同于空的字符串或空白字符串,并且不为0)系统化的 表示缺少的信息,且与数据类型无关。
Rule 4: DynamicOn-Line Catalog Basedon the Relational Model A relationaldatabase must provide accessto its structure through the same tools that are usedto access the data. Thisis usually accomplishedby storing the structure definition within special system tables.
4,基于关系模型的联机目录 数据库的描述在逻辑上应该和一般数据采用同样的方式,使得授权用户可以 使用查询一般数据所用的关系语言来查询数据库的描述信息。
Rule 5: Comprehensive Data SublanguageRuleThedatabase must support at least one clearly defined language that includes functionalityfor data definition, data manipulation, data integrity,and database transaction control.All commercial relational databasesuse formsof the standard SQL (Structured Query Language)as their supported comprehensive language.
5,合理广泛的子语言准则 一个关系系统可以具有几种语言和多种终端使用方式(表格填空方式,命令 方式等)。但是必须有一种语言,它的语句可以表示为具有严格语法规定的 字符串,并能全面的支持以下功能:数据定义,视图定义,数据操作,完整约束 ,授权,事物控制。
Rule 6:View UpdatingRuleData can be presentedto theuser in different logical combinations, called views. Eachview should support the samefull rangeof data manipulation that direct-accessto atable has available.In practice, providingupdate and delete accessto logical viewsis difficultand is not fully supportedby any current database.
6,视图更新准则 所有理论上可更新的视图也应该允许由系统更新。
Rule 7: High-level Insert,Update,and DeleteData can be retrievedfrom a relationaldatabase in sets constructedof datafrom multiple rowsand/or multiple tables. Thisrule states thatinsert,update,and delete operations should be supportedfor any retrievableset rather than justfor asingle rowin asingle table.
7,高阶的插入,更新和删除 把一个基本关系或导出关系作为一个操作对象进行数据的检索以及插入,更新和删除。
Rule 8: Physical Data Independence Theuser is isolatedfrom the physical methodof storingand retrieving informationfrom thedatabase. Changes can be madeto the underlying architecture ( hardware,disk storage methods ) without affecting how theuser accesses it.
8,数据的物理独立性 无论数据库的数据在存储表示上或存取方法上做任何变化,应用程序和终端活动要都保持逻辑上的不变性。
Rule 9: Logical Data Independence How auser views data shouldnot changewhen the logical structure (tables structure)of thedatabase changes. Thisrule is particularly difficultto satisfy. Most databases relyon strong tiesbetween theuser view of the dataand the actual structureof the underlying tables.
9,数据的逻辑独立性 当基本表中进行理论上信息不受损害的任何变化时,应用程序和终端和终端活动都要保持逻辑上的不变性。
Rule 10: Integrity Independence Thedatabase language (like SQL) should support constraintson user input that maintaindatabase integrity. Thisrule is not fully implementedby most major vendors. At a minimum,all databases do preserve two constraints through SQL. No componentof aprimary key can have anull value. (seerule 3)If aforeign key is definedin onetable,any valuein it must existas aprimary key in anothertable.
10,数据完整的独立性 关系数据库的完整性约束必须是用数据子语言定义并存贮在目录中的,而不是在应用程序中加以定义的。至少要支持以下两种约束:实体完整性:主键中的属性不允许为NULL ; 参照完整性:对于关系数据库中每个不同的非空的外码值,必须存在一个取自同一个域匹配的主键值。
Rule 11: Distribution Independence Auser should be totally unawareof whetheror not thedatabase is distributed (whether partsof thedatabase existin multiple locations). A varietyof reasons make thisrule difficultto implement; I will spend time addressing these reasonswhen we discussdistributed databases.
11,分布的独立性 一个RDBMS应该具有分布独立性。用户不必了解数据库是否是分布式的。(无论数据库是否有部分处于复杂多重环境中)
Rule 12: NonsubversionRuleThere should be no wayto modify thedatabase structure other than through the multiple rowdatabase language (like SQL).
12,无破坏准则 若RDBMS有某种低级语言,这一低级语言不能违背或绕过完整性准则以及高级关系 语言表达的约束。
Most databases today support administrative tools that allowsome direct manipulationof the datastructure.Over the lifeof this newsletter, I will be expandingon the concepts coveredby eachof Codd's rules. I will use the relational query language of choice, SQL, to illustrate these concepts and explain relational database structure in detail.
来源:http://topic.csdn.net/u/20101112/09/4a63e243-15ab-4473-8f28-07a9592b4a4b.html