I am new to Business Objects , and a FAQ in BO is which is the best way to resolve loops , SO Guys can anyone clarify me …which is the best way , Aliases or Contexts…
The best way is whichever way solves your problem I use both depending on the situation. If you have a specific problem, try giving us a simple example.
There are two key rules of thumb:
A context for each fact table
An alias for each different use of a reference table - e.g. multiple uses of calendar_ref for invoice dates, sales dates, delivery dates, etc.
Hi,
Apart from points mentioned by Mark, one other rule. Look at the maintainance point of view also.
I mean if the universe is very large and complex then always try to use contexts. It will reduce the pain of adding redundant aliases.
If universe is a small relatively simple in terms of tables present, joins and other properties of the universe then you can think of aliases.
In my case we have used contexts for derived, complex universe where as aliases in the smaller/simpler one where tables,joins were limited in number.
If your requirements are such that it makes you add aliases regularly then it may cause problem in future as there will redundant aliases in the universe.
I submit that maintenance doesn’t have anything to do with it either.
Contexts have a purpose. Aliases have a purpose. In every case I can think of, which one you select is based on the problem you are trying to solve, not really what you think will be the best maintenance option. If you need a context, then you need a context.
The only real alternative to creating contexts is to create more than one universe. That’s essentially what a context is, really, by identifying a set of joins that work together you are essentially subdividing a single universe into smaller sub-universes of tables that work together. You could separate them into different universes.
Aliases are not substitutes for contexts, and vice versa. Once you have identified the problem, the solution choice is made for you.
Hi Raj Alias and context are to be used depending upon the loop you encounter. Do let us know if you are struck anywhere in resolving the loops. The best way of designing a universe is keep you Logical Data Model with you and go accordingly.
I feel the best way of designing a universe is inserting one fact table at a time.
Insert one fact table and related dimension tables to that fact table.
Create all the joins.
Check for loops.
See if it can be resolved with an alias.
Create context. Make sure a context doesnt have any loops
Keep in mind that there are context issues in a universe that are not related to loops… a fan or chasm trap does not always include a loop, yet they require contexts, aliases, or a combination to solve.
A chasm trap is a many - one - many chain of tables. You need to use contexts to separate the two ends of that chain, as you cannot get a valid answer by using all three at the same time.
A fan trap is a one - many - many relationship with measures at all levels. You must separate out the measures from the dimension tables using aliases, then use contexts to resolve the resulting chasm traps.
Thank you all for helping me , I have another doubt , Is there any other purpose of setting cardinalities other than for resolving loops. Does the setting of cardinalities effect the report?
Yes, but only where you have the “Multiple SQL Statements for each Measure” turned on, and then only when you have measures spanning a fan trap. In that case you should see seperate sql statements for each measure.
Cardinalities are also used by the detection options, such as the “Detect Contexts” and “Detect Aliases” options.
It helps for support and further design.
You can see which way hierarchies are ordered.
I’m sure you’d appreciate cardinalities being set on any universes that you take over the maintenance and development of; it helps you to understand how the data is structured and identify any potential fan traps.