...
SQL
August 29, 2024
Database-Management-System
August 29, 2024
SQL
August 29, 2024
Database-Management-System
August 29, 2024

Database-Management-System

Question 488
If a relation is in 2NF and 3NF forms then :
A
no non-prime attribute is functionally dependent on other non-prime attributes
B
no non-prime attribute is functionally dependent on prime attributes
C
all attributes are functionally independent
D
prime attribute is functionally independent of all non-prime attributes
Question 488 Explanation: 
2NF: A relation is said to be in 2NF if there is no partial dependency which means a relation is said to be in 2NF if there is no Prime key attribute which is functionally defining a non-key prime attribute. But a prime attribute can functionally determine a prime attribute.
Example: Let us consider a relation R(A, B, C, D) and let’s take ABC is the primary key of the given relation R then A, B, C are the prime attributes and D is a non-key prime attribute.
Now for 2NF, B → D should not exist but B → A can exist.
3NF: A relation is said to be in 3NF if no transitive dependency exist in the relation i.e. either the LHS of a functional dependency should be a super key or the RHS of a functional dependency should be a Prime attribute.
Option(A) is correct it means the the LHS will always be a super key or both LHS or RHS of a functional dependency will be a prime key attribute. In both the cases the relation will be in 3NF and when the relation will be in 3NF it will automatically be in 2NF.
Option (B) is incorrect because according to this if there could be a case when in a functional dependency its LHS will not have prime key attribute and RHS will also not be a prime key attribute. So in that case the relation can’t be in 3NF. so this option is not correct.
Option(C) is incorrect, if all attributes will be functionally independent then the conditions of being in 2NF and 3NF will not be satisfied. SSo this option is incorrect.
Correct Answer: A
Question 488 Explanation: 
2NF: A relation is said to be in 2NF if there is no partial dependency which means a relation is said to be in 2NF if there is no Prime key attribute which is functionally defining a non-key prime attribute. But a prime attribute can functionally determine a prime attribute.
Example: Let us consider a relation R(A, B, C, D) and let’s take ABC is the primary key of the given relation R then A, B, C are the prime attributes and D is a non-key prime attribute.
Now for 2NF, B → D should not exist but B → A can exist.
3NF: A relation is said to be in 3NF if no transitive dependency exist in the relation i.e. either the LHS of a functional dependency should be a super key or the RHS of a functional dependency should be a Prime attribute.
Option(A) is correct it means the the LHS will always be a super key or both LHS or RHS of a functional dependency will be a prime key attribute. In both the cases the relation will be in 3NF and when the relation will be in 3NF it will automatically be in 2NF.
Option (B) is incorrect because according to this if there could be a case when in a functional dependency its LHS will not have prime key attribute and RHS will also not be a prime key attribute. So in that case the relation can’t be in 3NF. so this option is not correct.
Option(C) is incorrect, if all attributes will be functionally independent then the conditions of being in 2NF and 3NF will not be satisfied. SSo this option is incorrect.

Leave a Reply

Your email address will not be published. Required fields are marked *