Super Key:
Definition: A super key for an entity is a set of
one or more attributes whose combined value uniquely identifies the entities in
the entity set.
e.g. for an entity set Employees, that set of
attributes(emp_name, address) can be considered to be a super key, if we assume
that there no two employee with the same name emp_name and same address.
Primary key:
Primary key:
Definition: In the relational
database management system the primary key is uniquely identifies the each
record in the table and must never be the same for two records.
e.g. emp_code can be primary key for the entity set
Employee.
The primary key should be chosen such that its
attribute are never or very rarely changed.
For the instance ,the address field of the person should not be the part of
primary key, since it is likely to change. emp_code, on the other thand , is
guaranteed to never change, till he is in the organization .
1 comment:
Your thinking is good. I support you your ideas.
Post a Comment