RDBMS 中的超级键
超级键是一个属性(或一组属性),可唯一识别元组,即实体集中一个实体。
它是候选键的超集,因为候选键是从超级键中选出的。
示例
让我们看一个示例 -
<Student>
Student_ID | Student_Enroll | Student_Name | Student_Email |
S02 | 4545 | Dave | [email protected] |
S34 | 4541 | Jack | [email protected] |
S22 | 4555 | Mark | [email protected] |
以下是上述表的超级键 -
{Student_ID} {Student_Enroll} {Student_Email} {Student_ID, Student_Enroll} {Studet_ID, Student_Name} {Student_ID, Student_Email} {Student_Name, Student_Enroll} {Student_ID, Student_Enroll, Student_Name} {Student_ID, Student_Enroll, Student_Email} {Student_ID, Student_Enroll, Student_Name, Student_Email} |
以下是上述表中的候选键 -
{Student_ID} {Student_Enroll} {Student_Email} |
广告