Unformatted text preview: ytes, and a block pointer is P = 6 bytes. Each Btree node can have at most p tree pointers, p  1 data pointers, and p  1 search key field values. Hence, (pP)((p1)(PrV)) B (p6)((p1)(79)) 512 (22p) 528 We can choose p to be a large value that satisfies the above inequality, which gives p = 23.
32 E.g.2. (to calculate the no. of blocks and levels a Btree) Suppose the search field of the above example is a nonordering key field and we construct a Btree on this field. Assume that each node of the Btree is 69% full. Then, p0.69 = 230.69 16 pointers per node, 15 search key field values per node, the average fanout fo = 16, and others values is as follows:
Root Level 1: Level 2: Level 3: 1 node 16 nodes 256 nodes 4096 nodes 15 entries 240 entries=15x16 3840 entries 61,440 entries 16 pointers 256 pointers 4096 pointers Hence, a twolevel Btree holds up to 3840 + 240 + 15 = 4095 entries on the average; and a threelevel Btree holds up to 65,535 entries on the average.
33 E.g.3. (to calculate the order of p of a B+tree) Suppose the values V, B, Pr and P are the same as Example 1. An internal node of the B+tree can have up to p tree pointers, and p  1 search key field values. Hence, (pP)((p1)V) B, (p6)((p1)9) 512, (15p) 521. We can choose p to be a large value that satisfies the above inequality, which gives p = 34. In the same manner, (Pleaf(PrV))P B, (Pleaf(79))6 512, (16Pleaf) 506. I...
View
Full Document
 Spring '09
 Denny
 hash function, records

Click to edit the document details