Skip to Content
avatar image
Former Member

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

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.

alias.png (47.4 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • Best Answer
    avatar image
    Former Member
    Oct 14, 2015 at 12:04 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 12, 2015 at 02:25 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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.

  • avatar image
    Former Member
    Oct 12, 2015 at 09:31 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 12, 2015 at 09:38 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 13, 2015 at 04:10 AM

    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?😕

    Add comment
    10|10000 characters needed characters exceeded