edited by
3,946 views
2 votes
2 votes

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. $5$
  2. $10$
  3. $15$
  4. $50$
edited by

1 Answer

1 votes
1 votes
B. 10 should be the correct answer.

Reason : As one is primary key and it varies from 1 to 10 , So using one atmost 10 tuples can be there. When we take two into consideration it varies from 1 to 5 and is unique, which implies it can be NULL. Hence the number of tuples will be 10, with two being NULL in five of them.

CORRECT ME IF I AM WRONG.
Answer:

Related questions

2 votes
2 votes
2 answers
3
go_editor asked Aug 11, 2016
4,169 views
Consider the following three tables $R, S$ and $T.$ In this question, all the join operations are natural joins $(\bowtie )$. $(\pi )$ is the projection operation of a re...