SyntaxStudy
Sign Up
MySQL Functional Dependencies
MySQL Intermediate 4 min read

Functional Dependencies

Functional Dependencies

A functional dependency X → Y means knowing X determines Y. Understanding FDs is the foundation for all normal forms.

Example
-- In an orders table:
-- order_id -> customer_id      (each order has one customer)
-- order_id -> total            (each order has one total)
-- customer_id -> customer_name (each customer has one name)

-- Transitive: order_id -> customer_id -> customer_name
-- This transitive dependency violates 3NF
Pro Tip

Draw an arrow diagram of all FDs to spot normalization violations visually.