Super keys: These are combinations of all possible attributes that can uniquely identify each row of a table.
Candidate keys: These are the super keys that contain only the necessary attributes to identify each row of a table. If a table contains numerous candidate keys, then the database designer chooses one of those keys to uniquely identify each row. This key is the primary key of that table. Also, if a primary key contains more than one attribute, then it is a composite key.
Foreign keys: These are used to implement relations between two tables. One of the tables thus related contains the foreign key, which refers to the primary key of the other table. The values present in the foreign key column of one table must be present in the primary key column of the other table.