1. What is Functional Dependency (FD)?
π A relationship where one column (or set of columns) determines another.
- Example:
Roll_No β Name(Knowing Roll_No gives Name).
2. Key Terms
- Determinant = the predictor (e.g., Roll_No).
- Dependent = the predicted (e.g., Name).
3. Why FD is Important?
β Removes redundancy
β Prevents anomalies (update/insert/delete problems)
β Helps normalize tables
4. Types of FD
- Trivial: {A, B} β A (dependent is part of determinant).
- Non-Trivial: A β B (dependent not part of determinant).
5. Keys & Closure
- Candidate Key = Smallest set of columns that uniquely identify rows.
Example:Roll_No. - Closure = All attributes you can find from a key.
Example:Roll_NoβΊ = {Roll_No, Name, Class}.
6. Why Decompose Tables?
Bad tables cause:
- Redundancy (wasted space).
- Update anomaly (change in many rows).
- Insert anomaly (canβt add data without another).
- Delete anomaly (deleting one row loses other info).
7. How to Decompose?
- Lossless decomposition β No data is lost when splitting.
- Dependency preservation β FDs still hold in decomposed tables.
8. Normal Forms (NF)
- 1NF β No repeating groups, atomic values.
- 2NF β No partial dependency (non-key column depends on part of key).
- 3NF β No transitive dependency (non-key depends on another non-key).
- BCNF β Every determinant must be a candidate key.
9. Steps to Solve FD Questions
- Find candidate keys.
- Find FDs.
- Check normal form (1NF β 2NF β 3NF β BCNF).
- Decompose if needed (lossless + dependency preserved).
10. Easy Memory Trick π
FD = If I know this β I know that
Keys unlock the table
Normalize step by step:
BCNF β Determinant must be a key
1NF β Remove repeating data
2NF β Remove partial dependency
3NF β Remove transitive dependency
