

Primary key entity in the set cannot have the same value for two or more tuples i.e.The term primary key is used to denote a candidate key that is chosen by database designer as principal means of identifying entities within an entity set.Then, both does not form a candidate key, since the attribute employee-id alone is a candidate key.


Several distinct sets of attributes could serve as a candidate key.Candidate key is nothing but minimal super keys for which no proper subset is a super key.However, the employee-name attribute of employee is not a super key, because several people in an organization might have the same name.Similarly, the combination of employee-name and employee-id is a super key for the entity set employee.For example, the employee-id attribute of the entity set Employee is sufficient enough to distinguish one employee from another.A super key is a set of one or more attributes that allow us to identify an entity uniquely in the entity set.Keys also help uniquely identify relationships, and thus distinguish relationships from each other because no two entities in an entity set are allowed to have exactly the same value for all attributes. A key allows us to identify a set of attributes that suffice to distinguish entities from each other.
