Course contentsShow
← Computer Science
Lesson 1621 of 2,87237. Database Design and NormalizationFree lesson

Introduction to Functional Dependencies

Understanding what functional dependencies are and their role in describing relationships between attributes in a database schema.

Introduction to Functional Dependencies

You'll learn what functional dependencies are and why they're essential for describing how attributes relate to each other in database schemas.

What Are Functional Dependencies?

A functional dependency (FD) describes a relationship between attributes in a table where one attribute (or set of attributes) uniquely determines another attribute. Think of it like a mathematical function: if you know X, you can always determine Y.

We write this as: X → Y (read as "X determines Y" or "Y is functionally dependent on X")

Real-World Analogy

Imagine a student database. If you know a student's ID, you can always determine their name, email, and birthdate. These relationships are functional dependencies:

  • StudentID → Name
  • StudentID → Email
  • StudentID → Birthdate

The student ID determines these other attributes because each ID maps to exactly one name, one email, and one birthdate.

Why They Matter

Functional dependencies help us:

  1. Understand data relationships – They formally describe how attributes connect
  2. Detect redundancy – Repeated data often signals problematic dependencies
  3. Guide normalization – They're the foundation for organizing tables efficiently (you'll learn normalization soon!)

Key Properties

  • FDs are based on the meaning of the data, not just current table contents
  • If StudentID → Name, this means for all possible data, not just what's in the table right now
  • They come from understanding the real-world rules of your domain

Key Takeaway: Functional dependencies formalize how attributes determine other attributes in a database, serving as the foundation for proper database design and normalization.