Question

In: Computer Science

Assume a relation X(A,B,C) defined by the following statement: CREATE TABLE X (A int, B int,...

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

Solutions

Expert Solution

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.


Related Solutions

Create separate class with these members a, b, c, x, y, z int a b c...
Create separate class with these members a, b, c, x, y, z int a b c float x y z Demonstrate 3) A two arg float, int constructor, and a three arg int, float, float constructor to instantiate objects, initialize variables read from the keyboard, display the sum Note:- Please type and execute this above java program and also give the output for both problems. (Type a java program)
Create separate class with these members a, b, c, x, y, z int a b c...
Create separate class with these members a, b, c, x, y, z int a b c float x y z Demonstrate 1) A two arg float constructor, and a two arg int constructor to instantiate objects, initialize variables read from the keyboard, display the sum. Note:- Please type and execute this above java program and also give the output for both problems. (Type a java program)
Translate the following function f to MIPS assembly code. int f(int a, int b, int c,...
Translate the following function f to MIPS assembly code. int f(int a, int b, int c, int d) { return func(func(a,b), func(b+c,d)); } Assume the followings. • The prototype of function func is “int func(int a, int b);”. • You do not need to implement function func. The first instruction in function func is labeled “FUNC”. • In the implementation of function f, if you need to use registers $t0 through $t7, use the lower-numbered registers first. • In the...
Let ∼ be the relation on P(Z) defined by A ∼ B if and only if...
Let ∼ be the relation on P(Z) defined by A ∼ B if and only if there is a bijection f : A → B. (a) Prove or disprove: ∼ is reflexive. (b) Prove or disprove: ∼ is irreflexive. (c) Prove or disprove: ∼ is symmetric. (d) Prove or disprove: ∼ is antisymmetric. (e) Prove or disprove: ∼ is transitive. (f) Is ∼ an equivalence relation? A partial order?
Consider the following program written in C syntax: void swap(int a, int b) { int temp;...
Consider the following program written in C syntax: void swap(int a, int b) { int temp; temp = a; a = b; b = temp;} void main() { int value = 2, list[5] = {1, 3, 5, 7, 9}; swap(value, list[0]); swap(list[0], list[1]); swap(value, list[value]); } For each of the following parameter-passing methods, what are all of the values of the variables value and list after each of the three calls to swap? Passed by value Passed by reference Passed...
rite a method with the following header: public static void showGradeDistribution(int a, int b, int c,...
rite a method with the following header: public static void showGradeDistribution(int a, int b, int c, int d, int f) It should print a graph (using asterisks) for each of the letters entered in the reverse order of the parameter list and with a label. In addition, if A and B grades sum is equal or exceeds that of grades C and D and F, the message “Strong class!” should be displayed. For example a method call of: showGradeDistribution(5,7,4,4,3); Would...
Write a method with the following header: public static void showGradeDistribution(int a, int b, int c,...
Write a method with the following header: public static void showGradeDistribution(int a, int b, int c, int d, int f) It should print a graph (using asterisks) for each of the letters entered in the reverse order of the parameter list and with a label. In addition, if A and B grades sum is equal or exceeds that of grades C and D and F, the message “Strong class!” should be displayed. For example a method call of: showGradeDistribution(5,7,4,4,3); Would...
Show that the relation 'a R b if and only if a−b is an even integer defined on the Z of integers is an equivalence relation.
Show that the relation 'a R b if and only if a−b is an even integer defined on the Z of integers is an equivalence relation.
Translate following C# code into MIPS assembly language int recursive(int x) { return (x >= 0xFF)...
Translate following C# code into MIPS assembly language int recursive(int x) { return (x >= 0xFF) ? (recursive(x - 3) + recursive(x - 2)) : ((x >= 0xF) ? recursive(x - 1) + 1 : 1);
Translate the following C code to MIPS assembly. int a = 1; int b = 2;...
Translate the following C code to MIPS assembly. int a = 1; int b = 2; if (a<b)           a=a+1; b = b + a; printf("The value of b is: %d", b); Translate the following C code to MIPS assembly. int a = 2; int b = 2; if (a<b)           a=a+1; else           a=a-1; b = b + a; printf("The value of b is: %d", b);
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT