A directory of Objective Type Questions covering all the Computer Science subjects. Here you can access and discuss Multiple choice questions and answers for various compitative exams and interviews.

91. Given the following input (4322, 1334, 1471, 9679, 1989, 6171, 6173, 4199) and the hash function x mod 10, which of the following statements are true?

1. 9679, 1989, 4199 hash to the same value
2. 1471, 6171 hash to the same value
3. All elements hash to the same value
4. Each element hashes to a different value
a. 1 only
b. 2 only
c. 1 and 2 only
d. 3 or 4
View Answer Report Discuss Too Difficult! Search Google
Answer: (c).1 and 2 only

92. Let R1 (A, B, C) and R2 (D, E) be two relation schema, where the primary keys are shown underlined, and let C be a foreign key in R1 referring to R2. Suppose there is no violation of the above referential integrity constraint in the corresponding relation instances r1 and r2. Which one of the following relational algebra expressions would necessarily produce an empty relation ?
a. 1
b. 2
c. 3
d. 4
View Answer Report Discuss Too Difficult!
Answer: (b).2

93. Consider the relation Student (name, sex, marks), where the primary key is name, pertaining to students in a class that has at least one boy and one girl. What does the following relational algebra expression produce?
(Note: r is the rename operator). The condition in join is "(sex = female ^ x = male ^ marks ≤ m)"
relational algebra expression
a. names of girl students with the highest marks
b. names of girl students with more marks than some boy student
c. names of girl students with marks not less than some boy students4)
d. names of girl students with more marks than all the boy students
View Answer Report Discuss Too Difficult! Search Google
Answer: (d).names of girl students with more marks than all the boy students

Page 10 of 10