【数据库设计】 Practice2 Oracle主键、外键

主键与外键

1. 主键(Primary Key)

(1) 候选键 (Candidate Key)

Candidate Key:A candidate key is a column (attribute) or columns that could uniquely identify a row (tuple) in the table (relation)

候选键(Candidate Key):候选键是一个列(属性)或多个列,它们可以惟一地标识表(关系)中的行(元组)

(2)主键(Primary Key )

①Primary Key: A primary key is the ‘best’ candidate key for a particular table; it is the one that is implemented

主键(Primary Key): 键是特定表的最佳候选键;它是实施的。

②If a candidate key does not exist an additional column is created to become the primary key (often given the name ‘ID’ -IDentification)——This is called a surrogate key

如果候选键不存在,则会创建一个附加列作为主键(通常使用名称“ ID” -IDentification)——这被称为 “代理键”

③Some candidate or primary keys consist

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值