US 20070156634 A1 Abstract This document discloses a software method, data structure, apparatus, and article of manufacture that dynamically and symmetrically clusters multidimensional data onto linear storage mediums. The disclosed embodiments provide methods to store, maintain, and retrieve multidimensional space based on dimensions and possibly dimension groups of two or more dimensions. These methods dynamically access, add, update, or remove dimension key values from any dimension or any group of dimensions while simultaneously enforcing the symmetry from all combinations of all dimensions and dimension groups. Further, this document discloses data structures herein that map the multidimensional data to one-dimensional storage mediums.
Claims(19) 1. A method for organizing and mapping multidimensional data onto one-dimensional storage mediums, the multidimensional data having a number of dimensions and possibly a number of dimension groups of two or more dimensions and a number of multidimensional combinations each representing a multidimensional data element, such that each said multidimensional combination is identifiable by said number of dimensions and possibly said number of dimension groups, and the method comprising:
dynamically clustering the multidimensional data so that each said dimension or dimension group has symmetric or equal access to the clustering process without any said dimension or dimension group having priority over other said dimensions or said dimension groups; and storing, maintaining, and retrieving the multidimensional data on said one-dimensional storage mediums. 2. The method of 3. The method of 4. The method of 5. The method of 6. The method of 7. The method of 8. The method of 9. The method of 10. The method of 11. The method of 12. The method of 13. The method of 14. The method of 15. The method of 16. The method of 17. The method of 18. The method of 19. The method of Description 1. Technical Field The present invention relates to OLAP (On-Line Analytical Processing) and data warehouse applications. Specifically, it relates to data structures that map multidimensional data onto linear storage mediums. 2. Description of Prior Art Data Warehouse and OLAP applications, have highlighted the need for fast and efficient methods to dynamically and symmetrically store, maintain, and retrieve multidimensional data. Ultimately, such methods would simultaneously provide real-time update and query capabilities from any combination of participating dimensions or dimension groups. To date, other multidimensional storage and retrieval methods have not been able to provide an algorithm and data structure that simultaneously delivers dynamic maintenance capabilities, efficient storage and operation, and symmetric clustering from any combination of participating dimensions or groups of dimensions. Hypercubes are the classic commercial approach. Hypercubes store each possible combination of values of all participating dimensions in their data structures. This approach is very inefficient in space usage, I/O (Input/Output) operations, and computer processing cycles. Hypercubes are also not symmetric. The position or column number of a dimension in a Hypercube along with dimension cardinalities determine the dimension's degree of clustering in the data. A dimension with position 0 in a Hypercube with a high cardinality might dominate all clustering in the data while a dimension with position N−1 where N is the number of dimensions in the Hypercube and a low cardinality might not participate in the clustering of the data at all. Compression assists Hypercubes with storage efficiency but further skews symmetry amongst dimensions. Finally, Hypercubes are not dynamic. The Hypercube data structure allocates a predetermined number of cells and requires full reorganization to alter this predetermined number of cells. Conventional grid or tree approaches with multidimensional clustering such as grid files, hB-trees, MDB trees, R-trees, and the like have some success in symmetrically clustering data but fail to dynamically and effectively maintain symmetry and are not efficient in terms of computational complexity, I/O, computer processing cycles, memory, disk space, concurrency management, predictability, and recoverability. More recently, relational database vendors have adopted bit mapped indexes. These data structures do not truly provide symmetry. They typically provide one bit mapped index for each participating dimension. These indexes are usually compressed and are very small in terms of disk storage space. Access is available from any combination of dimensions. But, the technique does nothing to cluster the underlying data. As a result, bit mapped indexes do not enforce symmetry. If dimension A determines the sort order or clustering of the multidimensional data and dimension A has a high enough cardinality so that all multidimensional elements associated with each key value of dimension A require no more than one complete database block, then despite all bit mapped indexes any dimension other than A will necessitate a full scan of every block in the multidimensional data. Less dynamic data structures can more easily provide true symmetry. U.S. Pat. No. 6,003,036 details one such example. This technique uses interval partitioning to ensure that each dimension or dimension group of two or more dimensions participates equally in the partitioning process and successfully stores multidimensional data with one or more dimensions or dimension groups. It is also efficient in terms of complexity, computer processing time, I/O, recoverability, concurrency, and disk space. However, it does not allow unlimited updates to partitions without complete data reorganization when the data exceeds predetermined thresholds. Z-ordering and other multidimensional mapping curves are relatively new and promising approaches to multidimensional data clustering. They involve interleaving of bits from dimension key values from predetermined ranges of numbers in order to provide symmetry for each participating dimension. In the form of Universal or UB-Trees, these techniques take advantage of already well established and proven B-trees or their derivatives are therefore very efficient. They fall short of true symmetry enforcement, however. With Z-ordering, symmetry depends on the number of bits in each dimension key value. If dimension A has 256 distinct members and is able to represent them all with 8 bits while dimension B has 100 distinct members but requires 16 bits to represent them all, then dimension A might dominate the clustering process and starve dimension B in its clustering thus compromising symmetry. Hilbert Orderings and Gray Coding are attempts to improve this technique for some multidimensional applications but still fall short of controlling symmetry in OLAP applications because they still must predetermine the number of bits for each participating dimension. Z-ordering and its derivatives are also not truly dynamic since they must set or predetermine upper ranges on each dimension. With Z-ordering, Hilbert Orderings, and Gray Coding a tradeoff exists between symmetry and the upper limit of each dimension or between dynamic operation and symmetry. U.S. Pat. No. 6,460,026 uses the technique of multidimensional data ordering or prioritizing participating sets of dimensions hierarchically and uses these priorities in the overall ordering or clustering process. These dimension sets are the same as dimension groups or groups of keys in U.S. Pat. No. 6,003,036. The overall technique in U.S. Pat. No. 6,460,026 is more dynamic than the technique in U.S. Pat. No. 6,003,036 but does not enforce symmetry as well as the technique in U.S. Pat. No. 6,003,036. In addition, the technique in U.S. Pat. No. 6,460,026 is not fully dynamic. In regard to symmetry, when the technique in U.S. Pat. No. 6,460,026 uses dimensional priorities for simple or multiple orderings, the first few dimensions in the orderings have the ability to completely dominate the clustering process depending on cardinality. In general, the clustering factor of each dimension participating in a non-symmetric ordering depends on its position or priority in the over all ordering. Despite the fact that this method also works with Z-ordering, Hilbert Orderings, and Gray Coding, none of these techniques completely correct potential symmetry flaws. For example, if multidimensional data ordering uses Z-ordering and defines a dimension group or hierarchy of dimensions G containing dimensions A, B, and C requiring a large number of bits for each dimension and another dimension H such that H clusters the data with a small number of bits, this technique is not likely to provide symmetric access to the multidimensional data. The technique in U.S. Pat. No. 6,460,026 is unable to enforce true symmetry but rather is susceptible to data content because of Z-ordering or other static bit interleaving techniques as mentioned previously and the various ordering priorities that U.S. Pat. No. 6,460,026 discloses. The technique in U.S. Pat. No. 6,460,026 also has symmetry problems relating to hierarchies or multiple levels in dimension groups. Multidimensional data ordering must designate a predetermined number of bits for all children of all parents in a hierarchy because of the rules of Z-ordering and the other static bit interleaving techniques. Different parents will typically have different numbers of children and will therefore need different numbers of bits. Extra, unnecessary bits have potential to adversely affect symmetry. These flaws or weaknesses in U.S. Pat. No. 6,460,026 are crucial since the primary rationale for multidimensional data structures is to provide symmetry amongst participating dimensions or dimension groups. The technique in U.S. Pat. No. 6,460,026 is also not dynamic. When the technique employs Z-ordering, Hilbert Orderings, or Gray Coding, it must predetermine the number of bits for each dimension and each level within a dimension group. The predetermined number of bits for each level in a dimension group must be the maximum for all parents on the previous level in the entirety of the data. If the number of members or elements in the dimension increases beyond what the predetermined number of bits can represent, then the entire data structure requires reorganization before it can grow beyond the predetermined limits for each dimension or level within a dimension group. If the predetermined limit is set too high for some dimensions or levels within dimension groups, then the algorithm in U.S. Pat. No. 6,460,026 might not enforce symmetry correctly because of the unused bits or padding. In summary U.S. Pat. No. 6,460,026 can not dynamically maintain symmetry. The invention contained herein efficiently maintains symmetry as well or better than U.S. Pat. No. 6,460,026 and without predetermined limits on dimensions that prevent dynamic operation. Unlike the multidimensional data ordering technique in U.S. Pat. No. 6,460,026, the invention disclosed herein does not require a tradeoff between dynamic operation and symmetry. Objects and advantages that follow do not limit the scope of the present invention in any way. The claims alone should determine the scope of the present invention. As the below embodiments detail, the present invention provides an efficient and dynamic as well as symmetric mapping of multidimensional data unto linear storage mediums. One object and advantage of MDDC allows OLAP applications to insert, delete, and update data from any dimension or any dimension within a dimension group while dynamically controlling symmetry without regard to native data content or degree of sparseness. A second object and advantage of MDDC ensures that queries can take equal advantage of clustering regardless of which combinations of participating dimensions or dimension groups they constrain. A third object and advantage of MDDC allows queries to take advantage of star-joins without generating all combinations of dimension values or without generating a Cartesian join of dimension values that the queries specify. An additional object and advantage of MDDC allows it to precisely control the amount of packing on each data block from less than 50 percent to within one record of 100 percent full while referencing these data blocks with a non-dense index that only has one index entry per data block. Another object and advantage of MDDC allows it to evenly distribute or stripe blocks or records of multidimensional data across multiple computer storage mediums or processing platforms such as multiple disk drives and multiple computer systems without compromising its dynamic and efficient symmetry enforcement. Another object and advantage of MDDC allows dynamic and unlimited growth in dimension or dimension group keys while controlling the number of bits or length of dimension keys in multidimensional data structures to further increase dynamic symmetry. Yet another object and advantage of MDDC is that it employs a data structure that maps the multidimensional data to a one dimensional linear data structure and corresponding storage medium without compromising its efficiency, dynamic operation, and symmetry enforcement. Detailed descriptions, example embodiments, and drawing figures below do not limit the scope of the present invention in any way. The claims alone should determine the scope of the present invention. Overview MDDC uses uniform bit distribution with dynamic bit interleaving to efficiently and dynamically control symmetry. First MDDC uses uniform bit distribution for all dimensions and dimension groups in conjunction with dynamic bit interleaving in lieu of Z-ordering, Hilbert Orderings, Gray Coding, or other bit interleaving techniques. MDDC handles 0 with this technique by simply storing the 0 in a byte where all 8 bits are 0. This allows MDDC to determine the exact length of a variable length bit string even though the storage format in Next MDDC uses dynamic bit interleaving to integrate all participating dimensions. Uniform bit distribution attempts to minimize the number of bits that each dimension key requires to uniquely identify itself amongst other dimension keys from the same dimension or dimension group. Uniform bit distribution also attempts to evenly distribute all dimension keys across a set of minimum length bit dimension keys. Ideally, 5 bits would represent 32 dimension keys and 10 bits would represent 1024 dimension keys. Dynamic bit interleaving then interleaves or splices these bits to form one virtual key. For example, if a dimension only contains two unique keys, this method attempts to assign one key to bit value 0 and the other key to bit value 1. This method then is able to cluster or partition all the multidimensional data into two partitions with only 1 bit, one partition representing each dimension key and bit value. According to the convention of bit interleaving, MDDC alternates between bits from each dimension or dimension group to completely cluster or partition the multidimensional data. Ideally, each dimension divides the multidimensional data exactly in half with each bit. Consequently, under optimal circumstances, MDDC requires a minimum and equal number of bits from each dimension or dimension group to fully cluster or partition the multidimensional data. Therefore in summary, MDDC uses uniform bit distribution and dynamical bit interleaving to dynamically and efficiently maintain symmetry amongst all combinations of dimensions and dimension groups. Operation In this embodiment, MDDC merely substitutes uniform bit distribution for dimensions and dimension groups in data structures such as but not limited to B-trees in For queries, MDDC either searches the data structure with full or partial multidimensional keys. For full multidimensional keys, MDDC searches for multidimensional keys in the data structure just as it would for one-dimension data structures. For partial multidimensional keys, MDDC replaces missing bits in the bit interleaving with all combinations of 0s and 1s as appropriate and in effect searches for all possible combinations of full multidimensional keys. MDDC is able to order these multiple key searches the same way as the order or the data structure thereby increasing efficiency by eliminating the need to search for some keys or at least eliminating the need for I/O operations for some keys. This is especially advantageous if dimension source tables maintain themselves in uniform bit distribution key order since no sorting is required prior to searching the multidimensional data. Finally, MDDC is able to efficiently search for multiple partial keys from several dimension groups and dimensions in the same way. MDDC is able to perform a star-join without a pre-computed Cartesian product of the dimensions and dimension groups. MDDC is therefore able to eliminate much of the expensive I/O and processing resources associated with a full Cartesian join on sparsely populated data structures. This is significant since it allows the database optimizer to always choose a star-join for MDDC data structures without performance penalties. With the exceptions of how MDDC determines key values and how it does comparisons, MDDC inserts, updates, and deletes data in the usual way for host data structures. Inserts, deletes, and updates are almost identical to their single dimension counterparts. For inserts, it uses the full multidimensional key of the records that it will insert into the multidimensional data to find the correct position in the data structure and then updates the data structure to reflect the new insertions. For deletes, MDDC uses the query criteria to search for the deletion candidates and if it finds them updates the data structure to reflect the removals. Similarly for updates, MDDC uses the query criteria to find the update candidates, updates them, and updates the data structure to reflect the changes if necessary. A practitioner in the art will appreciate the fact that MDDC can use a non-dense index and therefore is able to better retain the higher level index portions of its data structure in the RAM and cache in computer medium hierarchies such as those in As the descriptions that follow illustrate, MDDC provides a more efficient, dynamic, and symmetric software method, data structure, apparatus, and article of manufacture for clustering multidimensional data. MDDC is a very flexible and robust technique. But these embodiments only present examples and do not in any way limit the scope of the present invention. The claims alone should be used to determine the scope of the present invention. In general MDDC uses variable length bit strings. MDDC can assign new integer key values for each new dimension key sequentially. MDDC can use indexes for each dimension to determine the next sequential key for each dimension. Additionally, such indexes will work for dimensions within dimension groups. With this technique, MDDC can dynamically assign dimension keys within dimension groups in the context of parent keys to decrease the overall length of dimension key groups and improve symmetry. These indexes are only used for dimensions. MDDC does not require them for the much larger multidimensional data structures. MDDC reverses the significant order of dimension keys from MSB to LSB to keys in LSB to MSB and only uses the number of bits that it needs to uniquely identify each key. This results in improved symmetry and unlimited growth for each dimension. This technique also allows the dimension primary keys to be in the same order as the multidimensional data cluster with regard to each dimension and thereby increases query efficiency. Variable length LSB to MSB keys can also use key recycling or reuse as internal record identifiers in lieu of external primary keys to decrease average bit string lengths. As the previous paragraph suggests, MDDC can use ordered search algorithms such as the “Tetris-Algorithm” or other sorted searches to improve the efficiency of queries. MDDC is capable to pre-sorting dimension key values and storing the primary keys for the dimensions in this optimal order so that MDDC can further improve query efficiency for the “Tetris-Algorithm” and other sorted search algorithms. MDDC can also use a variety of other search algorithms including but not limited to single point searches, star-joins without Cartesian products, and independent dimension searches that MDDC combines with dynamic bit maps. All these examples and combinations of examples represent distinct embodiments that work in combination with other embodiments. One of the most important results of MDDC is that it clusters multidimensional data onto data blocks suitable for storage on linear storage mediums and standard data structures. B-trees as MDDC can store these data blocks on a variety of hardware platforms but is not limited to the examples that these embodiments enumerate. MDDC can store data blocks or records on a single computer with one or more processors, one or more processor caches, RAM, and one or more auxiliary memory devices as MDDC can store the multidimensional data in compressed format to reduce the overall size of the data structure. In addition, MDDC can initialize all data blocks to be within one record of 100 percent capacity. These embodiments work in combination with all other embodiments. In another example embodiment, MDDC clusters the multidimensional data and the database defines additional indexes on other dimensions or attributes in the multidimensional data that are not participating in the cluster. The indexes either reference primary keys for the multidimensional data or block identifiers. When the indexes use block identifiers, the database uses dynamic bit maps to combine index restrictions with MDDC restrictions since MDDC is non-dense and also uses block identifiers to address data. These embodiments work in combination with all other embodiments. In summary, the above embodiments for the present invention describe example software implementations for many specific situations and demonstrate the wide applicability of the present invention but do not limit the present invention in any way. The claims of the present invention alone should determine its scope. U.S. Patent Documents
- Markl, V., et al., “Improving OLAP Performance by Multidimensional Hierarchical Clustering”, Proceedings of Ideas '99 in Montreal Canada, IEEE, 1999.
- Markl, V., et al., “The Tetris-Algorithm for Multidimensional Sorted Reading from UB-Trees”, Internal Report, FORWISS München, 1997.,
- Bertino, E., et al., “Indexing Technique for Queries on Nested Objects”, IEEE Transactions on Knowledge and Data Engineering, pp. 196-214, 1989.
Referenced by
Classifications
Rotate |