Seeking new owner for this high-traffic DBAzine.com site.
Tap into the potential of this DBA community to expand your business! Interested? Contact us today. |
|
Transaction Management
Reduce downtime and increase repeat sales by improving end-user experience. Free White Paper
Database Recovery
Feeling the increased demands on data protection and storage requirements? Download Free Report! |
0.01001011
and the path is: x2xx3x21
This implies the sum of the node numbers equals the number of binary digits required to express the numerator. Clearly you are going to run out if you use a normal 32 or 64 bit int. In this sense it has the same problems as chelko's proposal.
For run, I analysed our portfolio hierarchy. We would need 115 bits to represent the numerator for 2344 portfolios.
I was all excited to find this article as I thought it would help me with my large heirarchies - until I saw this post. I did some tests and it seems that the maximum number of elements in the heirarchy cannot exceed 1023 (zero based - using 8 bit numbers). Has anyone come up with a viable solution for this? I would rather not be forced to cap my levels to 20 with no more than 51 elements each. I know that 20x51 is not really efficient in real life applications (or is it?), but I would like the option if I indeed do come across a heirarchy with limits higher than those.