I have a table L(A, B, C). Functional dependencies are: A->B, A->C, B->A, B->C. Is this table in 3nf? My thoughts: A and B are keys of this table. Table is in 3nf if there are no transitive dependencies between keys and non-prime attributes. There is a transitive dependence A->B->C, so it's not in 3nf? Or it does not work in this way, because B is a key? Hopefully I didn't confuse you too much. Thanks.
Here's one attempt (this is not a day to day activity for me, so I may be doing some weird errors below):
A and B are clearly candidate keys of R. Therefore C is the only non-prime attribute of R
R is in 3NF iff:
a) R is in 2NF
b) Every non-prime attribute of R (C) is non-transitively dependent on every superkey of R.
The superkeys of R is (A, B), (A, C), (A, B, C)
By reflexivity (A, C) -> C AND (A, B, C) -> C By composition of A->C and B->C we get (A, B) -> (C, C), i.e. (A, B) -> C
C is therefore non-transitively dependent on every superkey of R, and hence R is in 3NF.
Here's a condition that will help you in the future to check if a relation is in 3NF (it checks 2NF implicitly, i.e can be applied on any relation directly without checking 2NF) :
A relation is in 3NF if for every non-trivial functional dependency(X is not a superset of Y in X->Y) the following 2 conditions hold
1) Either X is a superkey
2) or Y is a prime attribute.
Here, taking your question as an example. R(A,B,C) FDs : A->BC, B->AC
For both the F.D the left hand side A and B are both superkeys (c.k in this case). So, its in 3NF (and hence, 2NF)