Published at 2003-11-27 22:08:59
Due to the layout of data in a multi-dimensional database, certain views of the data can be generated at ease by a multi-dimensional system. In fact, viewing a multi-dimensional view (or slice) is similar to viewing data on a spreadsheet table. To get a better understanding of this, consider the example given previously in Figure 3, with a 3x3x3 array containing student exam results.
If we imagine a slice of a database being a view of one of the faces of the hypercube, then for this example we have 6 available slices. In fact, the number of possible slices increases exponentially with the number of dimensions (Kenan), so a two-dimensional array has two views, a three-dimensional has six, a four-dimensional has 24 and a five has 120 views.
The six available views for our student database in Figure 3 are:
The mechanism by which a view is selected is often referred to as data rotation. For example, if we can imagine that we are looking at the Student Name by Exam face (view) of the cube in Figure 3, now if we rotate that view 90 degrees clockwise around the y-axis (i.e. the Student Name dimension), then we are now looking at a different view of the database, namely Student Name by Semester. In a multi-dimensional database system, it is possible to view the data from any such rotation.
A well-designed multi-dimensional database allows users to range in on particular subsets of the database, to their specification. For example, an example of a range might be an array containing all results for semesters 1 and 2 for the subjects Databases and Programming. Ranging is comparable to complex queries in a rational system, and is often referred to as data dicing because it is scoped down to a subset of the overall array.
The performance of ranging in a multi-dimensional system is once again greater than the relational equivalent, as few overheads are incurred in the multi-dimensional system to obtain the required view of the data.
As previously discussed, users may want to view data from several perspectives, although sometimes these views may be very similar. For example, a user might want to view exam results for a class, or the entire school for a particular year. There is a natural relationship between this entities, it is simply a matter of scale that separates them apart. Multi-dimensional databases are designed with these natural relationships in mind. Although it would be possible to create a separate dimension for Class and School, a more powerful solution is to create two related aggregates on the same dimension, which can then be used as part of the same dimension.
Therefore, as all examples of a Class are contained within a School, School is a higher-level aggregation within the overall dimension we can now call College. When we relate each position along the Class aggregation to a position along the School aggregation, we have defined a hierarchy within the overall College dimension.
The ability to move up and down along these newly created hierarchies is referred to as roll-up and drill-down. The chosen level along each dimension now defines each view, which can also be rotated or ranged as previously described.