• edited by
5,302 views
2 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$

1 Answer

1 1 vote
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:
Position:
Show:

Related questions

5 5 votes
4 4 answers
7.8k
7.8k views
go_editor asked Aug 11, 2016
7,777 views
Consider the following three SQL queries (Assume the data in the people table):Select Name from people where $\text{Age}>21$;Select Name from people where $\text{Height}>...
2 2 votes
2 answers 2 answers
8.9k
8.9k views
go_editor asked Aug 11, 2016
8,886 views
Suppose ORACLE relation $R(A,B)$ currently has tuples $\{(1,2), (1,3), (3,4)\}$ and relation $S(B,C)$ currently has $\{(2,5), (4,6), (7,8)\}$.Consider the following two S...
3 3 votes
2 answers 2 answers
5.3k
5.3k views
go_editor asked Aug 11, 2016
5,326 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...
1 1 vote
1 1 answer
5.1k
5.1k views
go_editor asked Aug 11, 2016
5,057 views
Which of the following statements regarding the features of the object-oriented approach to databases are true?The ability to develop more realistic models of the real wo...