Partly Review of Mondrian Olap Engine
来源:互联网 发布:java 权限管理 开源 编辑:程序博客网 时间:2024/06/05 09:07
1. Consisted of 4 layers
n Presentation layer
Take charge of the end-user interaction in various presentation forms. The logic model is multidimensional 'grammar' of dimensions, measures and cells.
n Calculation layer
Validates and executes MDX queries. Query transformer.
n Aggregation layer
Manage aggregation in the cache.
n Storage layer
Usually is an RDBMS.
2. Aggregation strategy
General idea is to delegate unto the database what the database has. Thus the side-effect is loading data processing is easier, and the system is suited to do Olap on dataset changing in real time.
n Fact data is stored in the RDBMS
n Read aggregated data into the cache by submitting group by
queries
n Use materialized views as many as possible
3. APIs
n The Usage is similar to JDBC interfaces (see the following example)
n Use MDX, in place of SQL
n Presents the database schema as a set of objects: Schema, Cube, Dimension, Hierarchy, Level, Member
n Now suppot XML/A
Example:
/* establish a connection with */ import mondrian.olap.*; import java.io.PrintWriter; Connection connection = DriverManager.getConnection( "Provider= "Jdbc=jdbc:odbc:MondrianFoodMart;" + "Catalog=/WEB-INF/FoodMart.xml;", null, false); Query query = connection.parseQuery( "SELECT {[Measures].[Unit Sales], [Measures].[Store Sales]} on columns," + " {[Product].children} on rows " + "FROM [Sales] " + "WHERE ([Time].[1997].[Q1], [Store].[CA].[ Result result = connection.execute(query); result.print(new PrintWriter(System.out)); |
4. MDX extensions
n Support parameters
This is done through the functions Parameter():
Parameter(<name>, <type>, <defaultValue>[, <description>])
For example:
/* the top 10 brands in */ SELECT {[Measures].[Unit Sales]} on columns, TopCount([Product].[Brand].members, Parameter("Count", NUMERIC, 10, "Number of products to show"), ( Parameter("Region", [Store], [Store].[ ) on rows FROM Sales |
n Extend Build in functions StrToSet and StrToTuple
Add a optional parameter <hierarchy> to the functions, thus user can get the result of the given hierarchy.
StrToSet(<String Expression>[, <Hierarchy>])
StrToTuple(<String Expression>[, <Hierarchy>])
5. Schema
n Logical Model: the structure of multi-dimensional database cubes, including dimensions, hierarchies, levels, and members.
n Physical Model: the source of the data
Example:
/* foodmart, Sales cube defination */ <Schema> <Cube name="Sales"> <Table name="sales_fact_1997"/> <Dimension name="Gender" foreignKey="customer_id"> <Hierarchy hasAll="true" allMemberName="All Genders" primaryKey="customer_id"> <Table name="customer"/> <Level name="Gender" column="gender" uniqueMembers="true"/> </Hierarchy> </Dimension> <Dimension name="Time" foreignKey="time_id"> <Hierarchy hasAll="false" primaryKey="time_id"> <Table name="time_by_day"/> <Level name="Year" column="the_year" type="Numeric" uniqueMembers="true"/> <Level name="Quarter" column="quarter" uniqueMembers="false"/> <Level name="Month" column="month_of_year" type="Numeric" uniqueMembers="false"/> </Hierarchy> </Dimension> <Measure name="Unit Sales" column="unit_sales" aggregator="sum" formatString="#,###"/> <Measure name="Store Sales" column="store_sales" aggregator="sum" formatString="#,###.##"/> </Cube> </Schema> |
Attention: You can write custom member readers to extend the datasource.
- Partly Review of Mondrian Olap Engine
- OLAP:Mondrian&JPviot
- Mondrian--olap引擎
- OLAP:Mondrian&JPviot
- Mondrian OLAP: schema
- 开源OLAP引擎:Mondrian
- Mondrian OLAP前端
- java 之OLAP引擎Mondrian
- Pentaho Mondrian OLAP多维分析
- Creating a basic Mondrian OLAP Cube
- OLAP方案I I--Mondrian引擎 .
- Mondrian+JPivot+Mysql Web项目实现OLAP
- java开源的OLAP引擎--mondrian
- OLAP简介及Mondrian快速入门
- OLAP多维分析之mondrian安装
- OLAP多维分析之Mondrian Schema详解
- OLAP简介及Mondrian快速入门
- 多维分析OLAP引擎Mondrian学习
- SendMessage 与 SendDlgItemMessage 的区别
- C#技术内幕(1)
- lib和dll文件的区别和联系
- ATI 's driver for Linux isn't better.
- 更新文件2
- Partly Review of Mondrian Olap Engine
- Live Hotmail 出错一记
- 10月8号-输入输出-文件
- Windows程序调试--函数调用规范
- c++成员函数指针揭秘
- Javacript OOP
- Visual Studio 2005网站开发环境(周金桥 著)
- java中经常用到的读写配置文件的信息properties属性的写入,读取例子
- DWR