Search here on BOB for “context” and “alias” and you’ll find a bunch of existing topics. But in a nutshell:
Either approach will work. There are many considerations but one of the most important is usability. With aliased dimension tables, you will create multiple universe objects for the same source field. With contexts, the dimensions will only be associated with a single object.
For example, you may have a “customer” dim table with a “customer name” field. And three fact tables: sales, quotes, shipments. Using the alias method, you’d have three copies of the “customer” table, each one joined to one fact table. You’d then have a class associated with each of the three fact tables. Each class would have the respective measures from the fact table, and their own “Customer Name” object.
To illustrate:
Sales
–Sale date
–Sale amount
–Customer name
–Customer address
Quotes
–Quote date
–Quote amount
–Customer name
–Customer address
…
With the context method, dimensions are only represented once, so you may end up with:
Sales
–Sales date
–Sale amount
Quotes
–Quote date
–Quote amount
Customer info
–Customer name
–Customer address
The context method generally results in fewer objects, but the alias method can be cleaner since all related objects are together.
Another consideration is whether you want to allow querying multiple fact tables in the same query. The context example above would allow you to create a report with “Sales amount”, “Quote amount”, and “Customer name”. BO will build two queries and join the results in the report. This would not be possible with the alias method.
So, to answer your question, you’re probably best off leaving the structure of the universe as-is, and adding your new fact table with a new set of aliased dimension tables. Changing to a context approach would mean consolidating the replicated dimension objects, which would screw up existing reports. And it’s not necessarily better than what it is currently.
As to performance, there’s generally no difference between the two methods. The two examples I described above would produce the same SQL (with aliased table names, of course, but no change to the query logic).
Joe
joepeters (BOB member since 2002-08-29)