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} |
广告