Database-Management-System
August 29, 2024Database-Management-System
August 29, 2024Database-Management-System
Question 447 |
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?
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?
5 | |
10 | |
15 | |
50 |
Question 447 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.
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 447 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.
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.
Subscribe
Login
0 Comments