Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Loops - Alias vs Contexts

Status
Not open for further replies.

Louis123bo

Instructor
Sep 24, 2012
3
US
Hello Al,

I am trying to understand alias vs contexts in resolving loops.
In the Example given by Dave in can you please tell me why did he not break the loops using alias for Customer table in the contexts example? Customer table is also a look up table and in this case since the loop is caused by a single look up table why can we resolve example 2 with alias? Please explain? How is it different fro first example. This is the most famous example given in the Universe designer too and I always get confused with this contexts example.

Louis
 
If you think in terms of dimensional vs fact data, a context would be used in case of multiple facts within the model. Roleplaying issues (with dimensional data) would normally solved by using an alias

Ties Blom

 
@blom0344: Hi, I understand your point here in case of multiple facts we go for contexts. But I am using relational modeling were I dint have facts and dimensions separately instead I have tables like the tables mentioned in the example. SO I was confused here. So in y case for now, can I assume any table with measures are facts and with only IDs and names as dimensions? In that case even customer seems to be a dimension for me in second example. Please help.


 
Even with models that do not follow starschema practice it usually quite well possible to identify dimensional data. Customer is a typical dimension with a bunch of descriptive data (attributes) What possible measure would be involved with customer?

In typical starschema solution Reservations and reservationlines would yield fact1, Sales and invoice lines would yield fact2. Shared dimensions are Customer and Service.

By using contexts you can - at least with full client AFAIK - create a single query involving both fact 1 and 2 data pivoted around the customer. Aliasing Customer would be an option, but it would also limit you to EITHER fact1 OR FACT2 data..

Ties Blom

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top