cancel
Showing results for 
Search instead for 
Did you mean: 

Aliases in Universe : How to decide on which table we should create aliase?

Former Member
0 Kudos

Hi All,

I have created following loop using derived table to practice Alias,now I have a doubt that how to decide on which table I should create Alias?

Thanks,

Shweta.

Accepted Solutions (1)

Accepted Solutions (1)

michael_melters
Advisor
Advisor
0 Kudos

Yes, there are methods to decide wether to work with aliases or with contexts in order to resolve a loop. This done by looking at the cardinalities of the joins in the schema. Normally if a table only used for looking up dimension values it is a candidate for alias creation. Those table are sometimes called mulit domain lookups or shared dimensions. In your case it would be table B.

If a table has only diamonds as a starting point, it is normally a candidate for a context. Those tables are called very often fact tables and their columns  are used for the key figures of your universe. This table in your case it would be table A.

In your case it is very difficult to recognise which table are dimension table and which are the fact tables because all of them look very similar. We might need more information on your schema in order to suggest a solution.

Answers (4)

Answers (4)

Former Member
0 Kudos

Thank you Mark and Swapnil.

Actually I don't have access to many tables so I thought I could use derived table to create a loop and then practice Aliases. So I think my design itself is wrong?

But still is there any rule or something or how do you decide on which table to use aliases or you need to have good understanding of your database in order to decide that?

Former Member
0 Kudos

HI Shweta,

In your design you have MATNR table as a derived table & same table has two instance.

May I know why did you take two instance of same table? Also you have made joins between both the tables. Which is required?

Thanks,

Swapnil

Former Member
0 Kudos

What are the relationships between the tables and why are you using so many derived tables?

The choice here is aliases versus contexts.

You would use an alias if a table has two different meanings/uses.

A country table could be reused for customers and suppliers. It would have a different meaning for each, so you would create a Customer_Country alias and a Supplier_Country alias.

Without knowing what your tables mean, we cannot advise specifically in your example what should be aliased.

amitrathi239
Active Contributor
0 Kudos

Hi,

See attached link.This will give you the better understanding.

Dave’s Adventures in Business Intelligence » Context Versus Alias Overview

Which table has one to many relationship from one side to other tables?

Amit

Former Member
0 Kudos

Hi Amit,

Thanks. But given link is of Context Vs Aliases.My question is how to decide on which table we need to create Alias.

Z79_PURCHASES has one to many relationship. I tried resolving loop by two ways.

1. Created alias for table Z79_PURCHASES (one to many relationship)

2. Created alias for table "Derived Table_MATNR" (do not have one to many relationship)

I did not get any error or warning in both the ways. Universe published successfully without any warning or error. Hence I am little confused that how both the ways are correct or it doesn't matter on which table we are creating alias?

Thanks,

Shweta.