RDBMS 中的超级键
rdbmsdatabasemysql
超级键是一个属性(或一组属性),可唯一标识一个元组,即实体集中的实体。
它是候选键的超集,因为候选键是从超级键中选择出来的。
示例
让我们看一个例子−
<Student>
Student_ID | Student_Enroll | Student_Name | Student_Email |
S02 | 4545 | Dave | ddd@gmail.com |
S34 | 4541 | Jack | jjj@gmail.com |
S22 | 4555 | Mark | mmm@gmail.com |
以下是上表的超键 −
{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} |