Computer AwarenessHardIBPS SO IT Officer
Why are B+ trees preferred for database indexes that must also answer range queries such as 'balance between 10,000 and 50,000'?
- A. They store records in hash buckets, so each lookup takes one step
- B. All records sit in linked, ordered leaves, so a range is read leaf by leaf
- C. They keep every record in the root node, so no disk access is needed
- D. They are unbalanced, so recent keys are found faster than old ones
Correct answer: B. All records sit in linked, ordered leaves, so a range is read leaf by leaf
A B+ tree keeps data pointers only in leaves, which are chained in key order; after finding the first key, the scan just follows the leaf links. Hash indexes cannot do ranges.
हिंदी में
डेटाबेस इंडेक्स के लिए B+ ट्री को वरीयता क्यों दी जाती है जिन्हें ‘शेष 10,000 और 50,000 के बीच’ जैसे रेंज क्वेरी भी हल करनी होती हैं?
- A. वे रिकॉर्ड हैश बकेट में रखते हैं, इसलिए प्रत्येक खोज में एक चरण लगता है
- B. सभी रिकॉर्ड जुड़े, क्रमबद्ध पत्तों में रहते हैं, इसलिए रेंज पत्ता-दर-पत्ता पढ़ी जाती है
- C. वे प्रत्येक रिकॉर्ड को रूट नोड में रखते हैं, इसलिए डिस्क एक्सेस की आवश्यकता नहीं
- D. वे असंतुलित होते हैं, इसलिए हाल की कुंजियाँ पुरानी से तेज़ मिलती हैं
उत्तर: B. B+ ट्री डेटा पॉइंटर केवल पत्तों में रखता है, जो कुंजी क्रम में जंजीर की तरह जुड़े होते हैं; पहली कुंजी मिलने के बाद स्कैन केवल पत्ता-लिंकों का अनुसरण करता है। हैश इंडेक्स रेंज नहीं कर सकते।
More Computer Awareness questions
- Two parties who have never met want to agree on a shared secret key over an open network that eavesdroppers can watch. Which method is…
- Assertion (A): Virtual memory lets a program larger than the physical RAM run. Reason (R): Only the pages a program currently needs must…
- An online platform lets individuals list their used phones and furniture and sell them directly to other individuals. Which e-commerce…
- What is 0101 − 0111 in 4-bit two's-complement arithmetic?
- A device's memory occupies the addresses 0x8000 to 0xBFFF, inclusive, with one byte at each address. How much memory is that?
- What is the largest 3-digit hexadecimal number minus the largest 3-digit octal number, in decimal?