what is the difference between super key and primary key?
Keys difference in dbms
hello @kani001
super key -> a set of attributes that uniquely determine tuple/row of a table/relation
primary key -> a minimal set of attributes that uniquely determine tuple/row of a table/relation.
minimal attributes means all attributes are mandatory to determine row uniquely (this condition is not there in case of super key).
u can say that primary key is subset of super key .
check this diagram ->

minimal attributes means all attributes are mandatory to determine row uniquely (this condition is not there in case of super key). i cant understand this line can you please elaborate.minimal means all attributes are not mandatory right to uniquely identify the row?
let say { A,B} is primary key .
then by minimal i mean u cant break this set furthur into smaller set to get another primary i.e alone A or alone B cannot uniquely determine a tuple (subset of primary key cannot be a primary key ).
but this is not true for super key.
is primary key and candidate key same then?\
yeah they are same.
we pick one key among all available candiate key and then name it as primary key.
so u can say all primary key are candiate key.