1 1 vote Consider the table:- A | B a | 2 b | a c | 4 NULL | 6 NULL | 6 determine whether F.D. holds for A-->B and/or B-->A?and How? Databases database-normalization + – parthsl 950 views answer comment Share Follow Print See all 4 Comments 4 4 Comments reply Tendua commented Feb 3, 2016 reply Follow flag i think a->b will hold while b->a will not hold . because every null is unique in sql . read it in group by clause . so a->b will hold . but in b->a for 6 both null be different . what is the answr?? 0 0 replyShare parthsl commented Feb 3, 2016 reply Follow flag Just question is available. 0 0 replyShare Tendua commented Feb 3, 2016 reply Follow flag then don't trust me fully. null is undefined behaviour i m not 100% sure . but in group by clause every null is treated uniquely. 0 0 replyShare parthsl commented Feb 3, 2016 reply Follow flag thanx 0 0 replyShare Please log in or register to add a comment.
Best answer 6 6 votes We can only be sure whether the FD does not hold and we can never be sure whether the FD can hold as the values may be differ after insertion(not for instance). So here in the question in this particular instance, A->B can hold as the values in A are different and if both null values are same then also the value in the corresponding B is same(6) and if the value turned out to be different then no issue. So A->B holds. But B->A doesn't hold cause if both the null values turned out to be different (NULL values do not compare equal in SQL) then it will fail.. Joker answered Mar 6, 2016 • edited Mar 6, 2016 by Arjun Joker comment Share Follow 0 reply Please log in or register to add a comment.