---
title: "Functional Dependencies and Boyce-Codd Normal Form"
description: "A functional dependency says one set of attributes fixes another. Computing the closure of a set of dependencies finds the candidate keys, and Boyce-Codd normal form is the condition that every depend"
canonical: https://lightmysky.com/learn/computing/functional-dependencies-and-boyce-codd-normal-form-mt_PfWLq1aEQz
source: https://lightmysky.com/learn/computing/functional-dependencies-and-boyce-codd-normal-form-mt_PfWLq1aEQz.md
retrieved: 2026-09-12
---

> **Agent view.** This is the Markdown twin of the page, for tools and assistants.
> When to use this site, and the call that answers each job: https://lightmysky.com/agent-instructions.md
> API description (OpenAPI 3.1): https://lightmysky.com/openapi.json · Authentication: https://lightmysky.com/auth.md
> Pricing: https://lightmysky.com/pricing.md · Catalog: https://lightmysky.com/llms.txt · Full catalog: https://lightmysky.com/llms-full.txt
> Every machine-readable file on this domain: https://lightmysky.com/.well-known/ai-catalog.json
> Ask for Markdown with `Accept: text/markdown`, a `.md` address, or `?mode=agent`.

# Functional Dependencies and Boyce-Codd Normal Form

A functional dependency says one set of attributes fixes another. Computing the closure of a set of dependencies finds the candidate keys, and Boyce-Codd normal form is the condition that every dependency starts from one of those keys.

Subject: Computing · Area: Data & Databases · Ages 18 to 19
Page: https://lightmysky.com/learn/computing/functional-dependencies-and-boyce-codd-normal-form-mt_PfWLq1aEQz

## Ready when they can

- List the functional dependencies of a table and compute the closure of an attribute set
- Find all candidate keys from a set of dependencies
- Decompose a table that violates Boyce-Codd form and check the join still recovers it

## Lesson: Keys that decide everything

A functional dependency says one set of columns fixes another. If every student has one email, then student ID fixes email, written ID -> email. The left side decides, so two rows with the same left side can never show different right sides.

To find what a set of columns can reach, compute its closure. Start with the columns you have, apply every dependency again and again, and collect each new column you reach. If the closure reaches every column of the table, you started with a candidate key, a smallest set that names each row alone.

**Example.** Take a table of student, email, and dorm with ID -> email and email -> dorm. The closure of ID reaches email, then dorm, so ID is a candidate key. But email -> dorm starts from email, which alone cannot name a row, so this table breaks Boyce-Codd form. Split it on the violating rule: one table holds ID with email, the other holds email with dorm.

**Tip.** A rule that starts outside a key stores one fact many times, and later updates can make the copies disagree. That is why each fact deserves exactly one home. After you split, join the pieces back and check that you recover the rows you started with.

**Recap.** Dependencies show which columns fix which, closures reveal the keys, and every rule must start from a key or the table splits.

## Practice

8 questions on this page, each with its working shown.

## Needs first

- [Normalisation to Third Normal Form](https://lightmysky.com/learn/computing/normalisation-to-third-normal-form-mt_cbRXVW6KxX)
- [The Relational Model and Relational Algebra](https://lightmysky.com/learn/computing/the-relational-model-and-relational-algebra-mt_unDBd_Ug8T)

## Opens up

- [SQL at Depth: Subqueries, Set Operations and Views](https://lightmysky.com/learn/computing/sql-at-depth-subqueries-set-operations-and-views-mt_SLKUlC-7or)
