Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
stvn_003
Contributor III
Contributor III

Problem with Circular References

Hello, I have a problem with circular references does anyone have an idea or suggestion for it?

DERQV.jpg

1 Solution

Accepted Solutions
Anonymous
Not applicable

The Purchase Order Header and the Purchase Order Detail tables could be combined into a single Fact table to be the centre of a Star Schema.

The Customer and Customer Group tables could also be combined into a single Dimension Table.

As Gysbert suggested you could ignore the Customer Product table, so the Product table becomes another Dimension table.

Thus leaving a simple Star Schema with one Fact table and 2 Dimension tables.

View solution in original post

5 Replies
Gysbert_Wassenaar

You should rethink your data model. There should be only one path from a table to any other table. A Star schema is ideal, limited snowflaking isn't a problem. You also have to consider the synthetic keys. They point out problems with your data model. Try to get rid of them. Perhaps you need a link table with all the key fields and create new key fields to link the tables with the link table. Perhaps this blog post helps explain this concept: Concatenate vs Link Table


talk is cheap, supply exceeds demand
stvn_003
Contributor III
Contributor III
Author

So the relationship that should create the link tables table?

stvn_003
Contributor III
Contributor III
Author

These are the tables that I have in the database

QV_duda.jpg

Gysbert_Wassenaar

I think I'd get rid of the CustomerProduct table. In your first screenshot there seems to be only one field p_sku_cliente in that table besides the key fields. If you don't use this field for any analysis thenyou don't need the CustomerProduct table. If you do need it for analysis you can probably use a mapping table and the applymap function to add it to the PurchaseOrderDetail table.


talk is cheap, supply exceeds demand
Anonymous
Not applicable

The Purchase Order Header and the Purchase Order Detail tables could be combined into a single Fact table to be the centre of a Star Schema.

The Customer and Customer Group tables could also be combined into a single Dimension Table.

As Gysbert suggested you could ignore the Customer Product table, so the Product table becomes another Dimension table.

Thus leaving a simple Star Schema with one Fact table and 2 Dimension tables.