I'm having trouble understanding how to identify keys in functional dependencies. I've been looking at examples, for example:
Given a relation ABCD, find all keys not including superkeys of the
A -> BC, C -> D, CD -> AB.
This gives keys C and A. The way I thought this problem was approached was that BC and D both depend on A and C, and AB depends on CD, meaning all three of them are keys, but since CD is a superkey (C is a subset that is also a key), CD is not considered a minimal superkey.
However, in another example,
ABCDE
AB → CD
E → A
D → A
The only key here is apparently BE. Why is this true, and can anyone clarify the steps to take in finding keys with these problems?
Thanks.