cancel
Showing results for 
Search instead for 
Did you mean: 

Alias and Context

Former Member
0 Kudos

Hi,

How to determine when to use Alias and when to use Context.

Please tell me.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

I wrote a summary of the two techniques here:

http://www.dagira.com/2009/07/22/context-versus-alias-overview/

Hope this helps

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

Aliases

Which are logical pointers to an alternate table name. This command is dimmed until you select a table within the Structure window.You can define aliases to resolve the loops that Designer detected in the universe structure.This feature works only if you have defined at least one join and all the cardinalities in the joins have been detected.

Alias is nothing but the duplicate name of some other tabl

Context

Can be used to resolve loops in the universe You can create contexts manually or cause them to be detected by Designer. When contexts are useful Designer suggests a list of contexts that you can create.

context is nothing but specifying the name of the path the place where u cannot resolve the loops with allias there comes concept of context.

Context is basically used when we will have conformed dimension in the loop........

As far as my knowledge is concerned alias are used for duplication of names.But where as contexts are used to resolve the loops concept because using loops we can't determine which way to follow.If we have loops it produces undetermined results.

Former Member
0 Kudos

alias is one to many, one to many relation among the tables. there most be have the Universe at least three tables.

one universe have number of alias tables.

How to create an alias:

Select the table for which you want to create a alias.

Right click on table and from menu click on alias OR

from Insert menu select Alias

Give the new name of an alias

Remove the join from original table

Join the alias table appropriately and set the cardinality.

Once you have created an alias, you would also need to redefine the object to use alias table. In above case origin country should use coutry_region.country column instead of country.country column.

Resolving Loops using Contexts

Context is another way to resolve loops in universe. Contexts resolves loop by defining a set of join that defines specific path through tables in a loop. It makes sure that join are not included from different path in the same query.

Generally contexts are used solve a loop caused by multipurpose lookup table.

context is the path way of resolving loops, there makes the relation many to one to many,we make the context for summary fields(fact tables). in the context every fact table most be made up by single context(path).

All the best..

Praveen

Former Member
0 Kudos

Hai,

I case of traps we can easily identify to use alias or context

chasm trap---- context

fan trap -


alias

In case of loops we should be little bit careful

If the schema is having only one end of the one to many joins and no others with only one end joins use aliases.

Here single Sql select statement but different names for same objects

Use contexts in schema that can contain fact tables that share look up tables

Here routes are different and have different select statements with same objects names which will be merged in the microcube to give correct results