Question 33Asked in UGC NET Computer Science, December 2015 (Paper II & III, Selected Questions)

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?
  1. A5
  2. B10
  3. C15
  4. D50
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.

From UGC NET Computer Science PYQ, December 2015 (Paper II & III, Selected Questions)

This is question 33 of UGC NET Computer Science PYQ, December 2015 (Paper II & III, Selected Questions). See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.