Candidate Key Finder
Finds every candidate key of a relation from its functional dependencies, then uses them to decide the highest normal form the relation satisfies and to name the dependency responsible for each failure.
How the keys are found
An attribute that appears on no right-hand side cannot be determined by anything else, so it must belong to every candidate key. Those attributes seed each candidate, and only the remaining ones get combined — which usually collapses the search from every possible subset to a handful.
Each candidate is then tested twice: its closure must contain all attributes (superkey), and no proper subset may also be a superkey (minimal). Smaller sets are tried first, so a genuine candidate key is always found before any superset of it.
A relation can have several candidate keys. With AB → C and C → A, both AB and BC determine everything, so both are candidate keys — and that is exactly the shape that satisfies 3NF while breaking BCNF.
Prime and non-prime
A prime attribute belongs to at least one candidate key; a non-prime attribute belongs to none. The distinction only exists because 2NF and 3NF are defined in terms of it, and getting it wrong is what usually produces the wrong normal form.
How the normal form is decided
2NF fails when part of a candidate key determines a non-prime attribute — a partial dependency. It can only happen when a candidate key has more than one attribute.
3NF fails when a non-superkey determines a non-prime attribute — a transitive dependency.
BCNF fails when a non-superkey determines anything at all, prime or not. It is the strictest of the three, and a relation can sit in 3NF but not BCNF, which is the case worth understanding.
1NF is assumed here. It says values must be atomic, which is a property of the data rather than of the dependencies, so no dependency list can prove or disprove it.
Limits worth knowing
The relation is taken to be exactly the attributes you mention, so anything appearing in no dependency must go in the extra attributes box or the keys will be wrong. The search covers up to 18 attributes, far beyond coursework size. Multivalued dependencies and 4NF are outside what a functional-dependency list can express.