2 votes 2 votes In a database file structure, the search key field is 9 bytes long, the block size is 1024 bytes, a record pointer is 7 bytes and a block pointer is 6 bytes. The largest possible order of a leaf node in a B+ tree implementing this file structure is Databases databases indexing made-easy-test-series + – sumit chakraborty asked Jan 26, 2018 • edited Mar 4, 2019 by ajaysoni1924 sumit chakraborty 1.1k views answer comment Share Follow See all 9 Comments See all 9 9 Comments reply Show 6 previous comments ushamya commented May 18, 2019 reply Follow Share Block Size = 1024 bytes Record pointer = 7 bytes Block pointer = 6 bytes Search keys = 9 bytes Then, = $(p-1) * (Record pointer + Key size) + Block Pointer \leq Block Size$ = (p-1) * (7+9) + 6 ≤ 1024 = (p-1) * (16) ≤ 1024 -6 =16p - 16 ≤ 1018 = 16p ≤ 1034 p ≤ 1034/16 = 64.625 = 64 So, the answer should be 64 right?How it is 63? 0 votes 0 votes Satbir commented May 18, 2019 reply Follow Share you are taking wrong formula. For a B+ tree the order of a node is the maximum number of keys that it can contain. for B+ tree if p is the order then in leaf node there are p <key,record pointer> and 1 block pointer. (p)∗(Recordpointer+Keysize)+BlockPointerSize ≤ BlockSize 1 votes 1 votes ushamya commented May 19, 2019 reply Follow Share Okay. Thank you! 0 votes 0 votes Please log in or register to add a comment.
Best answer 4 votes 4 votes solution Rishabh24Mishra answered Jan 26, 2018 • selected Jan 26, 2018 by sumit chakraborty Rishabh24Mishra comment Share Follow See 1 comment See all 1 1 comment reply rajatmyname commented Mar 8, 2019 reply Follow Share Can you please give general formula for both B-tree and B+tree and for leaf as well as non-leaf nodes? 0 votes 0 votes Please log in or register to add a comment.