Prerequisite – Functional Dependency and Attribute Closure

We all know the following:

- 2 NF does not allow partial dependency.
- 3NF does not allow transitive dependency.
- BCNF does not allow anything other than super key as determinant.

Let’s check all possible functional dependencies to find out what is allowed and what’s not. Please note: prime attribute is an attribute that is part of any candidate key. Non prime attribute is an attribute that is not part of any candidate key. So, its advisable that you find out all possible candidate keys from the given functional dependencies and mark the prime and non prime attributes.

**Not allowed FDs –**

prime -> non prime

If say your functional depndency is of the form A->X where ‘A’ is a prime attribute but not a key and ‘X’ is a non prime atribute, then such an FD is not allowed in 2NF.

**Allowed FDs –**

Prime -> Prime Non prime -> Prime/Non prime Key -> Prime/Non prime Prime + Non prime combination -> Prime/Non Prime

- If ‘A’ is a prime attribute (though not a key) it can determine another prime attribute
- If ‘A’ is a non prime attribute, it can determine a prime/non prime attribute.
- If ‘A’ is a key, it can determine a prime/non prime attribute.

**Not allowed FDs –**

Prime -> Non prime (2NF requirement) Non prime -> Non prime (3NF special)

**Allowed FDs –**

Prime -> Prime Non prime -> Prime Key -> Prime/Non prime Prime + Non Prime -> Prime/Non prime

**3. Boyce-Codd Normal Form (BCNF) :**

**Not allowed FDs –**

Prime -> Non prime Non prime -> Non prime Prime -> Prime Non prime -> Prime

**Allowed –**

Key -> Prime/Non prime

Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.

## Recommended Posts:

- Finding Attribute Closure and Candidate Keys using Functional Dependencies
- Equivalence of Functional Dependencies
- Canonical Cover of Functional Dependencies in DBMS
- Finding Additional functional dependencies in a relation
- Finding the candidate keys for Sub relations using Functional Dependencies
- Normal Forms in DBMS
- Types of Normal Forms in DBMS
- Normal and Principle Forms
- Functional Dependency and Attribute Closure
- Armstrong's Axioms in Functional Dependency in DBMS
- Functional Completeness in Digital Logic
- Various Implicants in K-Map
- Inclusion-Exclusion and its various Applications
- Applications of various Automata
- Various terms in File System
- Advantages and Disadvantages of various CPU scheduling algorithms
- Various Properties of context free languages (CFL)
- Advantages and Disadvantages of various Page Replacement algorithms
- Basic Laws for Various Arithmetic Operations
- Advantages and Disadvantages of various Disk scheduling algorithms

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.