Allowed Functional Dependencies (FD) in Various Normal Forms (NF)
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 dependency is of the form A->X where βAβ is a prime attribute but not a key and βXβ is a non prime attribute, 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
Not allowed FDs β
Prime -> Non prime Non prime -> Non prime Prime -> Prime Non prime -> Prime
Allowed β
Key -> Prime/Non prime