Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

Share this Page URL

5.2 Computing the Spread to Use > 5.2.2 Divisor Parameter - Pg. 130

118 CHAPTER 5: FREQUENT INSERTION TREES When we insert `Joseph', this node only has a range of seven positions, and attempting to divide that range into tenths causes a failure. We need to consider other ways of determining the divisors and what to do if we need to reorganize the tree because we have nodes where (rgt - lft) = 1 and we wish to insert a new node under them. 5.2.1 Varying the Spread If you know something about the general shape of the tree--if it is shal- low and wide or deep and narrow--you can replace the constant divisor with a parameter in the procedure, a formula, or a table lookup subquery expression. 5.2.2 Divisor Parameter This is a trivial change to the original procedure: CREATE PROCEDURE InsertNewGuy (IN parent CHAR(10), IN new_guy CHAR(10),