Académique Documents
Professionnel Documents
Culture Documents
Designer Module
Standard Toolbar Formula Bar Editing Toolbar
Structure
Setting Parameters
Create and save a .unv file in which you can build a universe Name a universe Create a Help description for the universe Set up a connection Be aware of other universe parameters
Creating a Universe
Define the Parameters Resolve the Loops Insert Tables Create Classes and Objects Make the Joins Set up Hierarchies
Creating a Universe
To begin creating a new universe: Select File, New To access the Universe Parameters dialog box for an existing universe:
or
Click on
What Is a Connection?
Definition: A connection is a link from the universe to the target database The link is achieved using middleware (for example ODBC) An existing connection may be used or a new connection created for a universe There are three different types of BusinessObjects connection
Saving a Universe
Save the universe using a maximum of eight characters with up to three characters as an extension This makes it possible to distribute the universe across different kinds of computers
Choose File, Save or click By default the universe is saved in the folder:
\\Documents and Setting \<User Name>\Application Data\BusinessObjects \BusinessObjects 11.0universe\<SystemName>\<Folder>
Adding Tables
Use the Table browser:
Double-click on the background of the Structure Click on Choose Insert, Tables from the menu
The Table browser displays all the tables and views of the database You can select multiple tables using the Shift key or Ctrl key
Joins
Set equi-joins manually Delete and modify joins Set strategies for automated joins Be able to set outer, theta and self-restricting joins View joins in List Mode Set cardinalities
Joins
A join is a condition that restricts the result set of a multi-relational query There are several different kinds of join: Equi-join (otherwise known as a standard or inner join) Outer join Theta join Self restricting join
Equi-Joins
The Strategy for automatic detection of joins is based on common column names between tables You can choose from one of three specific strategies for join detection:
Smart Matching Column Names (no key info.) All Matching Column Names All Matching Numeric Column Names
Outer Joins
Warning: Outer joins should ideally only be specified at the end of a table path. If specified in the middle of a table path all subsequent joins in the path will also have to be specified as outer.
Theta Join
A theta join contains an expression that is based on something other than equality:
CTRL-CLICK
List Mode displays tables, joins and contexts It is possible to identify joins related to a specific table
Join Cardinalities
Cardinality: Shows the relationship between tables on the basis of the join Should only be one to many or one to one. It should never be many to many Is not needed to infer SQL in Business Objects Is only required to resolve loops and alternative routes in the Structure
Adding Cardinalities
Manually using the Edit Join dialog box
Automatically using
Checking Integrity
Always check integrity after defining joins
Testing
REMEMBER: Once you have created the objects for your universe you must make extensive multi-relational queries to check that the joins are producing the SQL output correctly
Create dimension and detail objects Understand and edit object properties Copy objects from one universe to another Test objects
Objects
Dimensions Projects columns from the database which are key to a query Details Projects columns from the database that provide detailed information related to a dimension Measures Contains aggregates to project statistics
Classes
Used to group related objects Used to provide subsets of related objects
Measures are grouped in a separate class Except where they can only be used with objects from a given class
41 Copyright 2002 Business Objects SA - All Rights Reserved
Creating a Sub-Class
Sub-classes allow a better organization of objects Avoid too many levels of sub-classes Use the Speedmenu on a class to create a sub-class
Creating an Object
Different Ways:
Manually with Drag and drop from a database column into a class Insert objects from another universe (copy and paste)
Checking Integrity
Remember to check integrity after creating objects
Testing Objects
While developing a universe, observe the following production cycle Modify Universe
Test Universe
Save Universe
A Measure is Dynamic
Measure objects are semantically dynamic
When projecting only some variables from the microcube aggregation occurs
GROUP BY Country.country
What is a loop?
A loop exists when the joins between tables form a continuous path
Cardinality Detection
Cardinality not set: Set Cardinalities:
Do this manually:
What is an Alias ?
An Alias is an exact duplicate of the original table with a new name. The data in the table is exactly the same. The Alias is used only to resolve the loop in the structure of the universe. There is no impact on the schema of the database
Easy to define Easy to maintain Easy to use
When to Alias
A loop with a single lookup table should be resolved by an alias A lookup table can be identified by its cardinality A lookup table only has the one end of joins attached to it
N N
1 N 1 N 1 1 1 N
How to Alias
Designer routines detect loops and candidates for aliases Break the loop by creating an alias of the lookup table for each side of the loop Some designers like to create an alias for both sides of the loop.
The Loop Detection window identifies each loop The window suggests candidate contexts or aliases
The routine lists candidate Alias tables You can rename the Alias tables if required
Name the Alias table and click OK Then reset the joins manually
Country
Customers
There are two possible routes through Loans Loans Lines the structure:
Rental_Model context Sale_Model context
A context is merely a collection of ALL the joins on a single route. Context name = table name on a route with only many cardinality.
Sale_Model context
Editing Contexts
Double click the context in the List Mode window
The context name The highlighted joins are included in the context The description appears in the User module Help panel
Shortcut Joins
If a query includes Client and Country but NOT Region, the Region joins are still needed in the SQL. Ineffecient! But joining Country to Client directly creates a loop
This is not a Loop! Be aware of existing Contexts when you add the join: Shortcut joins are not automatically added
Manually set the cardinality Test the results in the user module
Alternative Routes
Alternative routes do NOT only exist in loop scenarios.
Context 1
Loop
2 Routes = 2 Contexts
Context 2
Context 1
Fork
2 Routes = 2 Contexts
Context 2
The joins in a context are identified by working back from the table with only the many end of joins attached - many-one, many-one.
The chasm trap is resolved by executing a separate SELECT statement for object Y and object Z.
Step 1
Step 3
Deny Multiple SQL Statements for each measure
Test 2
Test 3
The problem on test 3 arises because the processing of a single SELECT statement produces a single virtual logical table to Test 2 apply aggregation.
Test 3
Where you have a many-one-many relationship for tables in the FROM clause the resulting logical table produces something akin to a Cartesian Product. Only then is aggregation applied. This is the reason for the chasm effect.
By inferring two separate SELECT statements and only then combining the results of each one into microcube(s) for projection into block(s).
Click
Check
The Chasm Trap query will now make one query for each measure and combine the results - correctly.
The report contains a single block with the results displayed as a Cartesian product - unclear for Users.
2) IN-EFFICIENT The parameter will force a SELECT statement for each measure, even when it is NOT necessary to do so!
Dimensions
Like the chasm trap, the fan trap can be resolved by executing a separate SELECT statement for object Y and object Z. The alternative solution is to avoid it in the first place!
Step 1
Test 1
Test 2
Test 1
Test 2
The problem on test 2 arises because the processing of a single SELECT statement produces a single virtual logical table to apply aggregation.
Where you have a one-many-many relationship for tables in the FROM clause the resulting logical table produces something akin to a Cartesian Product. Only then is aggregation applied. This is the reason for the fan effect.
How can we avoid the fan trap? By inferring two separate SELECT statements and only then combining the results of each one into microcube(s) for projection into block(s). By avoiding the fan trap scenario in the first place!
To avoid placing a measure on anything other than the last table in a table path (i.e. the table with only many cardinality attached to it).
Click
Check
The Fan Trap query will now make one query for each measure and combine the results - correctly.
1) Create an Alias of Table B. 2) Create a join between the alias Ba and table A and set cardinality.
Ba
3) Set Contexts C and Ba. 4) Change the SELECT clause of object Y so that it refers to the alias Ba rather then table B.
.which are then merged in a single microcube to produce the correct result.
1) This is only possible where the measure on table B is a preaggregation of more detailed data which exists in table C. 2) Code measure object Y so that it refers to the more detailed data in table C. NOTE : This will be less efficient but at least it is accurate.
The @ Functions
The @ Functions available are:
These Functions are applied in the Select and Where boxes of objects They are used to provide flexible methods of specifying SQL
@Prompt
@Prompt is placed in an object as part of the Select or Where properties
When a query is run that includes the object, the @prompt of the object forces a prompt box to appear
@Prompt Syntax
SHOWROOM.SHOWROOM_NAME = @PROMPT Operator dependent on operand ( The prompt. Enter Showroom Name, Data Type (A, N or D)... A, LoV Pointer.... Showroom\Showroom, Or hardcoded list : {A,B,C} Mono or multi (LoV selection).. Mono, Free or constrained (to value in LoV).. Constrained )
@Select
@Select function acts as a pointer to the Select box of another object: @Select (Class_Name\Object_Name)
Creates a dynamic link between objects, so that update of the original object Select statement automatically updates the other objects
@Where
The @Where function acts as a pointer to the Where box of another object
Creates a dynamic link between objects, so that update of the original object Where clause automatically updates the other objects or condition objects
@Script
Allows use of a variable declared in a VBA script
Not normally used uncheck this box Check this box for frequently changing lists Check this box for edited lists
Specify the file that contains the values for the list and click OK