关系模型概念整理 (Relational Model)
Author: 咳嗽di小鱼 Date: October 18, 2011 Category: Sum Up
Definition实在不知道怎么概括= =...
- Intention of a relation: relation definition and constrains
- Extention of a relation: the actual data, tuples
Relation properties
- Set Theory
- Attributes has order (not necessary)
- Value are used to identify tuples
- Tuples dont have order
- Tuples cant have duplication
- Attribute value are atomic
- Degree: How many attributes in the schema
- Cardinality: How many tuples in an instance
Constraints
- Let the DBMS to ensure the entry or modification on data are legal
- Give applications' bug no chance to ruin the data
Three Constraint Level
- Tuple-level
- Domain restrictions (datatype)
- Attribute comparisons (好像是指check)
- Relation-level
- Special type of keys
- Superkey: 能uniquely identifies a tuple的一个or一组attribute
- Candidate key: Superkey的最小集, (最简单的一个or一组attribute)
- Primary key: 被选中, 用来identity tuples的Candidate key
- Special type of keys
- Database-level
- Referential integrity
- Foreign key: 其他relation中的primary key
- Referential integrity: 不允许出现和对应relation中的记录不符的情况
- Inclusion dependencies: = =`不懂
- Referential integrity
在你的博客友情链接里惊现'疯狂的小盒子'字样,甚是诧异
哈哈`你不也+了我的友链...