views:

30

answers:

1

Am making a cube in SQL Server Analysis Services 2005 and have a question about many to many relationships.

I have a many to many relationship between two entities that contains an additional descriptive column as part of the relationship.

I understand that I may need to a bridge table to model the relationship but I am not sure where to store the additional column - in the bridge table or elsewhere?

+1  A: 

Many To Many relationsip in SSAS can be implemented via an intermediate fact table that contains both dimension key that subject to the relation.

For example; If you have a cube that has a book-sales-fact table and you want to aggregate total sales by author (which may have many books and a book may be written by many authors) you should also have a author-book intermediate fact table (just like in relational database world). In this bridge table, you should have both dimension keys (Author and Book) plus some measure related to the current book and author such as wages paid to the author to write the book (or chapters).

As a result, if your additional column is kind of a measure you should add that column to the intermediate fact table.

orka