Need to find a minimal basis - database

I'm struggling with finding a minimal basis for the given relation and FD's. Can you please confirm I'm doing it right?
I've got R(A, B, C, D, E, F, G)
A -> G
E -> F,G
C,D -> B
B -> E
C,D -> A
After checking each FD there is nothing to remove, so my minimal basis is
A -> G
E -> F
E -> G
C,D -> B
B -> E
C,D -> A
and the key is (C,D) as (C,D)+ = (C,D,A,B,E,F,G)
Many thanks

In American English, I think the term is minimal cover.
CD is the only candidate key in R.
I'm not sure what you mean by "checking each FD", but your result is right.

Related

Relation Schema : How to solve this

I can't solve it.please help
Q In a relation schema R = (A, B, C, D, E), the following functional dependencies are held:
A → BC
CD → E
B → D
E → A
Which of the following is a combination of two candidate keys for R?
Answer Choice:
a) A and E
b) B and C
c) B and D
d) C and D
The Correct Answer is a) A and E
But if E depend on A ( E → A), then why option a) A and E is correct? please help
We can compute the closure of the functional dependencies for each set of attributes on the left-hand side of an FD:
A -> A (Trivial)
A -> ABC (since A -> BC)
A -> ABCD (since B -> D)
A -> ABCDE (since CD -> E)
So we can see that A determines all attributes in the relation. A is a candidate key. For CD, we get:
CD -> CD (trivial)
CD -> CDE (since CD -> E)
CD -> CDEA (since E -> A)
CD -> CDEAB (since A -> BC)
So CD is a candidate key. For B, the most we can derive is:
B -> B (trivial)
B -> BD (since B -> D)
For E:
E -> E (trivial)
E -> EA (since E -> A)
E -> EABC (since A -> BC)
E -> EABCD (since B -> D)
Again, we can determine all attributes in R so E is a candidate key.
So we've got candidate keys A, E and CD. Now, read the question carefully. Which of the possible answers are a combination of two candidate keys? Option d has two attributes of a single candidate key. Options b and c contain B which isn't a candidate key. The only correct answer is a) A and E, which lists two separate candidate keys.

Find minimal candidate keys

I have 2 sets
R = {A B C D}
H = {AB-> C , AB-> D, D-> B}
Want to find all minimal keys in R set
My answer for minimal keys is : { A D }
this is because
AB -> C and AB -> D then AB -> CD
since D -> B then AD is the minimal keys
when i check my answer with this site. the site giving wrong answer.
can explain?
The site says, "Set of found candidate-keys: {{A, C, F}, {B, C, F}}." That's clearly wrong; F isn't even in R.
In any case, your answer is incomplete. AD is one of two candidate keys.

functional dependencies candidate keys

Consider the following relation and the set of functional dependencies (FDs).
R = (A B C D E F G H I)
D -> H
DH -> A
EFH -> C
AF -> IG
CD -> ABG
IB -> C
G -> I
IBC->E
F -> H
C -> IE
Find the candidate key(s) of R.
Find the minimal cover of FD set.
I think "DF" is one of candicate keys.
The ONLY candidate key is DF.
And the Minimal cover is as follows:
D->AH;
EF->C;
AF->G;
CD->ABG;
IB->C;
G->I;
F->H;
C->IE

Functional Dependencies - Finding if F implies

Given the following functional dependencies
F = { A -> BC, CD -> E, B -> D, E -> A }
I cannot wrap my head that F |= E -> BC is false. If you have E, you can go to A, if you have A, you can go to BC. What is incorrect with this logic?
There is nothing wrong with your logic. F |= E->BC.

Is this functional dependancy a trivial? (Relational Database Design)

I have this problem:
R = (A, B, C, D, E)
and
F = (A -> BC, B -> CD, E -> AD)
the book says that this in BCNF because all FDs are trivial.
My question is: how this FDs is trivial?
by what you've posted :
R = ABCDE
A -> BC
B -> CD
E -> AD
the candidate key is E
All the left hand side FDs do not show E so this is not a BCNF.
and hence the non trivial FD.

Resources