Download presentation
Presentation is loading. Please wait.
1
Recursive Relationship
Customer 1 comprises A customer comprises zero or more customers © Ron McFadyen
2
Hierarchies Customer1 is hierarchically structured. Any of these customers are ones you may deal with. Each of these appears in the customer dimension. Customer 1 Customer 2 Customer 7 Customer 3 Customer 4 Customer 8 Customer 5 Customer 6 © Ron McFadyen
3
Hierarchies The valid paths are: Customer 1 Customer 2 Customer 7
© Ron McFadyen
4
Consider the helper/bridge table
Customer bridge Parent customer key Subsidiary customer key Levels from parent Level name Bottom flag Top flag Some useful additional attributes Levels from parent Level name Bottom flag Top flag And we’ll add one extra row for each node paired with itself © Ron McFadyen
5
Subsidiary customer key Levels from parent Level name Bottom flag
Bridge table Customer bridge Parent customer key Subsidiary customer key Levels from parent Level name Bottom flag Top flag And we’ll add one extra row for each node paired with itself How many rows will there be? © Ron McFadyen
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.