What is difference between Primary Key, Unique Key and candidate key?
Super Key is the set of one or more column (ie attributes) which uniquely identifies a record.
Candidate key is a minimal Super key.(it mean we cant remove any attributes from it otherwise it will not remain Superkey anymore).
Primary Key is a arbitrary selected Candidate key. There must be only and only One primary key. We can choose any candidate key as a Primary key. Other candidate keys which are not chosen as Primary are called Alternate Keys.
If Primary Key have more then one column (or attributes) ,it is called Composite Key.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With