US and Worldwide: +1 (866) 660-7555
Results 1 to 4 of 4

Thread: How to solve if dimension table has composite key.

  1. #1
    Join Date
    May 2013
    Posts
    9

    Default How to solve if dimension table has composite key.

    I google some information about the composite ,but I can't find solution.

    Anyone could give some keyword or example?

    Example
    Dimension table1
    account_id customer_id model pn
    1 2 AAA a12
    1 2 AAA a13
    1 2 BBB b12
    2 1 AAA a13
    2 1 CCC c12
    3 1 DDD d13
    3 1 DDD d33
    3 1 DDD d23
    3 3 DDD d65

    Fact table2
    account_id customer_id region date1 date2 pn
    1 2 T 20120102 20120202 a12
    1 2 T 20120102 20120202 a12
    1 2 T 20120102 20120203 b12
    1 2 T 20120102 20120203 a13
    2 1 C 20120202 20120203 a13
    2 1 C 20120102 20120203 a13
    2 1 C 20120202 20120203 c12
    3 1 J 20120202 20120203 d23
    3 1 J 20120302 20120403 d33

    account_id & customer_id are also my dimension.

    In my thought, I think I need use the the account_id & customer_id & pn let the Dimension table1 & Fact table2 build the relation.

  2. #2
    Join Date
    Jan 2013
    Posts
    521

    Default

    Surrogate keys are much preferred to composite keys in a data warehouse. If modifying your table structure is an option, switching to surrogate keys would give you the best overall performance and storage.

    Mondrian 3.x does not support composite keys, although it is coming with Mondrian 4. See http://jira.pentaho.com/browse/MONDRIAN-630

  3. #3
    Join Date
    May 2013
    Posts
    9

    Default

    Thanks your reply, I will modify the table structure.

  4. #4
    Join Date
    May 2013
    Posts
    9

    Default

    Cos the DB is oracle 10g, we add a virtual column for composite key.
    it's work now.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •