...
Database-Management-System
August 29, 2024
Database-Management-System
August 29, 2024
Database-Management-System
August 29, 2024
Database-Management-System
August 29, 2024

Database-Management-System

Question 470
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 contains?
A
5
B
10
C
15
D
50
Question 470 Explanation: 
Attribute “one” can have values:
1,2,3,4,5,6,7,8,9,10
Attribute “two” can have values:
1,2,3,4,5
Since “one” is given as the primary key so it can’t have duplicates or null value. And “two” is given as unique key so it also can’t have null or duplicate values.
So the number of rows in table will depend on the attribute having minimum number of values i.e “two” here. So the number of rows in table “test” are 5.
Correct Answer: A
Question 470 Explanation: 
Attribute “one” can have values:
1,2,3,4,5,6,7,8,9,10
Attribute “two” can have values:
1,2,3,4,5
Since “one” is given as the primary key so it can’t have duplicates or null value. And “two” is given as unique key so it also can’t have null or duplicate values.
So the number of rows in table will depend on the attribute having minimum number of values i.e “two” here. So the number of rows in table “test” are 5.

Leave a Reply

Your email address will not be published. Required fields are marked *