In: Computer Science
Assume a relation X(A,B,C) defined by the following statement:
CREATE TABLE X (A int, B int, C int);
The relation is currently empty. You have to insert exactly 3 tuples into the relation, without duplicates, to create a data instance in which the functional dependency A → BC holds and the functional dependencies B → C and C → B do not hold.
Submit your 3 insert statements
SQL commands:
create table X (A INT, B INT, C INT);
insert into X values (1, 2, 3);
insert into X values (2, 3, 2);
insert into X values (3, 2, 2);
select * from X;
This is the relation that we obtain after performing the above SQL commands
Here, we see that A is required, to uniquely identify B and C combined, as row 1 and row 3 have same values for B and C, there are no values that are same for A, hence it can identify a row uniquely even with values being same for B and C. so A -> BC holds. So, A can determine BC.
B -> C and C -> B, doesn't hold because C doesn't have same values for same values of B and vice versa.
For B = 2, we have two values for C (they are 3, 2), hence B cannot determine C. Hence B->C doesn't hold.
For C = 2, we have two values for B (they are 3, 2), hence C cannot determine B. Hence C->B doesn't hold.