A candidate key of a relational table is a set of columns whose subrow values are unique (a unique key, aka superkey) that doesn't contain a smaller such set. One can be chosen primary key; each other is then an alternate key. (An SQL PRIMARY KEY or UNIQUE NOT NULL declaration declares a superkey. It is a candidate key if no smaller one is declared within it.)
A candidate key of a relational table is a set of columns whose subrow values are unique (a unique key, aka superkey) that doesn't contain a smaller such set. One can be chosen primary key; each other is then an alternate key. (An SQL PRIMARY KEY or UNIQUE NOT NULL declaration declares a superkey. It is a candidate key if no smaller one is declared within it. In an SQL context "key" usually means a superkey.)
Candidate keys of a relational table (value or variable) are fixed by the functional dependencies that hold in it. Candidate keys play an important role in database normalization to higher normal forms, along with functional dependencies and join dependencies. A relational foreign key involves a column list referencing a list of columns forming a candidate key. (An SQL FOREIGN KEY declaration declares a foreign superkey. It is a foreign key if that superkey is a candidate key.)