Difference between revisions of "Tutorial/Schema cheatsheet"
Jump to navigation
Jump to search
<Level name="Parent" column="PARENTNAME" uniqueMembers="true"/>
</Hierarchy>
</Dimension>
...
...
<Dimension name="Example" foreignKey="PARENT">
<Hierarchy hasAll="true" primaryKey="DataID" primaryKeyTable="data_parent">
<Join leftKey="GRANDPARENT" rightKey="DataID">
</Join>
<Level name="Grandparent" table="data_grandparent" column="GRANDPARENTNAME" uniqueMembers="true"/>
<Level name="Parent" table="data_parent" column="PARENTNAME" uniqueMembers="true"/>
</Hierarchy>
</Dimension>
...
old>Admin |
old>Admin |
||
Line 20: | Line 20: | ||
Example: | Example: | ||
=== Related table | === Related table ONE step away === | ||
==== Solution structure ==== | |||
child --> parent | |||
==== Database structure ==== | |||
data_child --> data_parent | |||
* data_child | |||
** PARENT: Key to the "parent" solution | |||
* data_parent | |||
** GRANDPARENT: Key to the "grandparent" solution | |||
** PARENTNAME: Descriptive field | |||
==== Cube schema ==== | |||
... | |||
<Table name="data_child"/> | |||
... | |||
<Dimension name="Example" foreignKey="PARENT"> | |||
<Hierarchy hasAll="true" primaryKey="DataID" primaryKeyTable="data_parent"> | |||
<Table name="data_parent"/> | |||
<Level name="Parent" column="PARENTNAME" uniqueMembers="true"/> | |||
</Hierarchy> | |||
</Dimension> | |||
... | |||
=== Related table TWO steps away === | === Related table TWO steps away === |
Revision as of 01:29, 28 February 2014
Schema structure overview
- Table (one):
- Structure: The centre table
- Dimensions (many)
- Structure: Related tables or groupable values
- OLAP: Columns/row "headers" in the cube
- Measures (many)
- Structure: Values in the centre table
- OLAP: Numbers to display in cell cubes
Defining dimensions
Simple groupable values
Example:
Related table ONE step away
Solution structure
child --> parent
Database structure
data_child --> data_parent
- data_child
- PARENT: Key to the "parent" solution
- data_parent
- GRANDPARENT: Key to the "grandparent" solution
- PARENTNAME: Descriptive field
Cube schema
...... <Dimension name="Example" foreignKey="PARENT"> <Hierarchy hasAll="true" primaryKey="DataID" primaryKeyTable="data_parent">
Related table TWO steps away
Solution structure
child --> parent --> grandparent
Database structure
data_child --> data_parent --> data_grandparent
- data_child
- PARENT: Key to the "parent" solution
- data_parent
- GRANDPARENT: Key to the "grandparent" solution
- PARENTNAME: Descriptive field
- data_grandparent
- GRANDPARENTNAME: Descriptive field
Cube schema
...