How to model Self-referntial fact record
2 posters
Page 1 of 1
How to model Self-referntial fact record
Hi , i have a fact table like the below image
this fact record map to case,transaction and email data where the case have many transcation and the transcation may be an email or a call
the problem for me the emai data like when it's arrived, opened , its current status , the issue email sent for and so on is handled in other diemsnions related to this fact.
now , most email in should have replies and the email in and the replies , each of them has a record in this fact, so how to model the relation between the email out and its email in ? does this mean that i need to make self referential fact table ?
Thanks,
Fr
this fact record map to case,transaction and email data where the case have many transcation and the transcation may be an email or a call
the problem for me the emai data like when it's arrived, opened , its current status , the issue email sent for and so on is handled in other diemsnions related to this fact.
now , most email in should have replies and the email in and the replies , each of them has a record in this fact, so how to model the relation between the email out and its email in ? does this mean that i need to make self referential fact table ?
Thanks,
Fr
friend4allmo- Posts : 10
Join date : 2014-05-22
Re: How to model Self-referntial fact record
You can always have a key referencing a previous transaction. It's value depends on how users intend to use this.
If they only look at the immediate parent, no problem. However, if they wish to traverse the hierarchy further, it requires some complex SQL that is not universally supported. To support the hierarchy, the relationship should be published as a bridge table. Generate the bridge based on the parent/child keys in the fact.
If they only look at the immediate parent, no problem. However, if they wish to traverse the hierarchy further, it requires some complex SQL that is not universally supported. To support the hierarchy, the relationship should be published as a bridge table. Generate the bridge based on the parent/child keys in the fact.
Re: How to model Self-referntial fact record
Thanks Nick for your reply
yes, it should not be any hierarchy. the use of it for referring the previous transactions which is email in (in my case) not more that.
but won't this affect the performance when i need the join the fact with itself ?
Thanks,
Fr
yes, it should not be any hierarchy. the use of it for referring the previous transactions which is email in (in my case) not more that.
but won't this affect the performance when i need the join the fact with itself ?
Thanks,
Fr
friend4allmo- Posts : 10
Join date : 2014-05-22
Re: How to model Self-referntial fact record
Yeah, sure it will affect performance. But if you need to join, what other options are there?
Re: How to model Self-referntial fact record
i couldn't find any other solution.
Thanks alot for you answer and your help Nick!
Thanks alot for you answer and your help Nick!
friend4allmo- Posts : 10
Join date : 2014-05-22
Similar topics
» Dimensions that don't apply to every fact record
» Replicate Fact record because Dimension has changed
» Many to many relationship question
» Single fact table vs multiple fact tables - what is the right way in a dimensional model?
» How to model fact with optional parent fact?
» Replicate Fact record because Dimension has changed
» Many to many relationship question
» Single fact table vs multiple fact tables - what is the right way in a dimensional model?
» How to model fact with optional parent fact?
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum