候选键和主键有什么区别? [英] What is the difference between a candidate key and a primary key?

查看:102
本文介绍了候选键和主键有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

主键是为给定表选择的候选键吗?

Is it that a primary key is the selected candidate key chosen for a given table?

推荐答案

Candidate Key – Candidate Key 可以是可以在数据库中作为唯一键的任何列或列的组合.一张表中可以有多个候选键.每个候选键都可以作为主键.

Candidate Key – A Candidate Key can be any column or a combination of columns that can qualify as unique key in database. There can be multiple Candidate Keys in one table. Each Candidate Key can qualify as Primary Key.

Primary Key – 主键是唯一标识记录的一列或列的组合.主键只能有一个候选键.

Primary Key – A Primary Key is a column or a combination of columns that uniquely identify a record. Only one Candidate Key can be Primary Key.

更多在这个链接上有例子

这篇关于候选键和主键有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆