blogs.conchango.com

welcome to the conchango blogging site
Welcome to blogs.conchango.com Sign in | Join | Help
in Search

SSIS Junkie

Are you balanced or unbalanced?

I was recently asked by a colleague about my opinions on unbalanced (sometimes called ragged) versus balanced hierarchies in data modelling. Other people have described the differences between unbalanced and balanced hierarchies before me so instead of me trying to explain them I'll point you here instead for an explanation. Here are the opinions that I proffered back to my colleague:

 


I’m 50-50 on ragged hierarchies. In some ways storing in parent-child fashion (which is how people typically store ragged hierarchies) is flexible because…well…because they’re ragged. However if you look at it from another direction they’re not flexible at all. Look at the following "balanced" structure:

Product Category Colour
Apple Fruit Green
Banana Fruit Yellow
Custard Dessert Yellow

In an OLAP or MDM product you can then build many hierarchies from that:

Category-->Product

Colour-->Product

Category-->Colour-->Product

Colour-->Category-->Product

Product-->Category-->Colour (a daft one, but there is actually nothing to stop us from doing this)

Thus – much more flexible.

 

It’s a daft example but I think you get the idea.

Headline is "Parent-child allows us to store any hierarchy for a dimension, but we can only store one. A list of attributes enables us to build any number of hierarchies in one dimension, as long as they are balanced." So, you have a choice to make.


I'm interested to know what other people's approaches to this problem are? Do you prefer to model your hierarchies as balanced or unbalanced? I'm personally of the opinion that by-and-large the business logic makes the decision for you - but then the world isn't always that simple is it?

-Jamie

Published 30 August 2007 23:23 by jamie.thomson
Filed under: ,

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

 

BI Thoughts and Theories said:

Jamie posted a question on ragged hierarchies to his blog today: Are you balanced or unbalanced? I started

August 31, 2007 03:42
 

Dirk said:

My general approuch would be:

If the max number of levels if fixed and not to large, I would use a normal hierarchy that's ballanced in the MDM. If from a usablility perspective it is better to make it ragged that that would be with the "hide member if" properties in AS.

If the structure is very irregualar and with a wide variety of different depths I would probably create a parent-child one.

Experience on this one:

Project industrie, a project can have subprojects, which can have subprojects,...

client 1 may say: oh project can have any level from 1 to 10 subprojects then we go for the P-C

Client 2 says: we always have atleast 1 level of subprojects and max 3 then we go for a regular hiearchy that we make balanced in the MDM, but ragged with the "Hide member if"

The business indeeds makes this decission largly for you.

So I guess you could say I'm a little biassed towards balancing.

August 31, 2007 08:55
 

Andy said:

We model a lot of organisation structures and as previously mentioned this normally is decided by the businesses. However we do have a tendency to have a degree of balance in the lower levels of the hierachy. By this I mean that if you take a just one branch of the hierachy then that would be balanced. If you took the whole hierachy then it would be unbalanced. This is good for coding as it allows you to avoid dynamically navigating the tree.

To follow with the project example, you might say that all infrastructure projects always have 3 levels and software projects have 2 levels.

August 31, 2007 10:10
 

Tim kent said:

I think this topic is probably influenced partly by the fact that AS handles both ragged hierarchies and PC dimensions pretty badly (IMHO).  This is one of the few areas where AS still lags behind Essbase (In Essbase the build process is defined as PC or Level (etc) but once built, every dimension is treated the same).

If your master data\business logic defines a ragged structure then isn't that what you should build?

August 31, 2007 14:09
 

Ibrahim Hafidh said:

One thing that influences my decision to use P-C ragged hierarchy is when I need to use unary operators. AS does not aggregate correctly when you set unary operators on a regular hierarchy (at least I haven't figured it out). And Microsoft recommends using P-C whenever you need to set unary operators.

August 31, 2007 23:50
 

Thomas Ivarsson said:

Interesting discussion. According to Books On Line ragged hierarchies will not be supported in Katmai.

The problem with pc dimensions is also that they are very hard to maintain with slowly changing dimensions. I have read several TSQL books of how to handle this problem. Most implementaions I have seen drops the whole pc dimension table and reloads it.

On the link you can read my reflections about pc dimensions in SSAS2005.

September 2, 2007 11:14

Leave a Comment

(required) 
(optional)
(required) 
Submit

This Blog

Syndication

News

Powered by Community Server (Personal Edition), by Telligent Systems