Home > Database > Mysql Tutorial > body text

Candidate keys in RDBMS

王林
Release: 2023-08-27 22:05:02
forward
1402 people have browsed it

RDBMS 中的候选键

Each table has only one primary key. Each relationship may have one or more candidate keys. One of these candidate keys is called the primary key. Every candidate key is eligible to become a primary key. Therefore the candidate primary key is called candidate key.

The candidate key can be a single column or a combination of multiple columns. The smallest superkey is called a candidate key.

Example

EmployeeID and EmployeeEmail, both can be primary keys; therefore both are candidate keys. Choose any one as the primary key of the table because a table can have only one primary key.

Let’s see another example -

##Student NameStudent_Email##S02S34S22## above, Student_ID,
Student_ID

##Student Registration

4545

Dave

ddd@gmail.com

4541

Jack

jjj@gmail.com

##4555

Mark

mmm@gmail.com

Student_Enroll

and

Student_Email are candidate keys. They are considered candidate keys because they uniquely identify student records.

The above is the detailed content of Candidate keys in RDBMS. For more information, please follow other related articles on the PHP Chinese website!

source:tutorialspoint.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template