Can anyone tell me what is wrong with this schema

  • Specifically the shared dimensions:

    <?xml version="1.0"?>

    <?xml-stylesheet href="http://courses.oreillyschool.com/dba4/schema/MetaData.xsl" type="text/xsl"?>

    <Schema name="Human Resources"

    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

    xsi:schemaLocation="http://courses.oreillyschool.com/dba4/schema/Mondrian.xsd">

    <Dimension name="Time" type="TimeDimension">

    <Hierarchy hasAll="true" primaryKey="the_date">

    <Table name="time_by_day"/>

    <Level name="Year" column="the_year" type="Numeric" uniqueMembers="true" levelType="TimeYears"/>

    <Level name="Quarter" column="quarter" uniqueMembers="false" levelType="TimeQuarters"/>

    <Level name="Month" column="month_of_year" uniqueMembers="false" type="Numeric" levelType="TimeMonths"/>

    <Level name="Day" column="day_of_month" uniqueMembers="false" type="Numeric" levelType="TimeDays"/>

    </Hierarchy>

    </Dimension>

    <Dimension name="Store">

    <Hierarchy hasAll="true" primaryKey="store_id" primaryKeyTable="store">

    <Join leftKey="employee_id" rightKey="employee_id">

    <Table name="store"/>

    <Table name="employee"/>

    </Join>

    <Level name="Store Name" table="Store" column="store_name" uniqueMembers="true"/>

    <Level name="Store Type" table="store" column="store_type" uniqueMembers="true"/>

    <Level name="Store Country" table="store" column="store_country" uniqueMembers="true"/>

    <Level name="Employee Name" table="employee" column="full_name" uniqueMembers="true"/>

    </Hierarchy>

    </Dimension>

    <Dimension name="Pay Type">

    <Hierarchy hasAll="true" primaryKey="employee_id" primaryKeyTable="employee">

    <Join leftKey="position_id" rightKey="position_id">

    <Table name="employee"/>

    <Table name="position"/>

    </Join>

    <Level name="Pay Type" table="position" column="pay_type" uniqueMembers="true"/>

    </Hierarchy>

    </Dimension>

    <Dimension name="Employee">

    <Hierarchy hasAll="true" primaryKey="employee_id">

    <Table name="employee"/>

    <Level name="Employee Name" table="employee" column="full_name" uniqueMembers="true"/>

    </Hierarchy>

    </Dimension>

    <Dimension name="Department">

    <Hierarchy hasAll="true" primaryKey="department_id">

    <Table name="department"/>

    <Level name="Department Name" table="department" column="department_description" uniqueMembers="true"/>

    </Hierarchy>

    </Dimension>

    <Cube name="HR">

    <Table name="salary"/>

    <DimensionUsage name="Time" source="Time" foreignKey="the_time"/>

    <DimensionUsage name="Store" source="Store" foreignKey="store_id"/>

    <DimensionUsage name="Pay Type" source="Pay Type" foreignKey="position_id"/>

    <DimensionUsage name="Employee" source="Employee" foreignKey="employee_id"/>

    <DimensionUsage name="Department" source="Department" foreignKey="department_id"/>

    <Measure name="Salary" column="salary_paid" aggregator="sum" formatString="Standard"/>

    <Measure name="Employee Count" column="employee_id" aggregator="count" formatString="Standard"/>

    <CalculatedMember name="Average Salary" dimension="Measures">

    <Formula>[Measures].[Salary] / 52</Formula>

    </CalculatedMember>

    </Cube>

    </Schema>

  • Specifically assuming the PK's are correct do the joins and measures look correct?

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply