As mentioned above, Mondrian is the core engine of OLAP. It is responsible for computing and caching data from relational databases and responding to queries from the presentation layer using the ms mdx syntax. The specific manifestation is a jar, which is started with Tomcat.
After reading the foodmart sample, you should do it yourself.
The first step is to design the OLAP database structure.
Compared with business databases, OLAP requires redundant data for faster query.
Before design, you can visit the classic full-dimensional design guide, which can be roughly translated in a few Chinese versions.
To put it bluntly, it is to remove the columns irrelevant to the report and combine the order and order details tables into a sales fact table to put the product, the product category table is merged into a product dimension table.
After the design, there should be several fact tables with statistical data and Foreign keys of the dimension table, and several dimension tables for classification, sorting, and filtering.
Step 2: import the data in the Business Database.
There are many ETL tools that generate a lot of ing files and convert classes. However, I still like to write SQL quickly directly. Maybe I am not facing a GB database every day.
Step 3: Define the database structure just designed as schema
The schema meta-model includes dimensions, hierarchies, levels, and members. Mondrian uses it to aggregate data from relational databases to respond to queries in the MDX syntax.
Before this step, remember to first install a Chinese version of SQL Server2000, which contains a detailed explanation of the Help file.
In addition, jprovit has a sub-project, which is the Eclipse plug-in of this schema. Even if you don't use this plug-in and have its DTD, you can avoid time errors caused by spelling mistakes in other XML editors.
Use foodmart. XML in the sample as a blueprint, and copy paste's schema in two ways.
Finally, note that the names of Oracle columns must be in uppercase.
RelatedArticle:
General OLAP solutions for the poor I-Sequence
Poor general OLAP solutions I-Mondrian Engine
General OLAP solution III for the poor-July performance Layer