Consider the following database table:
Create table test(
one integer,
two integer,
primary key(one),
unique(two),
check(one >= 1 and <= 10),
check(two >= 1 and <= 5)
);
How many data records/tuples atmost can this table containt?
(A) 5
(B) 10
(C) 15
(D) 50
Answer: (A)
Explanation: check(one >= 1 and <= 10), check(two >= 1 and <= 5).
Here second constraint will decide the no of tuples(record). Or we can say that the common condition will dominate.
i.e. check(two >= 1 and <= 5) 5 tuples.
So, option (A) is correct.
Quiz of this Question