Abstract:
A database system and method for adjusting a value within a database configured as a multidimensional aggregation tree (MAT) having a plurality of leaves. A value associated with a vertex within the MAT is modified, propagated down toward the leaves of the MAT and reconciled up through the tree from the leaf to determine if there is a locked vertex. If there is a locked vertex, a value is adjusted down toward the leaves from the locked vertex, wherein adjusting down includes computing a value for a leaf associated with the locked vertex.

Description:
FIELD OF THE INVENTION 
     The present invention relates generally to data analysis, and more particularly to a system and method for manipulating values within multi-dimensional databases. 
     BACKGROUND INFORMATION 
     Businesses generally can be modeled as a set of hierarchies. For example, their market might be divided into multiple regions; each region might be further divided into districts. The districts may include two or more cities. Each city might be further subdivided into a number of sales people. 
     Products are more obviously divided. The products sold by a company might include soft drinks and snacks. The snacks might be divided into potato chips, pretzels, etc.; the potato chips might include ridged potato chips and non-ridged potato chips. 
     To be useful, decision support systems must support analysis based not only on historical data but also on projections for future activities. For instance, marketing may project sales for the next three months. These figures may then be introduced into a model used to tune manufacturing output over that period of time. 
     Business users want to be able make forecasts anywhere within the context of their business hierarchies. The business may want sales people entering projected sales; it may want district managers reviewing and changing that data at the district product group level; and it may want financial people reviewing and modifying data across a region, across multiple regions, or across the country. 
     Multidimensional analysis allows users to select, summarize, calculate, format and report by dimensions and by attributes within dimensions. It can be used to support virtually any time-series decision support application, including reporting, analysis, forecasting and budgeting. 
     Typically, changes made at any level must propagate up and down the hierarchies dynamically so that anyone who wants to do some analysis can make a change and look to see what the impact of that change was. In addition to those changes, the users might need to lock some values. For example, if there were capacity limits one might want to lock a value at the capacity limit so that nothing went beyond that. 
     To date, much of this analysis has been weak and performed using multidimensional databases having fixed hierarchical positions. What is needed is a system and method for adjusting values within multiple drillable hierarchies, while allowing both dynamic aggregation and disaggregation, with locked values, within an OLAP framework. 
     SUMMARY OF THE INVENTION 
     The present invention is a system and method of adjusting a value within a database configured as a multidimensional aggregation tree (MAT) having a plurality of leaves. A value associated with a vertex within the MAT is modified, propagated down toward the leaves of the MAT and reconciled up through the tree from the leaf to determine if there is a locked vertex. If there is a locked vertex, a value is adjusted down toward the leaves from the locked vertex, wherein adjusting down includes computing a value for a leaf associated with the locked vertex. 
     According to another aspect of the present invention, a system and method of adjusting a value within a database configured as a multidimensional aggregation tree (MAT) having a plurality of leaves includes modifying a value associated with a vertex, adjusting down toward the leaves of the MAT, wherein adjusting down includes computing a value for a leaf associated with the modified vertex and reconciling up through the tree from the leaf to determine if there is a locked vertex. If there is a locked vertex, the method includes adjusting down toward the leaves from the locked vertex, wherein adjusting down includes computing a value for a leaf associated with the locked vertex, and propagating the values computed for the leaves up the tree. 
     According to yet another aspect of the present invention, a system and method of reporting data stored within a data warehouse includes providing a computer with server and a memory device, storing a database in the memory device, wherein the database includes a plurality of data entries, extracting a subset of data entries from the database, storing the subset of data entries on the server, modifying the data entries stored on the server in response to user commands, propagating the modifications in order to form a multidimensional aggregation tree (MAT), reading data from the modified data entries stored on the server and displaying the data to the user. 
     According to yet another aspect of the present invention, a database system includes a data warehouse and a computer connected to the data warehouse. The computer adjusts a value associated with a first vertex within a multidimensional aggregation tree (MAT), wherein the MAT includes a plurality of leaves attached to vertices. Adjusting includes adjusting down from the first vertex toward the leaves of the MAT, wherein adjusting down includes computing a value for a leaf associated with the vertex, reconciling up through the tree from the leaf to determine if there is a locked vertex and if there is a locked vertex, adjusting down toward the leaves from the locked vertex, wherein adjusting down includes computing a value for a leaf associated with the locked vertex. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     In the drawings, where like numerals refer to like components throughout the several views, 
     FIG. 1 shows a database system according to the present invention; 
     FIG. 2 shows a method of adjusting a value within a multidimensional aggregation tree; 
     FIG. 3 shows a pair of aggregation trees; 
     FIG. 4 shows a 2-MAT formed from the aggregation trees of FIG. 3; 
     FIG. 5 shows a lattice resulting from modification of a value associated with one of the vertices of FIG. 4; and 
     FIG. 6 shows a 2-MAT formed by applying the methods of the present invention. 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     In the following detailed description of the preferred embodiments, reference is made to the accompanying drawings which form a part hereof, and in which is shown by way of illustration specific embodiments in which the invention may be practiced. It is to be understood that other embodiments may be utilized and structural changes may be made without departing from the scope of the present invention. 
     Some portions of the detailed descriptions which follow are presented in terms of algorithms and symbolic representations of operations on data bits within a computer memory. These algorithmic descriptions and representations are the ways used by those skilled in the data processing arts to most effectively convey the substance of their work to others skilled in the art. An algorithm is here, and generally, conceived to be a self-consistent sequence of steps leading to a desired result. The steps are those requiring physical manipulations of physical quantities. Usually, though not necessarily, these quantities take the form of electrical or magnetic signals capable of being stored, transferred, combined, compared, and otherwise manipulated. It has proven convenient at times, principally for reasons of common usage, to refer to these signals as bits, values, elements, symbols, characters, terms, numbers, or the like. It should be borne in mind, however, that all of these and similar terms are to be associated with the appropriate physical quantities and are merely convenient labels applied to these quantities. Unless specifically stated otherwise as apparent from the following discussions, terms such as “processing” or “computing” or “calculating” or “determining” or “displaying” or the like, refer to the action and processes of a computer system, or similar computing device, that manipulates and transforms data represented as physical (e.g., electronic) quantities within the computer system&#39;s registers and memories into other data similarly represented as physical quantities within the computer system memories or registers or other such information storage, transmission or display devices. 
     A database system  10  is shown in FIG.  1 . In the system of FIG. 1, a data warehouse  12  stores data pertaining to a business. A computer  14  communicates with data warehouse  12  across a communications link  16  (such as a network or telephone line) in order to analyze the data stored in data warehouse  12 , or to manipulate that data for reporting, forecasting or budgeting. 
     In the embodiment shown in FIG. 1, a subset of data is extracted from data warehouse  12  and stored as cached data  18 , where it can be used to generate reports, or for analysis and forecasting before being saved out to data warehouse  12 . 
     In database systems, an aggregation tree is a tree with the following properties: 
     1) A leaf node contains some data; and 
     2) A non-leaf node contains a value based on an invertible function of the data of its children. A locked node is a node in an aggregation tree whose value has been constrained so that it may not be modified. (It is also called a lock.) 
     A multidimensional Aggregation Tree (MAT) is the Cartesian product of aggregation trees. For example, a k-dimensional MAT (k-MAT) is the Cartesian product of k aggregation trees. A MAT forms a lattice. 
     When the value associated with a vertex in a Multidimensional Aggregation Tree is changed, the tree is no longer a MAT. To become a MAT again, the values associated with a number of related vertices must be modified. The problem is to quickly, efficiently, and with small asymptotic complexity, change only those vertices (nodes) whose values must be modified so that the tree once again becomes a Multidimensional Aggregation Tree. This must be done while leaving the value of the modified vertex alone. In one embodiment, any node (except a locked node) is a candidate for modification. This transformation must occur in any tree in the presence of locks. 
     To accomplish this, in one embodiment, an algorithm executes in computer  14  to propagate a value associated with a vertex downward to its children while maintaining the value at the vertex. In addition, it is possible that a change to the value of a vertex will cause the tree to enter a state in which it can no longer become a MAT. In one embodiment, the algorithm detects these situations by finding itself in an inconsistent state from which it cannot recover. An example is if the value of a non-negative vertex must become negative. In one embodiment, the system recovers by reinstating the initial values and returning an error status. 
     One method of adjusting a value within a multidimensional aggregation tree to accomplish this is shown in FIG.  2 . In the flowchart of FIG. 2, the above problem is resolved in three phases. The first phase is called AdjustDown. The second phase is called ReconcileUp. The final phase is called AdjustUp. 
     AdjustDown recursively adjusts down (toward the leaves of) the k-MAT from one vertex to another. When it reaches a leaf in any dimension, it moves to the next dimension and continues from there, passing its children information about how to correctly modify its value. 
     When AdjustDown reaches a leaf of the k-MAT, it computes the value of the leaf node, including taking care of any rounding issues. It then adds the modified vertex to the list of changed vertices. 
     In the lattice making up the k-MAT, there may be many paths between two vertices. If there is a lock on any path between an ancestor and its descendent, the descendent must be changed. AdjustDown detects these locks and only adjusts the appropriate descendants. 
     The ReconcileUp phase ensures that all upward adjustments can be resolved through existing locks. ReconcileUp walks up the tree recursively through the k dimensions and the vertices. If it encounters a lock, it re-invokes AdjustDown, this time using the siblings of the locked vertex with values adjusted based on the lock. When AdjustDown completes, the portion of the graph processed by ReconcileUp need not be recomputed. ReconcileUp continues its recursive walk up the tree and across the dimensions. 
     If ReconcileUp encounters a non-locked node, it computes the new correct value to ensure it is possible (it is possible that the new value may violate some rule based on the defined operation.) If it is possible, the recursion continues. 
     AdjustUp takes the final modifications as computed by AdjustDown and ReconcileUp and applies them to the vertices in the graph. It works from leaf-nodes toward the root, working with a single change at a time. It walks up the k dimensions and the vertices of the graph recursively, visiting every parent node in a non-locked path to the root and updating its value. 
     An editable multidimensional OLAP structure with k drillable dimensions and locked values can be represented graphically. The graph that represents the structure is a k-MAT. Changing values within this structure (for example changing the expected sales of Sprockets in Boston in February by Penelope) causes the resulting tree to no longer consistently represent the hierarchical nature of the data; in other words, the resulting tree is no longer a MAT. 
     Computer  14  can be used to return the OLAP structure to a state in which the hierarchical nature of the data is accurately represented. 
     The above method of adjusting a value within a multidimensional aggregation tree will be applied to a 2-MAT. One such 2-MAT is shown in FIG.  4 . The 2-MAT of FIG. 4 is formed from the pair of aggregation trees (Product and Market) shown in FIG.  3 . The Product aggregation tree includes a product P 1  with two subproducts P 2  and P 3 . The Market aggregation tree includes three levels of market identification (M 1 :M 7 ). 
     The 2-MAT of FIG. 4 includes a locked vertex P 1 M 2 . 
     In the example shown, vertex P 1 M 4  is modified from its initial value of 25 to a new value of 40 (see FIG.  5 ). As noted above, when the value associated with a vertex in a Multidimensional Aggregation Tree is changed, the tree is no longer a MAT. To become a MAT again, the values associated with a number of related vertices must be modified. 
     In order to return this graph to a 2-MAT, the values associated with most of the vertices must be modified (using the AdjustDown, ReconcileUp, and AdjustUp modifications described above) to yield the graph shown in FIG.  6 . (Note: There is rarely a single unique set of modifications that will satisfy the 2-MAT invariant.) 
     The system and method for adjusting a value within a multidimensional aggregation tree described above allows users to perform forecasting, analysis, budgeting and reporting real time within a spreadsheet looking application. An algorithm executing in computer  14  propagates a value associated with a vertex downward to its children while maintaining the value at the vertex. In one embodiment, only those vertices whose values must be modified so that the tree once again becomes a Multidimensional Aggregation Tree are changed. This is done while leaving the value of the modified vertex alone and in the presence of locks. The above described method can be implemented in program code stored on computer readable medium  20  and readable by computer  14 . 
     In the above discussion and in the attached appendices, the term “computer” is defined to include any digital or analog data processing unit. Examples include any personal computer, workstation, set top box, mainframe, server, supercomputer, laptop or personal digital assistant capable of embodying the inventions described herein. 
     Examples of articles comprising computer readable media are floppy disks, hard drives, CD-ROM or DVD media or any other read-write or read-only memory device. Although specific embodiments have been illustrated and described herein, it will be appreciated by those of ordinary skill in the art that any arrangement which is calculated to achieve the same purpose may be substituted for the specific embodiment shown. This application is intended to cover any adaptations or variations of the present invention. Therefore, it is intended that this invention be limited only by the claims and the equivalents thereof.