GATE CS : Databases Champion Quiz 5
Attempt now to get your rank among 1307 students!
Question 1
Question 2
Question 3
Question 4
Question 5
Question 6
Question 7
Suppose you are given an empty B+ tree where each node (leaf and internal) can store up to 5 key values.
Suppose instead of splitting a node when it is full, we try to move a value to the left sibling. If there is no left sibling, or the left sibling is full, we split the node.
If there is no left sibling, or the left sibling is full, we split the node. Find the no of nodes in tree after values, 1, 2,….., 9 have been inserted.
Question 8
It is desired to design an object-oriented employee record system for a company. Each employee has a name, unique id and salary. Employees belong to different categories and their salary is determined by their category. The functions get Name, getld and compute salary are required. Given the class hierarchy below, possible locations for these functions are:
(i) getld is implemented in the superclass
(ii) getld is implemented in the subclass
(iii) getName is an abstract function in the superclass
(iv) getName is implemented in the superclass
(v) getName is implemented in the subclass
(vi) getSalary is an abstract function in the superclass
(vii) getSalary is implemented in the superclass
(viii) getSalary is implemented in the subclass
Choose the best design
Question 9
The order of a leaf node in a B+ tree is the maximum number of (value, data record pointer) pairs it can hold. Given that the block size is 1K bytes, data record pointer is 7 bytes long, the value field is 9 bytes long and a block pointer is 6 bytes long, what is the order of the leaf node?
Question 10
(i) After 6 insertions, and
(ii) After all 10 insertions
Do NOT show intermediate stages.
- 1307 attempts
- 19 upvotes
- 40 comments
Tags :
GATE & PSU CSDatabases