2.2 关系数据模型
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
### 超关键字
- 超关键字也称超码,是指一个或多个属性的集合,这些属性的组合可以使我们在一个实体集中唯一地标识一个实体。
- 二维表中,超关键够唯一能确定记录的一个字段或几个字段的组合被称为“超关键字”。“超关键字”虽然能唯一确定记录,但是它所包含的字段可能是有多余的
- 如果k是一个超码,那么k的任意超级也是超码
### 候选关键字
- 如果一个属性集的值能唯一标识一个关系的元组而又不含有多余的属性,则称该属性集为候选关键字
### 主关键字
- 主关键字是表中的一个或多个字段,它的值用于唯一地标识表中的某一条记录。
- 有时一个关系中有多个候选关键字,这时可以选择其中一个作为主关键字,简称关键字。主关键字也称为主码或主键。每一个关系都有一个并且只有一个主关键字
### 主属性
- 包含在任一候选关键字中的属性称为主属性
### 非主属性
- 不包含在任一候选关键字的属性称为非主属性
### 外部关键字
- 外部关键字,数据库的语言。其概念是关系中某个属性或属性组合并非关键字,但确是另一个关系的主关键字
- 解释:外部关键字也是表中的一个或多个字段,外部关键字的值与相关表的主关键字相匹配。例如,“供应商”表中的主关键字“供应商ID”字段就与“产品”表中的外部关键字“供应商ID”字段相连
- 当一张二维表(如T1)的主关键字被包含到另一张二维表(如T2)中时,它就称为T2的外部关键字
Contributor guide
No contributing guide indexed for this repository
Research direction
No file, test, or entry point is named; first identify where this Chinese database-model note belongs and what correction or addition is wanted. Done should be a clearly specified documentation change with the relevant terminology checked against the book and project conventions.
Written by the indexing model from the issue text.
Assessment
- Domain
- databases, documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100