dbTalk Databases Forums  

Transforming parent child table to regular table

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss Transforming parent child table to regular table in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Lutz Morrien
 
Posts: n/a

Default Transforming parent child table to regular table - 12-16-2003 , 04:23 AM






Hi all,
I know that people have found ways to transform parent
child tables into regular tables. Can anyone give me a
hint on how to perform a task like that?

The background is that with us, large parent child
dimensions take a big crunch at performance. Therefore we
want to get rid of them once and for all.

I am currently trying to unfold the different levels.
Parent Child Example:
Table EmployeePC
EMP_ID | NAME | PAR_EMP
0 | Petersen| <Null>
1 | Jenning | 0
0 | Paulsen | 0
0 | Morrien | 1

The table has a maximal hierarchy depth of 3. Assuming
that there will be no need for more than 3 levels, the
table could be transferred into:

Table EmployeeREG
EMP_ID | NAME | EMPLVL 0 |EMPLVL 1 |EMPLVL 2
0 | Petersen| Petersen | <Null> |<Null>
1 | Jenning | Petersen | Jenning |<Null>
0 | Paulsen | Petersen | Paulsen |<Null>
0 | Morrien | Petersen | Paulsen | Morrien

This new table works like any other standard table,
avoiding the parent child relations. Of course this would
not be useable for real time olap.

Any thoughts on this?

TIA Lutz



Reply With Quote
  #2  
Old   
Ganesan Subramanian
 
Posts: n/a

Default Re: Transforming parent child table to regular table - 12-23-2003 , 06:59 AM






Can u give me more specific example. The example given is not clear. How
come emp IDs duplicated?

--
Ganesan Subramanian
Database and Datawarehousing.
"Lutz Morrien" <anonymous (AT) discussions (DOT) microsoft.com> wrote

Quote:
Hi all,
I know that people have found ways to transform parent
child tables into regular tables. Can anyone give me a
hint on how to perform a task like that?

The background is that with us, large parent child
dimensions take a big crunch at performance. Therefore we
want to get rid of them once and for all.

I am currently trying to unfold the different levels.
Parent Child Example:
Table EmployeePC
EMP_ID | NAME | PAR_EMP
0 | Petersen| <Null
1 | Jenning | 0
0 | Paulsen | 0
0 | Morrien | 1

The table has a maximal hierarchy depth of 3. Assuming
that there will be no need for more than 3 levels, the
table could be transferred into:

Table EmployeeREG
EMP_ID | NAME | EMPLVL 0 |EMPLVL 1 |EMPLVL 2
0 | Petersen| Petersen | <Null> |<Null
1 | Jenning | Petersen | Jenning |<Null
0 | Paulsen | Petersen | Paulsen |<Null
0 | Morrien | Petersen | Paulsen | Morrien

This new table works like any other standard table,
avoiding the parent child relations. Of course this would
not be useable for real time olap.

Any thoughts on this?

TIA Lutz





Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.