Consider the following database table : Create table test (
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 contain?
Show answerHide answer
Correct answer: (A) 5
Explanation
Attribute 'one' can have 10 values from 1 to 10 and attribute 'two' can have 5 values from 1 to 5. Since 'two' is unique, it cannot repeat, and every tuple must have a distinct value of 'two' from only 5 possibilities. So the relation can have at most 5 tuples.