BOU310
BOU310
BOU310
1: Universe
Design
Learner’s Guide
BOU310
Copyright
© 2009 SAP® BusinessObjects™. All rights reserved. SAP
BusinessObjects owns the following United States patents, which
may cover products that are offered and licensed by SAP
BusinessObjects and/or affliated companies: 5,295,243; 5,339,390;
5,555,403; 5,590,250; 5,619,632; 5,632,009; 5,857,205; 5,880,742;
5,883,635; 6,085,202; 6,108,698; 6,247,008; 6,289,352; 6,300,957;
6,377,259; 6,490,593; 6,578,027; 6,581,068; 6,628,312; 6,654,761;
6,768,986; 6,772,409; 6,831,668; 6,882,998; 6,892,189; 6,901,555;
7,089,238; 7,107,266; 7,139,766; 7,178,099; 7,181,435; 7,181,440;
7,194,465; 7,222,130; 7,299,419; 7,320,122 and 7,356,779. SAP
BusinessObjects and its logos, BusinessObjects, Crystal Reports®,
Rapid Mart™, Data Insight™, Desktop Intelligence™, Rapid
Marts®, Watchlist Security™, Web Intelligence®, and Xcelsius®
are trademarks or registered trademarks of Business Objects,
an SAP company and/or affiliated companies in the United
States and/or other countries. SAP® is a registered trademark
of SAP AG in Germany and/or other countries. All other names
mentioned herein may be trademarks of their respective owners.
C O N T E N T S
About this Course
Course introduction..................................................................................................xvii
Course description...................................................................................................xviii
Course audience.......................................................................................................xviii
Prerequisites..............................................................................................................xviii
Level, delivery, and duration...................................................................................xix
Applicable certifications and designations.............................................................xix
Course success factors................................................................................................xix
Course setup................................................................................................................xix
Course materials.........................................................................................................xix
Learning process..........................................................................................................xx
Lesson 1
Understanding BusinessObjects Universes
Lesson introduction.......................................................................................................1
Defining BusinessObjects universe concepts.............................................................2
The semantic layer.................................................................................................2
What is a universe?................................................................................................2
What type of database schema is used?..............................................................4
Classes and objects ................................................................................................5
Advantages of a universe .....................................................................................6
BusinessObjects Universe Designer components .............................................6
Starting Universe Designer ..................................................................................6
Using the Quick Design Wizard..........................................................................8
Importing a universe ............................................................................................8
Using Universe Designer module commands ..................................................9
Saving and exporting a universe.......................................................................12
Universe file names as identifiers......................................................................13
Saving a universe definition as PDF .................................................................13
Giving all users access to a universe ................................................................14
Activity: Viewing a universe in Universe Designer........................................14
Using the universe development cycle.....................................................................16
The universe development cycle process ........................................................16
Preparation phase ................................................................................................17
Analysis phase......................................................................................................19
Planning phase.....................................................................................................20
Implementation phase.........................................................................................21
Lesson 2
Creating the Course Universe
Lesson introduction.....................................................................................................31
Describing the course database and universe ........................................................32
The course database.............................................................................................32
Creating the universe .................................................................................................35
Setting the database connection.........................................................................35
Data access drivers...............................................................................................35
ODBC connection drivers...................................................................................36
OLE DB connectivity...........................................................................................36
Viewing, modifying, and deleting available connections..............................40
Creating a new universe......................................................................................42
Defining universe parameters ...........................................................................43
Identifying the universe......................................................................................43
Universe parameters............................................................................................44
Definition tab........................................................................................................45
Summary tab.........................................................................................................46
Strategies tab.........................................................................................................47
Controls tab...........................................................................................................48
SQL tab...................................................................................................................49
Links tab................................................................................................................50
Parameters tab......................................................................................................50
Activity: Creating a new universe and defining its connection....................51
Quiz: Creating the course universe...........................................................................52
Lesson summary..........................................................................................................53
Lesson 3
Building the Universe Structure
Lesson introduction.....................................................................................................55
Populating the universe structure.............................................................................56
Designing a schema ............................................................................................56
Schema design and the universe creation process..........................................56
Adding tables .......................................................................................................56
Manipulating tables in the universe structure.................................................59
Lesson 4
Creating Dimension Objects
Lesson introduction.....................................................................................................91
Describing classes and objects ..................................................................................92
Classes....................................................................................................................92
Objects....................................................................................................................93
Creating classes and objects ......................................................................................95
Creating classes....................................................................................................95
Automatically creating classes and objects from a table ...............................97
Defining a new object as a detail object............................................................98
Working with classes and subclasses................................................................99
Editing the object properties...............................................................................99
Edit Properties: Properties................................................................................102
Edit Properties: Advanced................................................................................103
Edit Properties: Keys..........................................................................................104
Edit Properties: Source Information................................................................104
Copying and pasting objects.............................................................................105
Lesson 5
Creating Measure Objects
Lesson introduction...................................................................................................119
Defining measure object concepts...........................................................................120
Measure objects concepts..................................................................................120
How a measure object infers SQL ...................................................................121
The query process .............................................................................................122
Aggregation at SELECT level...........................................................................123
Aggregation at projection level........................................................................123
Setting selection and projection aggregates...................................................124
Creating measure objects..........................................................................................125
Measure objects .................................................................................................125
Testing measure objects.....................................................................................126
Activity: Creating and testing measure objects.............................................127
Creating delegated measure objects........................................................................131
What is a delegated measure?..........................................................................131
How does the delegated measure work?........................................................132
Using a delegated measure as a weighted average.......................................132
Best practices for using delegated measures..................................................134
When are delegated measures inappropriate?..............................................135
Activity: Creating and using a delegated measure ......................................135
Quiz: Creating measure objects...............................................................................138
Lesson summary........................................................................................................139
Lesson 6
Resolving Loops in a Universe
Lesson introduction...................................................................................................141
Understanding loops ................................................................................................142
Recognizing loops..............................................................................................142
Problems caused by loops ................................................................................142
Loops in a universe schema and not in the database ...................................143
What is the loop doing?.....................................................................................143
Resolving loops ..................................................................................................144
Resolving loops using aliases ..................................................................................145
About aliases ......................................................................................................145
Detecting loops and inserting aliases .............................................................145
Lesson 7
Resolving SQL Traps
Lesson introduction...................................................................................................173
Understanding SQL traps and universes ..............................................................174
About SQL traps ................................................................................................174
Detecting and resolving chasm traps......................................................................175
Chasm traps .......................................................................................................175
Detecting chasm traps ......................................................................................176
The chasm trap scenario ...................................................................................176
Resolving chasm traps ......................................................................................179
Using multiple SQL statements for each measure to resolve chasm
traps......................................................................................................................179
Drawbacks to the multiple SQL statements for each measure
method.................................................................................................................181
Using contexts to resolve chasm traps ...........................................................183
Activity: Resolving chasm traps.......................................................................184
Detecting and resolving fan traps ..........................................................................188
Fan traps .............................................................................................................188
The fan trap scenario ........................................................................................189
Resolving fan traps.............................................................................................191
Using aliases and contexts to resolve fan traps.............................................192
Scenario of a fan trap with two tables in a one-to-many relationship........193
Avoiding fan traps altogether .........................................................................195
Activity: Resolving fan traps............................................................................196
Quiz: Resolving SQL traps ......................................................................................200
Lesson summary........................................................................................................201
Lesson 9
Using @functions with Objects
Lesson introduction...................................................................................................217
Using @functions.......................................................................................................218
Defining @functions ..........................................................................................218
@prompt .............................................................................................................218
@prompt syntax .................................................................................................219
@select..................................................................................................................223
@where.................................................................................................................225
@aggregate_aware..............................................................................................229
Activity: Using @functions...............................................................................230
Quiz: Using @functions with objects .....................................................................232
Lesson summary........................................................................................................233
Lesson 10
Using Hierarchies
Lesson introduction...................................................................................................235
Understanding hierarchies and universes ............................................................236
Hierarchies..........................................................................................................236
Working with hierarchies ........................................................................................238
Default hierarchies ............................................................................................238
Custom hierarchies............................................................................................241
The effect of custom hierarchies on default hierarchies ..............................242
Time hierarchies ................................................................................................244
Testing automatic time hierarchies .................................................................247
Advantages and disadvantages of automatic time hierarchies ..................248
Lesson 11
Using Lists of Values
Lesson introduction...................................................................................................257
Creating a list of values ............................................................................................258
What is a list of values?.....................................................................................258
Using a list of values (LOV)..............................................................................258
Working with LOVs in Universe Designer ...........................................................259
Associating an LOV with an object..................................................................259
Setting options for generating LOVs ..............................................................261
Editing the LOVs for the entire universe .......................................................262
Adding data to the list by adding columns ...................................................263
Creating a cascading LOV .......................................................................................265
Setting up a cascading LOV .............................................................................265
Activity: Using a cascading LOV in Web Intelligence Rich Client.............267
Quiz: Using lists of values .......................................................................................268
Lesson summary........................................................................................................269
Lesson 12
Creating Derived Tables and Indexes
Lesson introduction...................................................................................................271
Using derived tables .................................................................................................272
What is a derived table?....................................................................................272
Adding derived tables ......................................................................................272
Derived tables as lookup for multiple contexts.............................................274
Nested derived tables........................................................................................276
Creating nested derived tables.........................................................................276
Activity: Adding derived tables.......................................................................278
Applying index awareness ......................................................................................280
What is index awareness?.................................................................................280
Setting up index awareness..............................................................................280
Using an index awareness WHERE clause.....................................................283
Activity: Setting up index awareness..............................................................283
Quiz: Derived tables and indexes ...........................................................................285
Lesson summary........................................................................................................286
Lesson 14
Applying Universe Access Restrictions
Lesson introduction...................................................................................................301
Setting access restrictions on a universe ................................................................302
About security and universes ..........................................................................302
Completing your restriction set settings.........................................................315
Setting restriction group priority.....................................................................318
Viewing user and group restrictions...............................................................319
Activity: Setting access restrictions..................................................................321
Quiz: Applying universe access restrictions .........................................................322
Lesson summary .......................................................................................................323
Lesson 15
Managing Universes
Lesson introduction...................................................................................................325
Documenting universes ...........................................................................................326
Printing universe details...................................................................................326
Printing options: General..................................................................................328
Printing options: List Components..................................................................328
Printing options: Full Description...................................................................329
Deploying universes..................................................................................................330
About deploying a universe ............................................................................330
What happens when you export a universe?.................................................330
Importing a universe.........................................................................................334
Working with multiple designers....................................................................335
Appendix A
End-of-Course Challenge
Completing the end-of-course challenge...............................................................351
Customer scenario.....................................................................................................352
Activity: Completing the end-of-course challenge - part 1..................................353
Activity: Completing the end-of-course challenge - part 2..................................354
Appendix B
Understanding Relational and Dimensional
Modeling
Understanding the metadata...................................................................................355
Data warehouses........................................................................................................356
Online Transactional Processing systems..............................................................357
Data Marts...................................................................................................................358
Dimensional Modeling..............................................................................................359
Appendix C
SQL syntaxes for other RDBMS
Alternative SQL syntaxes for other RDBMS..........................................................361
ORACLE......................................................................................................................361
DB2...............................................................................................................................363
MySQL.........................................................................................................................365
Microsoft Access........................................................................................................367
Answer Key
Quiz: Understanding BusinessObjects universes.................................................371
Quiz: Creating the course universe.........................................................................372
Quiz: Building the universe structure....................................................................373
Lesson 1
Understanding BusinessObjects Universes.....................45 minutes
❒ Defining BusinessObjects universe concepts
❒ Using the universe development cycle
Lesson 2
Creating the Course Universe...............................................30 minutes
❒ Describing the course database and universe
❒ Creating the universe
Lesson 3
Building the Universe Structure...........................................45 minutes
❒ Populating the universe structure
❒ Defining joins in a universe
Lesson 4
Creating Dimension Objects..................................................75 minutes
❒ Describing classes and objects
❒ Creating classes and objects
Lesson 5
Creating Measure Objects.........................................................1.5 hours
❒ Defining measure object concepts
❒ Creating measure objects
❒ Creating delegated measure objects
Lesson 6
Resolving Loops in a Universe....................................................3 hours
❒ Understanding loops
❒ Resolving loops using aliases
❒ Resolving loops using contexts
Lesson 8
Applying Restrictions on Objects.................................................1 hour
❒ Restricting the data returned by objects
Lesson 9
Using @functions with Objects............................................45 minutes
❒ Using @functions
Lesson 10
Using Hierarchies......................................................................45 minutes
❒ Understanding hierarchies and universes
❒ Working with hierarchies
Lesson 11
Using Lists of Values................................................................30 minutes
❒ Creating a list of values
❒ Working with LOVs in Universe Designer
❒ Creating a cascading LOV
Lesson 12
Creating Derived Tables and Indexes.................................75 minutes
❒ Using derived tables
❒ Applying index awareness
Lesson 13
Linking Universes......................................................................30 minutes
❒ Understanding linked universes
❒ Creating links between universes
Lesson 14
Applying Universe Access Restrictions.....................................1 hour
❒ Setting access restrictions on a universe
Agenda—Learner’s Guide xv
xvi Universe Design—Learner’s Guide
About this Course
Course introduction
This section explains the conventions used in the course and in this training guide.
Course audience
This course is designed to teach you how to design BusinessObjects universes using Universe
Designer; using BusinessObjects 6.5, BusinessObjects XI R1/R2, or BusinessObjects XI 3.0/3.1.
New features covered in the XI 3.0/3.1 course that are not applicable to BusinessObjects 6.5 or
XI R1/R2 learners include:
• Creating a cascading list of values associated with a hierarchy of objects in a universe
• Creating delegated measures
• Creating nested derived tables
• Using Translation Manager
• Testing universe results in Web Intelligence Rich Client
The target audience for this course is anyone responsible for creating and designing universes
using Universe Designer, using BusinessObjects XI 3.0/3.1.
Prerequisites
If you want to learn BusinessObjects Web Intelligence™ Rich Client reporting skills and concepts,
this course is recommended:
• BusinessObjects Web Intelligence XI 3.0/3.1: Report Design
If you want to increase your skill level and knowledge of BusinessObjects Web Intelligence™
XI reporting skills and concepts, this course is recommended:
• BusinessObjects Web Intelligence XI R2: Report Design
To be successful, you must have working knowledge of:
• SQL and relational database management systems concepts and structures
• Familiarity with the type of data and the logical structure of the databases in their
organization
• Familiarity with BusinessObjects Web Intelligence report building
Course setup
Refer to the setup guide for details on hardware, software, and course-specific requirements.
Course materials
The materials included with the course materials are:
• Name card
• Learner’s Guide
The Learner’s Guide contains an agenda, learner materials, and practice activities.
The Learner’s Guide is designed to assist students who attend the classroom-based course
and outlines what learners can expect to achieve by participating in this course.
• Evaluation form
At the conclusion of this course, you will receive an electronic feedback form as part of our
evaluation process. Provide feedback on the course content, instructor, and facility. Your
comments will assist us to improve future courses.
Introduction
Why am I here? What’s in it for me?
The learners will be clear about what they are getting out of each lesson.
Objectives
How do I achieve the outcome?
The learners will assimilate new concepts and how to apply the ideas presented in the lesson.
This step sets the groundwork for practice.
Practice
How do I do it?
The learners will demonstrate their knowledge as well as their hands-on skills through the
activities.
Review
How did I do?
The learners will have an opportunity to review what they have learned during the lesson.
Review reinforces why it is important to learn particular concepts or skills.
Summary
Where have I been and where am I going?
The summary acts as a recap of the learning objectives and as a transition to the next section.
Lesson introduction
To design effective and efficient universes for your business users, you need a general
understanding of their structure and application. It is also important to become familiar with
the process involved in building a successful universe.
After completing this lesson, you will be able to:
• Define BusinessObjects universe concepts
• Use the universe development cycle
What is a universe?
The BusinessObjects universe is the semantic layer that isolates business users from the technical
complexities of the databases where their corporate information is stored.
For the ease of the end user, universes are made up of objects and classes that map to data in
the database, using everyday terms that describe their business environment. This means that
by using a universe to create a query, users can retrieve exactly the data that interests them
using their own business terminology.
Snowflake schemas
The snowflake schema is a variation of the star schema used in a data warehouse. It is more
complex than the star schema because the tables which describe the dimensions are normalized.
Data modeling
The traditional entity relationship (ER) model uses a normalized approach to database design.
Database normalization is a technique for designing relational database tables to minimize
duplication of information and to avoid data anomalies. Higher degrees of normalization
typically involve more tables and create the need for a larger number of joins, which can reduce
performance.
Denormalization is the process of taking a normalized database and modifying table structures
to optimize the performance by keeping a minimum relationship between tables; one dimension
table versus one fact table. Another method is to use prebuilt summarized data in the schema.
As the universe designer, you use Universe Designer to create objects and classes that represent
database structures. The objects you create in the universe must be relevant to the end user’s
business environment and vocabulary.
Classes
A class is a logical grouping of objects within a universe. It represents a category of objects.
The name of a class should indicate the category of the objects that it contains. A class can be
divided hierarchically into subclasses.
Advantages of a universe
The advantages of a universe are:
• Only the universe designer needs to know how to write SQL and understand the structure
of the target database.
• The interface allows you to create a universe in an easy-to-use graphical environment.
• Data is secure. Users can see only the data exposed by the universe. Users can only read
data, not edit it.
• The results are reliable and the universe is relatively easy to maintain.
• Users can use a simple interface to create reports.
• All users work with consistent business terminology.
• Users can analyze data locally.
Importing a universe
When you import a universe, you import the latest version of the universe from the repository.
The universe is copied to the local file system, and this file is opened in Universe Designer.
You can import one or more universes stored in a universe folder in the repository.
4. Verify the file path for the import folder in the Import Folder box.
This location is where the universes are exported.
5. Click OK.
Menu options
You can perform most tasks by choosing options from the menu. The Universe Designer menu
bar looks like this:
Toolbar buttons
The toolbar gives you quick access to many tasks. Universe Designer has three toolbars: the
Standard toolbar, the Editing toolbar, and the Formula Bar toolbar.
Zoom
Often it is not possible to view the entire schema at normal magnification due to its size. Zoom
in or out using the drop-down list on the toolbar to choose your percentage view for the schema.
Arrange tables
You can select this button to have Universe Designer automatically organize your tables
sequentially and horizontally.
Note: You can undo only the last command. If you do not like the arrange tables results, choose
Undo from the Edit menu.
For example:
Procedure Action
To gain a partial view of the data content of Right-click the table header and choose the
the table View Table Values option.
To view the data values for a single column By default, data is only displayed for the first
100 rows of the table. This number can be
expanded or reduced using the Tools ➤
Options ➤ Database tab.
Instructions
1. Open Universe Designer.
2. In Universe Designer, click File ➤ Import. Browse to the eFashion.unv sample universe
file in the location specified by the instructor.
3. Explore the menu options, toolbar buttons, and right-click drop-down menus.
4. Select View ➤ Toolbars, and ensure that all three toolbars are selected.
5. Zoom to 125% (type directly into the field instead of using the drop-down list).
6. Click View ➤ Arrange Tables to automatically organize tables.
7. Click View ➤ List Mode to list all tables, joins, and contexts.
8. Click the Article_Color_Lookup table in the Tables list and to see it highlighted in the
structure below.
9. Select Tools ➤ Options and click the Graphics menu tab.
10.Select the Show row count check box, and click OK.
11.Right-click the Article_Color_Lookup table to view the number of rows in the table (Refresh
row count for all tables).
The analysis of user requirements and design are the most important stages in the process.
Users must be heavily involved in the development process if the universe is going to fulfill
their needs both with the business language used to name objects and the data that can be
accessed.
Implementation will be successful if the first three stages are carried out properly. It is advisable
to spend 80% of the time allocated to the development of a universe on the first three stages:
• Preparing.
• Analyzing.
• Planning.
Preparation phase
During the preparation phase, the scope of a BusinessObjects universe is defined. The production
and development architectures are identified and reviewed. Project teams are assembled and
the initial task plan is defined.
The definition and communication of project scope eliminates risk associated with deploying
the universe to pilot users during the Implementation phase. The scope is defined in terms of
intended functionality of the universe. Identification of target users of the universe also helps
create a shared understanding of project objectives.
Key managers should be involved in the scoping process. Once formulated, the objectives of
the project are communicated to everyone involved, directly or indirectly.
In designating the team members, individuals must be chosen to fill the following roles. One
person may fill multiple roles.
Role Task
Users who work with the universe during the universe build and
Pilot Users
development phase.
In most cases, a single person is responsible for the bulk of the work, filling the roles of Analyst,
BusinessObjects Administrator, and Data Expert.
In designing and building the universe, this person maintains a relationship with the Key User,
who should also be one of the Pilot Users.
This developer usually reports to a Manager or IS Director, who serves as Project Leader. The
Leader maintains a close relationship with the Sponsor.
Other roles that will be impacted by the project include the Database Administrator, the System
Administrator, and the Data Administrator.
Adopt standards
Conduct a meeting
Communicate the preparation phase strategy in a meeting. This is your opportunity to gather
all interested parties (developers, users, the sponsor) to ensure that everyone understands the
scope of the endeavor.
Analysis phase
The primary objective of analysis activities is to identify user requirements for the ad hoc query
environment.
These requirements are captured in the form of candidate classes and objects.
There are many places to look for candidate objects. The best way to identify them is by talking
to the end users. When interviewing end users, the type of questions to ask are: “What type of
information do you need to do your job?”, “How do you know you are doing well?”, “How
does your boss know you are performing well?”, or “What kind of information do others ask
you for?”
As users answer these questions, document their answers in terms of class and object
requirements. For example, if a user states, “We need to retrieve information on employees by
department and hire date” you have identified a potential class (“information about employees”)
and an object or two (“department” and “hire date”). When you identify a potential class, probe
for objects. For example, “What kind of information about employees do they want?”
Candidate classes and objects can also be identified by reviewing existing reports.
Document your classes and objects. For example:
You should also try to document the qualification of objects (dimension/detail/ measure) and
any potentially identified hierarchies.
Planning phase
The planning phase is used to identify a project strategy and determine resource requirements.
The project plan is the key to timely implementation. For each task, the plan should assign
responsibility and target dates. Creation of the plan and the tracking of progress against the
plan are the primary responsibilities of the project leader.
Technical architecture requirements may have been looked at in general in the preparation
phase. A review of the technical architecture should take place during the planning phase of
the project. Items to review include:
Production
Identify resources required for a universe production environment.
environment
Support plan Develop support policy for when the universe goes into production.
Implementation phase
The implementation phase can be split up into two stages:
1. Designing the schema.
2. Building the universe.
The first task during schema design is to determine and document the data source for each
candidate object. If requirements were gathered in a tabular format, add a column to the table
where you can indicate the SQL fragment and source tables that are used to retrieve the object.
Information on a customer,
including location, credit Interview
Class Customer
ratings, and shipping #1
preferences.
SQL:
This object can be combined
sum(order_lines.quantity*
Object Total with date ranges, customers, Interview
products.price)
(Measure) Revenue and/or products to provide #3,4
Source Tables: Order_Lines, meaningful measures.
Products
Any candidate classes that were captured as general requirements without specific objects
must be expanded now. For example, suppose there was a candidate class called “Customer”
and the specific objects within this class were not identified. During the schema design stage,
the developer must “fill out” this class. The developer might fill it out based on knowledge of
the business by including all columns from one or more tables, or the developer might go back
to users for more detail.
There are several ways that objects can be mapped to enterprise data. Simple objects map back
to a single column in the database. An example would be "Customer First Name", which maps
back to the First_Name column in the Customers table. Complex objects make use of SQL to
manipulate data that comes from one or more columns. For example, a "Customer Full Name"
object might connect the First_Name and Last_Name columns from the Customers table.
Aggregate objects involve SQL GROUP functions. Counts, sums, and averages are all aggregate
objects. The Total Revenue object is an aggregate object; it uses the SQL SUM function.
Once the schema design stage is complete, the development team is ready to begin using the
BusinessObjects Universe Designer software to build the universe.
Tip: Remember that it is better to have several smaller less complex universes than one large
universe. This reduces maintenance, avoids potential security impacts and will improve overall
usability.
Pilot users then begin to use the universe. They provide feedback to developers who refine the
universe until build is completed.
Testing phase
The pilot testing and refinement phase follows universe design implementation.
Once an initial universe is built, it is deployed to the pilot users. These users work with the
universe and provide feedback to the developers.
Types of feedback include:
• Better names for classes and objects.
• Objects not in the universe that should be added.
• Objects that can be removed.
• Better ways to organize objects (for example, move an object from one class to another,
reclassifying a dimension as a detail, and so on).
• Objects or queries that do not behave as expected.
Based on this feedback, the universe is modified. The modified universe is made available to
the pilot users for further evaluation. The testing phase can also address potential performance
issues. As a developer you can look at implementing performance enhancements to the universe.
Quality assurance
After the build is finalized, the universe is reviewed for quality assurance.
An independent reviewer makes the following checks:
• Corporate standards for universe, object, class, and alias naming are followed.
• Objects are only defined with tables that are referenced in the SELECT or WHERE clauses
• Objects return results without syntactic error.
• Objects return intended business results.
• Objects are correctly classified as dimensions, details or measures.
• Defined hierarchies make sense.
• Objects have help text.
• Aliases are used appropriately.
• Join syntax and foreign keys are accurate.
• Standard and outer joins are used appropriately.
These checks are best made by an individual who was not part of the development of the
universe, guaranteeing an objective perspective. Any issues that are identified are reported to
the developers for correction and review.
Architecture
Architectural considerations identified during the planning phase are reviewed. Any issues
that have not been resolved delay the deployment phase.
Production environment
The production environment has been set up in accordance with the architecture and security
plans identified during preparation and planning. The universe is modified to access data from
production systems, rather than from development systems and is exported to the production
repository.
Any database accounts that are required for BusinessObjects users should be created by the
database administrator. These accounts should be given appropriate access privileges to the
data objects used by the universe.
Users are also added to the Central Management System (CMS) and granted access to the
universe.
Conduct training
The release of the BusinessObjects universe to production users is coordinated with system
and database administrators as appropriate. The user training program is executed in conjunction
with the roll-out of the universe. Without appropriate training, users will not derive benefits
from BusinessObjects, regardless of the quality of the universe.
Prepackaged solutions
If you are designing a universe for Business Objects developers for developing precreated/
prepackaged reports, then the following items should be taken into consideration:
• Predefine all filters and calculations that are used in standard documents, to remain consistent
throughout.
• The universe can cover more than one business function, to allow cross functional reporting.
Precreated reports tend to cross reference reports against different business functions. The
universe, therefore, has to cover multiple business functions to provide end-to-end business
reporting.
Instructions
1. Launch the Planning_universe_activity.html file, from the course resources, to familiarize
yourself with the universe development cycle and to complete the activity questions.
2. Use this checklist of questions you need to ask when you begin designing a universe:
• What are the target data sources for your universes?
• What is the schema/structure of each of these data sources?
• Do you know the contents of each of the tables?
• Do you know how each of the tables are interrelated?
• Are you familiar with all of the necessary joins?
• Are you familiar with the cardinality of each of these joins?
• Have you procured database schemas from the database administrators who administrate
the data sources?
• Are you familiar with your different user populations and how they are structured?
• Do you know what standard reports are required?
3. Where can you define what specific information about the universe gets printed?
Lesson introduction
This lesson introduces you to the database that is used in this course. It teaches you how to
create a new universe and define a connection from the universe to the course database.
To create a new universe and maximize its potential, it is necessary to learn about parameters.
Parameters allow you to set the structure of your universe, including setting up a database
connection.
After completing this lesson, you will be able to:
• Describe the course database and universe
• Create the course universes
Assumptions
• There has been no inflation over the different years for which data is held.
• There is no stock data. All manufacturers are able to supply on demand.
• Users in all countries use the same currency (the US dollar).
• No new models have been brought out during the period.
2. A report is required which lists the showrooms, their location and which manufacturers
they have a dealership agreement with.
Note: Most users are required to run reports on both sales and rentals.
Development plan
The remainder of this course is spent developing universes for this imaginary deployment. In
accordance with the iterative approach, the development is phased as indicated below.
1. Design and develop a universe which enables end users to build reports which meet
requirements 1 (model reporting) and 3 (sales reporting). The universe needed to do this
can be regarded as relatively simple to create.
2. Extend the universe to meet reporting requirements 2 (franchise reporting) and 4 (rental
reporting). This requires the introduction of loops, chasm and fan traps into the universe
structure which need to be resolved. This constitutes a fairly complex universe structure.
4. Design and develop a universe for end users that enables them to build reports which meet
requirements 5 (ad hoc reporting on employees).
OLE DB connectivity
OLE DB (Object Linking and Embedding, Database) is an API, based on a set of interfaces
implemented using the Component Object Model (COM), designed by Microsoft for accessing
different types of data stored in a uniform manner. These interfaces support the amount of
5. In the Name box, type a name that identifies the database you want to connect to.
6. In the Server box, type or select the name of the server on which SQL Server is installed.
7. Click Next.
8. For the authentication, select the appropriate method for SQL Server to authenticate the
login ID.
Depending on the selected option, type in the required Windows or SQL Server authentication
user name and password.
9. Select the Change the default database to check box, and then select the database to connect
to from the drop-down list.
10.Click Next, and then click Finish.
11.Click Test Data Source.
You should get the message TESTS COMPLETED SUCCESSFULLY.
If you don’t get this message, review your steps and verify the added authentication
credentials.
3. Click Next.
The Database Middleware Selection page appears. It lists the database and middleware
that correspond to your data access driver key.
4. Select the connection type from the Connection Type drop-down list.
Note: In order to deploy a universe to the BusinessObjects repository, you must define this
connection type as "Secured".
6. Expand the + box for the target database for the connection.
The supported middleware for that database appears in the expanded area.
7. Expand the + box for the target middleware for the connection.
The data access drivers for the middleware appears.
3. Click Next.
The Database Middleware Selection page appears. It lists the database and middleware
that correspond to your data access driver key.
4. Select the connection type from the Connection Type drop-down list.
Note: To deploy a universe to the BusinessObjects repository, you must define this
connection type as "Secured".
5. In the Connection Name field, type the appropriate data source name for the database to
which you are connecting.
You can enter up to 35 characters.
6. Expand the + box for the target database for the connection.
The supported middleware for that database appears in the expanded area.
7. Expand the + box for the target middleware for the connection.
The data access drivers for the middleware appears.
The Wizard Connection dialog box appears with the Connections List page. This list displays
all the connections available to the designer, regardless of the universes.
To edit a connection
1. Click Tools ➤ Connections.
2. Select the connection that requires editing from the list of available connections.
3. Click Edit.
The Login Parameters page for the connection appears.
4. Modify the login parameters or select a different data source for the connection.
5. Click Next.
6. Modify the configuration parameters as required, and click Next.
7. Modify the custom parameters as required, and click Finish.
8. Click the Test button to verify the modified connection.
9. Click Finish to apply the changes to the connection.
To delete a connection
1. Click Tools ➤ Connections.
2. Select the connection you want to delete from the list of available connections.
4. Click Yes.
The connection is removed from the list.
Note: Ensure the Universe Parameters dialog box displays with the Definition tab active.
Identifier Used by
File names
A file name is created when you save the universe. The length of the name is dependent on
your operating system maximum. Windows allows approximately 156 characters. The file
name extension is .unv.
Note: Do not change the universe file name after reports have been created on that universe
or the report files no longer point to the universe.
Long names
The universe long name is set in the Name field on the Definition tab. You can enter up to 200
characters and there are no character restrictions.
Universe descriptions
The universe description is an optional field. Information in this field can provide useful details
about the universe’s role and is viewable by end users.
Universe parameters
Universe parameters are definitions and restrictions that you define for a universe. Universe
Designer allows designers to define several different parameters using the different tabs available
in the Universe Parameters dialog box.
Note: For more detailed reference information about these parameters, refer to Chapter 2 - Doing
Basic Operations, Setting Universe Parameters in the Business Objects XI 3.0/3.1 Designer’s Guide.
Parameter Description
Definition tab
On the Definition tab you can set the universe name and a meaningful description. There is
no character limitation. End users see these in their Business Objects querying tool when they
select the universe.
The Connection field displays the connection name defined against the database.
Summary tab
Information Description
Strategies tab
A strategy is a script that automatically extracts structural information from a database or flat
file. Default strategies have two principle roles:
• Automatic join and cardinality detection.
• Automatic class, object, and join creation.
Strategies are useful if you want to automate the detection and creation of structures in your
universe based on the SQL structures in the database.
Strategies that automate the creation of universe structures are not necessarily an essential part
of universe design and creation. They are useful if you are creating a universe quickly, and
you want to use metadata information that already exists in a database or database design tool.
However, if you are building a universe by creating objects and joins that are based on
relationships that come directly from a user needs analysis, then you probably not use the
automatic creation possibilities that this tab offers.
Built-in strategies are the default strategies that are shipped with Universe Designer. You can
select them by clicking the drop-down menus in this strategies parameters tab. There are built-in
Controls tab
On the Controls tab, you can limit the result size and execution times for queries that use this
universe.
The Limit execution time option allows you to restrict the execution time for any query
generated via the universe for queries generating more than one SQL statement.
The time limit that you specify for query execution is the total execution time for a query. If
the query contains multiple SQL statements, then each statement is given an execution time
equal to the total query execution time divided by the number of statements. The result is that
each statement in the query has the same execution time.
If one statement requires a lot more time than others to run, it may not complete as its execution
time does not correspond to its allotted execution time within the query.
When you specify an execution time limit for multiple SQL statements, you need to take into
account the normal execution time of the single statement that takes the longest time to run,
and multiply this value by the number of statements in the query.
If you set the Warn if cost estimate exceeds option, a message informs the user if the query is
likely to take more than the number of minutes you specify here. This mechanism is dependent
on whether the database statistics are up-to-date.
You can set controls on the types of queries that end users can build in Business Objects querying
tools.
You can indicate controls for the following areas of query generation:
• Use of subqueries.
• Use of operators and operands in individual queries.
• Generation of multiple SQL statements.
• Selection of multiple contexts.
• Prevent or warn about the occurrence of a Cartesian product.
Note: The Multiple SQL statements for each measure option is selected by default. Accepting this
default value could potentially impact query performance.
Links specify dynamic links between universes related to the same database. This allows a
universe and its content to be embedded in another universe. Embedding universes optimizes
maintenance where some objects are used in many universes.
Note: Universes need to be exported to the repository before linking.
Parameters tab
Instructions
1. Start a Universe Designer session and log on using the credentials provided by the instructor.
2. Create a new universe called Motors_xx, where "xx" stands for your initials.
3. Add the following description: This universe provides information on the Prestige
Motor Cars Database for Showrooms, Models sold, Rental and Sales Business.
4. Create a new OLE DB connection called MotorsOLEDB_xx, where "xx" stands for your
initials.
5. Save your new Motors universe via File ➤ Save As.
The universe is saved in the local universe directory.
3. If you want to distribute the completed universe to the user population using the
BusinessObjects repository, which type of connection should you use?
Lesson introduction
This lesson describes how to add tables to the universe structure and how to customize the
way you work with tables.
After completing this lesson, you will be able to:
• Populate the universe structure
• Define joins in a universe
Designing a schema
The schema contains tables and joins. Objects are mapped to columns in tables that end users
use to create reports. The joins link the tables so that the correct data is returned for queries
that are run on multiple tables.
Design the schema in the Structure pane by selecting tables from the target database using the
Table Browser. You create joins to link the tables. When you have designed the schema for
your universe, you can verify the schema using an automatic integrity check.
Good schema design is essential to good universe design. Populate the schema with tables
based on the columns that correspond to the objects that end users need to create reports. Define
the objects according to a user needs analysis. Examine the database for tables that allow you
to create these necessary objects.
Adding tables
The Structure pane of the Universe Designer interface is used to create a visual representation
of the physical data structure to which the universe is mapped. When you create a new universe,
the structure is empty and you need to populate it with the appropriate tables. Database tables
are placed in the structure using the Table Browser, which provides a list of tables in the
database.
The Table Browser is an independent window that shows a tree view of the tables and columns
in your target database. Use the Table Browser to view and select tables in your database that
From the Table Browser you can select tables to include in the universe schema. You can
insert a single table or multiple tables simultaneously.
2. Use one of the following methods to add the tables to the Structure pane:
• Click Insert.
• Drag and drop the selected tables in the Structure pane.
Each table including all of its columns appears in the Structure pane. In the Table Browser,
any table that you insert in the universe displays with a check mark beside its name.
Note: Columns cannot be selectively chosen. When you select a table, all columns are
included in the structure.
You can use various commands to manipulate tables within the Structure pane.
You can move, copy, or delete tables in the Structure pane, as well as organize and change the
table display.
To select tables
Usually the first step in moving, copying, or deleting tables is to select them.
1. To select a single table, click the table header.
2. To select several tables, press Ctrl and click the table header of each table you want to select
in turn.
3. To select all tables, press Ctrl+A or choose Edit ➤ Select All from the menu bar.
To move tables
1. Select the tables you want to move.
2. Drag the tables to a new position.
To delete tables
1. Select the tables you want to delete.
2. Press the Delete key.
2. If you select View ➤ Change Table Display, Ctrl+T, or double-click a second time, only
the join columns display in the table.
Join columns only display:
If you repeat one of those actions a third time, the original table view appears again.
3. Click Close.
Instructions
1. Insert the tables listed below into your blank Motors universe.
• CLIENT
• COLOUR
2. Order the tables so that they are laid out in the same way as the illustration below.
4. Drag the mouse to the column in another table that you want to be the other end of the join.
As you drag, the pointer changes into a pencil symbol.
3. Click the name of the column that you want to be at one end of the new join.
4. Select a table from the Table2 drop-down list box.
The columns for the selected table appear in the list box under the table name.
5. Click the name of the column that you want to be at the other end of the new join.
The join expression is dynamically built in the zones below and can be modified as necessary.
6. Click OK.
The new join appears in the schema, linking the two tables and columns that you specified
in the Edit Join dialog box.
Property Description
Table at the left end of the join. Columns are listed for the table
Table1
selected in the drop-down list.
Table at the right side of the join. Columns are listed for the table
Table2
selected in the drop-down list.
Cardinality When selected, allows you to define the cardinality for the join.
Join operators
You can select an operator for a join from the drop-down list between the Table1 and Table2
selection boxes. The operator allows you to define the restriction that the join uses to match
data between the joined columns.
You can select the following operators for a join:
Operator Description
= equal to
!= not equal to
Edit
The Edit button opens an SQL editor. Use this graphic editor to modify the syntax for tables,
columns, operators, and functions used in the join.
Parse
The Parse button starts a parsing function that verifies the SQL syntax of the join expression.
If the parse is successful, you receive a result is OK message. If Universe Designer encounters
an error, you receive an error message indicating the source of the problem.
Change a column at either join end Expand the table + box in the Tables and
Columns selection box and double-click on
a new column name.
3. Click the join or joins you want to accept in the Candidate Joins dialog box.
Note: You can accept and insert several joins at the same time using Shift-click or Ctrl-click.
4. Click Insert.
The join or joins are inserted in the Structure pane.
5. Click Close.
About cardinality
Cardinality is the means by which Universe Designer identifies the relationships between tables
in the universe structure. The cardinality can be:
• One-to-one (1-1).
• One-to-many (1-N).
For example, a country can have many regions, so the relationship between a Country and a
Region table is 1-N.
Universe Designer uses cardinality to detect and resolve loops.
Note: It is very important that all cardinalities are set correctly for loop and context detection.
You can choose to set cardinality manually or by using an automatic detection tool.
For these reasons, you are strongly advised to apply cardinality manually for efficiency and
accuracy.
When you set cardinalities manually, you must consider each individual join. This helps you
to become aware of potential join path problems in your schema.
You may not find these problems if you only select automatically detected cardinalities; for
example, isolated one-to-one joins at the end of a join path, or excessive primary keys where
not all columns are required to ensure uniqueness.
2. To set the cardinality manually, click the appropriate 1 and N option buttons in the
Cardinality zone.
Note: 1 = one end of join; N = many end of join.
Tip: As you click the different options in the Cardinality zone, a message appears below
the buttons to describe the relationship between the tables, based on the settings you select.
Displaying cardinalities
You can display cardinalities in the Structure pane using the following symbols:
Cardinality is shown as a
1,N
ratio at each end of the join.
To display cardinalities
1. Select Tools ➤ Options from the menu bar.
2. The Options dialog box opens to the General page.
3. Click the Graphics tab.
The Graphics page appears.
The results of the three queries are then compared in an attempt to determine which query is
the end of the join with one entity and which is the end with many (if there is one).
Universe Designer requests confirmation because executing the detection tool takes a long
time if it is being applied to a large database.
3. If you are sure you want to use the automatic detection tool, click OK to detect the
cardinalities.
4. Universe Designer offers yet another method for detecting cardinalities automatically:
1. Select Tools ➤ Options from the menu bar.
2. Click the Database tab.
3. Select the Detect cardinalities in joins check box.
4. Click OK.
Equi-joins
An equi-join is a restriction that conforms to the syntax set out below:
Table1.column_a = Table2.column_a
An equi-join is a join based on column values between two tables. In a normalized database,
the columns used in an equi-join are often the primary key from one table and the foreign key
in the other. A primary key of a relational table uniquely identifies each record in the table.
Primary keys may consist of a single attribute or multiple attributes in combination. A foreign
key is a field in a relational table that matches the primary key column of another table.
Outer joins
An outer join is a join that links two tables, one of which has rows that may not match those
in the common column of the other table.
You define an outer join by specifying which table is the outer table in the original equi-join.
The outer table contains the column for which you want to return all values, even if they are
unmatched. You specify the outer table from the Edit Join dialog box for the selected join.
For instance, the example illustrated above shows the Country and Region tables from a
database. Note that there are three different values in the primary key of the Country table and
only two distinct values in the corresponding foreign key of the Region table. If you were to
apply an equi-join, the result set of a query would only show information on US and UK.
However, you may wish to show all three countries irrespective of equivalent foreign key
values in the Region table. To achieve this, use an outer join.
In specifying an outer join in a standard SQL SELECT statement, you are required to identify
which of the two tables is the outer. Using straight SQL (as opposed to generating it using a
universe), the problem is that different RDBMS define outer differently and the syntax of the
Once this is done, the correct outer join is inferred when used in the generated query, and the
syntax is correctly inferred for the appropriate RDBMS (assuming you have the correct SQL
inference driver).
An outer join is shown by a small circle on the join line in the universe structure at the end that
points to the table that may have missing values.
Theta joins
A theta join is a “between-type” join that links tables based on a relationship other than equality
between two columns. It is used to demonstrate ranges, such as start date and end date, or
minimum and maximum. A theta join can use any operator other than the equal operator.
For instance, there is a table in the Motors database called Sales_Price_Range. This contains a
number of rows defining fixed price ranges by which you may wish to analyze data as illustrated
above.
To do this, the table needs to be included in the universe structure and a join set. The obvious
table to join it to is the Model table which includes the price of a model. However, there is no
common column between the Sales_Price_Range and Model tables so an equi-join cannot be
used. Instead you need to infer that a join exists where the value in a row of the Model_Price
column in the Model table is between the values in a row for the Price_Range_Min and
Price_Range_Max columns of the Sales_Price_Range table.
5. Press and hold down the Ctrl key and click two columns from the Table2 column list box.
Note: The operand changes to Between automatically, and indicates that the join expression
is dynamically built as a BETWEEN syntax.
6. Click the Parse button to test for the validity of the join.
If you receive an error message, check to see that you have correctly selected the columns.
7. Set the correct cardinality.
8. Click OK.
The theta join now appears between the two selected tables.
Shortcut joins
A common use of shortcut joins is to link a shared lookup table to another table further along
a join path. The join path is comprised of several different tables in the same context.
A shortcut join is a join that provides an alternate path between two tables. It improves the
performance of a query by not taking into account intermediate tables, and shortening a normally
longer join path.
Self-restricting joins
A self-restricting join is not really a join at all, but a self-restriction on a single table, usually a
transaction table. You can use a self-restricting join to restrict the results returned by a table
using a fixed value.
The table in the example above contains rows of data for cars both sold and rented. The sale
type column is used as a flag to indicate the type of transaction. Without the self-restricting
join, the results set of the query would produce rows where the sale type column is equal to
either car sales ('S') or car rental ('R'). With the self-restricting join expression set to sale type
equal to ‘S’, any object based on the table or joins passing through that table would produce
query results covering only car sales.
3. Click the column that you want to use to define the restriction from the column drop-down
list box.
4. From the Table2 drop-down list, select the same table that you selected from the Table1
drop-down list box.
7. Click OK
The self-restricting join now appears as an unconnected join line.
You can view the join expression underlying a join line or all the join expressions for a table
using List Mode as well as the Edit Join dialog box.
3. Click a table in the Tables pane of List Mode, and click the arrow pointing to the Joins pane.
Only the joins for the selected table are shown in the Joins pane.
4. Clear the highlighted arrow to view all the joins and tables again.
5. Click the View List Mode button to return to normal view.
Checking integrity
Use the Check Integrity option to detect any errors in the structure and joins of a universe.
Be careful of checking cardinality automatically for all the reasons mentioned previously. As
a general rule, never select the Check Cardinalities check box when you are checking the
integrity of your universe.
Instructions
1. Insert the following equi-join using the drag-and-drop technique:
• COUNTRY.COUNTRY_ID to REGION.COUNTRY_ID
2. Set the cardinality for the join manually in the Edit Join dialog box.
3. Insert the following equi-join using the Edit Join dialog box and set the cardinality.
• REGION.REGION_ID to CLIENT.REGION_ID
5. Notice the divergences found in the integrity check of your Motors universe, which is the
result of having unjoined tables.
MODEL.MODEL_PRICE BETWEEN
SALE_PRICE_RANGE.PRICE_RANGE_MIN AND Theta N:1
SALE_PRICE_RANGE.PRICE_RANGE_MAX
SALE.SALE_DATE BETWEEN
FINANCE_PERIOD.FP_START AND Theta N:1
FINANCE_PERIOD.FP_END
2. What are three reasons why using the automatic detection routine for setting join cardinalities
is not recommended?
Lesson introduction
This lesson describes how you can create classes and objects that are used by end users to run
queries and create reports.
After completing this lesson, you will be able to:
• Describe classes and objects
• Create classes and objects
Classes
Within a universe, objects are grouped into classes. This is done to provide a structure for the
universe and makes it easier for users to locate particular objects. The strategy most often
employed is to group related dimension and detail objects into one class and place measure
objects into a unique and single-measures class.
This strategy can be extended by introducing subclasses to break down the objects into further
subsets.
Each object in a universe must be contained within a class. You can create new classes and edit
the properties of existing classes. Classes are represented as folders on a tree hierarchy in the
Universe pane.
In Universe Designer, you can qualify an object as being one of three types:
Dimension objects, where possible, tend to be organized hierarchically within a class. This is
important if you intend to make use of default hierarchies for drilling. Detail objects are
organized below their associated dimension objects.
Note: Detail objects cannot be included in a drill path.
Measure objects may be grouped in a separate class. This makes them easier for the user to
find and also emphasizes the fact that they can be used with any dimension or detail object.
Note: Only dimension objects can be merged to synchronize queries from multiple data sources
in end-user querying tools.
Objects
In Business Objects products, an object is a named component in a universe that represents a
column or function in a database.
In Universe Designer, objects appear as icons in the Universe pane. Each object represents a
meaningful entity, fact, or calculation used in an end user’s business environment. The objects
that you create in the Universe pane in Universe Designer are the objects that end users see
and use in the Business Objects end-user querying tools.
For example, in the Web Intelligence Rich Client Query Panel, users drag objects from the Data
tab into the Result Objects pane to run queries and create reports that display the data returned
by the query.
Each object maps to a column or function in the target database, and when an object is selected
in the Query Panel, the object infers a SELECT statement. When multiple objects are combined,
a SELECT statement is run on the database which includes the SQL inferred by each object and
a default WHERE clause.
Creating classes
A class is a logical grouping of objects within a universe. It represents a category of objects.
The name of a class should indicate the category of the objects that it contains. A class can be
divided hierarchically into subclasses.
There are two ways to create a class in the Universe pane:
• Manually defining a class.
• Automatically by dragging a table from the Structure pane into the Universe pane.
To create a class
In Universe Designer, classes are created in the Universe pane. If the Universe pane is not
activated, it can be opened via View ➤ Universe Window.
1. Open your universe file in Universe Designer, and in the Universe pane, click an existing
class, below which you want the new class to appear.
Note: If this is the first class you are creating, ignore this step.
Note: If you create a class when an object within a class is highlighted, a subclass within
that class is created instead.
2. With the universe file open in Universe Designer, insert a new class. There are three ways
you can insert a class:
• Click the Insert Class button from the Editing toolbar.
• Select Insert ➤ Class from the menu.
• Right-click in the Universe pane and choose Class from the right-click menu.
6. Click OK.
5. Type a SELECT statement in the Select field, or click the >> button to use the SQL editor.
6. Click the Properties tab and select object properties.
7. Click OK.
4. Click the Associated Dimension field, and from the drop-down list of available dimension
objects, select the one with which this detail object is to be associated.
5. Click OK to confirm the change.
To create a subclass
1. Right-click the class in which you want to create a subclass.
The drop-down menu appears.
2. Choose Subclass.
The Edit Properties dialog box displays.
Note: The example above shows a concatenation of two columns. Depending on the RDBMS
used the syntax can vary. Consult the documentation provided by your database vendor to
see what types of concatenation functions are supported.
5. In the Select field enter the SQL statement that gets inferred when a user builds a query
using this object.
This can be done in one of two ways:
• Type the SELECT syntax in the Select field to define the columns that get referenced.
• Click the >> button to open the Edit Select Statement dialog box as displayed below.
The Edit Select Statement dialog box appears.
It is normally best to use the latter method because it enables you to specify most of the
SELECT syntax from pick lists in the lower half of the screen by double-clicking the item
required. This minimizes typing and averts syntax errors due to typing mistakes.
6. Create the SELECT statement so the object references the appropriate table columns.
Note: You can use the fields below the text box to select the columns, operators or functions
you need to use to enter the required SQL syntax.
In the Security Access Level zone you can assign the following security access levels:
• Public
• Controlled
• Restricted
• Confidential
• Private
If you assign Public, then all users can see and use the object. If you assign Restricted, then
only users with the user profile of restricted or higher can see and use the object.
In the Can be used in zone, select one of the following options to define how this object can be
used in a query:
• The Result check box - use this object to return results in a query.
• The Condition check box - use this object to apply a condition or query filter in a query.
• The Sort check box - specify the object in the ORDER BY clause of a SELECT statement.
Note: This option can increase the processing speed of a query. However, in certain edited
LOV situations, it is not useful to sort at query level because block-level sorting overrides
any row order of data that is stored in the microcube.
If you then use Country and the Client Name object in a query, the query does not need to
reference the Country table in the database; the Country data is taken from the Client table
directly.
To find a string
1. Ensure the Universe pane of the Universe Designer window is active.
Note: If the Structure pane of the universe is active, the find function searches for table
names containing the specified string.
2. Select the Universe pane, and click Find from the Standard toolbar.
The Find/Replace dialog box for finding class and objects components in the Universe pane
opens.
2. Select the Universe pane, and click Find from the Standard toolbar.
The Find/Replace dialog box for finding class and objects components in the Universe pane
opens. Select the Replace tab.
Instructions
In this workshop you create classes, subclasses, dimension, and detail objects in your Motors
universe and then test the universe’s objects and joins.
1. Create the following classes:
• Client
• Car
• Showroom
• Sales
• Finance_Period
2. Create objects for each of the classes as identified in the tables. Some of the properties for
each object have been specified for you. However, you need to determine the data type,
qualification (dimension or detail), and whether or not an LOV should be associated with
each object:
COUNTRY.COUNTRY_NAME
Country in which client
Country
resides
REGION.REGION_NAME
Region of country in
Region
which client resides
Area of Region in
CLIENT.CLIENT_AREA
which client resides (for
Area
example, county or
state)
CLIENT.CLIENT_TOWN
Town or city in which
Client Town
client resides
CLIENT.CLIENT_ID
Unique Client ID
Client ID
Number
Car class
Showroom class
SHOWROOM.SHOWROOM_TOWN
Town in which
Showroom Town
showroom exists
SHOWROOM.SHOWROOM_NAME
Name of
Showroom
showroom
Showroom SHOWROOM.SHOWROOM_ADDRESS
Address of
Address showroom
FINANCE_PERIOD.FP_YEAR
For example,
Financial Year
FY03-04
FINANCE_PERIOD.FP_MONTH
For example,
Financial Month
Month 01
4. Create objects for each of the subclasses as identified in the tables below. Some of the
properties for each object have been specified for you. However, you need to determine the
data type, qualification (dimension or detail), and whether or not an LOV should be
associated with each object.
SALES_PRICE_RANGE.PRICE_RANGE
Description of price
Price Range
range banding
Manufacturer
Model Price MODEL.MODEL_PRICE recommended retail
price
Invoice ID SALE.SALE_ID
Unique Invoice ID
Number Number
5. Ensure you have defined each object using the appropriate object type.
The Universe pane in Universe Designer should appear similar to this:
8. Launch Web Intelligence Rich Client and log on using the credentials provided by the
instructor.
Tip: Ensure to maximize the Web Intelligence Rich Client screen to enhance visibility of
menu options.
2. When you are testing objects, what are the three things for which you need to test?
3. If each object maps to a column or function in a target database, when used in a query, what
kind of statement does the object infer?
Lesson introduction
This lesson describes how to create measure objects and test that they produce the correct
results when used in queries.
After completing this lesson, you will be able to:
• Define measure object concepts
• Create measure objects
• Create delegated measure objects
You create a measure object by using an aggregate function in the SELECT definition of the
object. The five basic aggregate functions are:
• Sum
• Count
• Average
• Maximum
• Minimum
A measure object returns numeric data from the database that aggregates up or down according
to the dimension objects in the query. The most regularly used aggregates are listed above.
However, there are others that can be used. The full set of aggregate functions is held in the
Number Functions selection list of the Edit Select Statement dialog box.
The query result shows one row of the total revenue value.
In this example, the query includes only the Sales Revenue measure so the inference engine
does not include a GROUP BY clause in the SQL statement.
When a query uses at least one dimension or detail object and a measure, the inference engine
includes a GROUP BY clause with all the objects except the measure in the SQL Statement:
• The SELECT clause shows the object(s) and measure selected in the query with the syntax
including the aggregate function.
• The GROUP BY clause includes all the objects except the aggregate.
In this example, the query includes the Sales Revenue measure and the Country object so the
inferred SQL statement includes a GROUP BY clause with the Country.
However, when you edit the table, for example, by removing a column, and therefore project
only partial data from the microcube, aggregation is required to show measure values at a
higher level. The data in the microcube remains unchanged.
• Sum • Sum
• Count • Sum
• Average • None
• Maximum • Maximum
• Minimum • Minimum
For the reports to present statistically correct results for a measure object both at query and
projection level, the SELECT and projection aggregates need to complement each other.
However, as a universe designer, if you configure a measure differently, the Business Objects
end-user querying tools will not stop you.
Note: With the exception of Average, the correct projected aggregate is selected by default. When
you set the SELECT syntax to Average, for example Avg(SALES.SALES_TOTAL), the projection
aggregation for this object would automatically be placed as a Sum. This would need to be changed
manually to None.
The projection aggregation is set in the measure object properties:
Measure objects
You create measure objects in the same way that you create a dimension or detail object. They
can be created using the automatic or manual method.
It is recommended that you group measure objects together in separate classes from dimension
and detail objects, if they are generic. In other words, if they can be used in the same query as
any dimension and detail object in the universe, then they are considered generic, and you
must group them in separate classes.
If they are only compatible with certain objects, however, then you may want to place them in
the same class as those objects, to indicate this fact to the report designers.
It is important to remember the following when you create measure objects:
Tip: It is best to use the Edit Select dialog box to insert the SELECT clause content of a measure
as you can then use the Function and Columns selection lists.
Note: When an aggregate function is used in the Edit Select dialog box, the qualification is
automatically set to Measure type.
• The results of the query. Check that the query produces the correct results.
Instructions
1. Create the following subclass in the Sales class:
• Sales Figures
2. Create measure objects in the new Sales Figures subclass as identified in the tables below.
The SQL code for the SELECT properties of each object has been specified for you. However,
you need to determine the appropriate projection function aggregate.
sum(SALE_MODEL.SALE_QTY *
MODEL.MODEL_PRICE *
Total Sale Invoice
Sales Revenue
((100 - SALE.SALE_DISCOUNT) / 100)) Revenue
Tip: When using the Number of Sars Sold, and Cost of Car Sales objects, ensure that the
result is always restricted to Sales data.
3. Create measure objects in the classes as identified in the tables below. The SQL code for the
SELECT properties of each object has been specified for you. However, you need to determine
the appropriate projection function aggregate.
Client class
7. Test the Sales Revenue measure object by adding a second query, using the following steps:
a. Edit the query created in the previous step, and click Add Query.
b. Select your universe.
c. Create a new query with Country and Sales Revenue.
Check the SQL and note the GROUP BY clause. It should contain the SQL for country.
d. Click Run Queries.
Note: You are prompted to select a way to display the new query. You can leave the
default option to add a new tab to the report or you can select the option to display the
table in the current report.
e. Apply a sum calculation to the Sales Revenue column in the new projected block. Select
the Sales Revenue column, activate the sum drop-down list in the toolbar, and select
sum. Does the sum match the value shown in the first table? Note the sales revenue value
in a row of the block (for example, USA).
When Web Intelligence Rich Client calculates the overall average sales total, it cannot take into
account the fact that the West Coast should have more weight in the calculation of the average.
Web Intelligence Rich Client does not have access to the detailed data, just to the regional
average value, returned by the Average Sales Total measure.
Running the same query using the Average Sales Total measure with the function set to Database
delegated, results in the correct average total:
Instructions
1. In Universe Designer, open your Motors universe file.
2. In the Sales Figures class, create a new measure called Average Sales Total with the following
syntax:
avg(SALE.SALES_TOTAL)
3. Save the universe and log onto Web Intelligence Rich Client.
4. Create a new query using the Region and the Average Sales Total objects. Click Run Query.
10.Create a new query with the Region, Average Sales Total, and the Delegated Sales Total
Average objects.
11.Add an average to the Average Sales Total column, as done in step 5.
12.Drag the Delegated Sales Total measure object from the Data tab and position it in the cell
at the bottom of the Delegated Sales Total column. Drop the Delegated Sales Total measure
object in the cell at the bottom of this column.
2. Measure objects are created in the same way as a dimension or detail object. However, the
object properties differ in two ways. What are they?
Lesson introduction
This lesson describes loops, a particular type of join issue that can arise as you create joins
between tables in your schema. It explains how you can detect and resolve loops to ensure that
the join paths taken by queries run on the universe return correct results.
After completing this lesson, you will be able to:
• Understand loops
• Resolve loops using aliases
• Resolve loops using contexts
Recognizing loops
A loop exists when the joins between tables form a closed path.
For example, in the table layout above, the designer has added joins between the tables
Showroom and Country to create two linked sets of information:
• One set links the car sale details, the client, the client’s region and the client’s country of
residence.
• The other set links the car sale details, the showroom, and the country where the showroom
is located.
Notice that the two joins at the top of the SQL statement are both applying a restriction to the
Country table, which is serving two purposes:
• It is being used as the Lookup for the Showroom Country.
• It is also the Lookup for the Client Country.
This creates a restriction so that data is returned only when the Showroom Country is the same
as the Client Country. Consequently, the report shows only the revenue generated by US clients
in the US showrooms and by UK clients in the UK showrooms. In summary, while the above
loop infers legitimate SQL, the results do not include all intended values. Therefore, a query
Resolving loops
Loops are an inherent problem when writing SQL statements. There are various techniques
within SQL that you can apply to resolve loops.
Loops can be resolved by creating aliases and contexts manually. However, depending on the
complexity of a universe, this can be a cumbersome task. There is functionality built into
Universe Designer that allows for automatic detection and resolution of loops. This functionality
can only be reliable if cardinality has been defined correctly for each join in the universe.
Furthermore, due to performance implications, it is recommended that all cardinality be set
manually at the time each join is created.
About aliases
An alias breaks a loop by using the same table twice in the same query for a different purpose.
The alias is identical to the base table but with a different name. The data in the alias is exactly
the same as the original table, but the different name tricks SQL into using the same database
table for two different purposes.
The Country table has already been identified as a shared lookup table because it is serving
two purposes in the query you are trying to run (providing data for the Client Country and
also for the Showroom Country). In the example above, you can see the Country table joined
to the Region table for the Client side of the query. The Country table also is the Showroom
table for the Showroom side of the query.
Note: Another way of spotting the problem table in a loop is that it only has the one end of
the one-to-many joins going into it. Check the other tables in the loop. If you find no others
with only one-end joins, the loop can be resolved using an alias, assuming there are no other
tables joined to country.
To resolve the loop, you need to use the same table (the Country table) twice in the same query
when it is being used for different purposes. However, you cannot do this in SQL unless you
create an Alias table.
You can resolve the loop satisfactorily by creating only one alias table in the example we have
been using. The Region join uses the original Country table, while the Showroom join uses the
alias table. However, you could create a separate alias table for each join in the original table.
In the past, this was necessary for some relational databases. Today, it is not necessary. However,
some universe designers prefer to alias both tables.
2. The Loop 1/1 indicates how many loops have been detected. If there are others, you can
use the forward and back arrow buttons to check each loop. The message beneath the buttons
indicates (in this case) that the loop can be resolved with an alias.
3. Click Insert Alias in the Loop Detection dialog box.
Universe Designer automatically creates an alias for the required table. You may need to
move the new alias table so that you can see the Structure pane.
Note: The original table name shows up in brackets in the alias table header.
If you have not yet set cardinalities, this message reminds you that you must do so first. If
cardinalities have already been set, the reason for the message may be a self-restricting join
within the universe structure. Cardinality is not relevant for these types of joins and so
designers tend not to set cardinality for them. However, to avoid the message, you could
make self-restricting joins one-to-one.
2. Click OK.
The Candidate Alias dialog box displays.
3. Enter the new name for the alias table and click OK.
This creates an alias table for the selected table.
Note: The original table name appears in brackets in the alias table header.
7. If there are several candidates for aliases, you can then repeat the process for the next table.
When there is only one candidate, the Candidate Alias dialog box closes.
Tip: Be careful not to delete the original table. Once you have created one or more alias
tables, it’s a good idea to click beside the original table in the Structure pane and type Aliased
table Do not remove, for example, to remind you not to delete it.
Redefining objects
When you create an alias table, check that any existing objects that are defined from the original
table still refer to the right table. They may need to be defined from the alias table to infer the
correct SQL and get the correct result.
Detect loops Can view loops before May show other loops to be
applying them. resolved by contexts.
Whichever method you choose, you must always redefine objects that now use the alias table.
Each employee is uniquely identified by the Emp_Id field, and each employee has a manager,
who is identified by the Emp_Mgr_Id field. However, the managers are themselves employees,
and the table therefore contains a hierarchical structure.
If you want to add a join to link each employee with their respective manager, the obvious way
is to link the Emp_Mgr_Id field to the Emp_Id field, as in this example:
The code used to identify the manager (Emp_Mgr_Id ) is itself an employee code. You can
therefore use it to look up the Emp_Id codes in the Employee table and identify the manager’s
name.
This is effectively a loop, as the path forms a closed circuit. However, you cannot resolve it by
using the usual method of detecting the cardinalities and then detecting aliases. This is because
the cardinality detection tool cannot work on a self-referencing join. Moreover, a structure
expressed this way does not infer the correct SQL.
Instructions
In this activity new tables, new joins, cardinality, are inserted into your Motors universe. These
result in loops in your universe structure. Resolve these loops and test the results in Web
Intelligence Rich Client.
1. Insert the following join and set its cardinality.
• COUNTRY.COUNTRY_ID = SHOWROOM.COUNTRY_ID
2. Use the Detect Loop toolbar button to test for loops in your universe. To solve the loops
that you have detected by creating alias tables, press the Insert Aliases button in the Loop
Detection dialog box, or use the Insert Alias toolbar button and create two alias tables
called:
• COUNTRY_SHOWROOM
• COUNTRY_REGION
• COUNTRY_MAKER
3. Disconnect the original COUNTRY table from the other tables and use the alias tables to
redefine the joins as follows:
• COUNTRY_SHOWROOM.COUNTRY_ID = SHOWROOM.COUNTRY_ID
• COUNTRY_REGION.COUNTRY_ID = REGION.COUNTRY_ID
• COUNTRY_MAKER.COUNTRY_ID = MAKER.COUNTRY_ID
Note: Ensure that the join cardinality for the last join is set to one-to-many (1-N).
Showroom COUNTRY_SHOWROOM.COUNTRY_NAME
Country in which
Country showroom exists
COUNTRY_REGION.COUNTRY_NAME
Country in which
Client Country
client resides
COUNTRY_MAKER.COUNTRY_NAME
Country of
Maker Country
manufacturer
10.In Universe Designer, open the your blank Staff universe. You want to report on managers
and their staff.
11.Add the EMPLOYEE table to the structure and create a self-referencing join, joining the
EMP_ID and EMP_MGR_ID columns.
12.Create a class called Staff.
13.Create an Employee dimension object based on the EMPLOYEE table. Concatenate the
employee's last name and first name.
14.Test the object by displaying the List of Values in the Properties tab.
Is this returning the correct results?
Tip: To get the query to infer the correct SQL, you need to resolve the self-referencing join
in the universe structure.
16.In the Staff class, create a Managers dimension object based on the MANAGER alias table.
Concatenate the manager's last name and first name columns.
17.Check the integrity of the Staff universe with all except the cardinality options checked.
Resolve any relevant divergence.
Tip: You should not find any divergences.
18.Save your Staff universe, and test the results in Web Intelligence Rich Client as follows:
1. Run a query using Manager and Employee. Add a count on both columns.
2. Add a query with only the Manager object. Add a count. Is this the correct value?
3. Open your Staff universe in Universe Designer and edit the Manager object. To ensure
that the data is restricted to only manager data, use the Tables button. Select the
EMPLOYEE table, to force the object to use the join between the table and restrict the
data.
4. Test the result, creating a new query with only the Manager object. It returns the correct
number of managers.
5. Edit the query and add Employee. Run and display the count. There are 26 rows. Why?
The join restricts the data to look only for employees that have managers. However, there
is a manager that does not have a manager, and is now excluded.
6. Open your Staff universe in Universe Designer and add an outer join on the MANAGER
table side.
7. Save the changes and test the results in Web Intelligence Rich Client.
About contexts
A context resolves a loop by defining a set of joins that define one specific path through tables
in a loop. It ensures that joins are not included from different paths within the same SQL query.
You often use contexts in schema that contain multiple fact tables that share lookup tables.
An example of this situation is the Sale table in the Motors universe. The Sale table contains
rows of data for cars both sold and rented. The Sale_Type column is used as a flag to indicate
the type of transaction (S = car sale, R = car rental). Without the self-restricting join, the result
set of the query would produce rows where the Sale_Type column is equal to either ‘S’ or ‘R’.
Previously, you defined this self-restricting join to ‘S’, so that any object based on the table or
joins passing through that table would produce query results covering only car sales.
In order to retrieve data concerning rental sales as well, you need to create an alias of the Sale
table called Rental, set the self-restricting join to ‘R’ and create an alias table of the Sale_Model
table called Rental_Model. Creating the aliases tables, however, creates a loop because the
query does not know which table to go through to get to the Model, Sale, or the alias Rental
table.
You can solve this type of loop by creating two contexts which defines the correct route through
the universe structure. These routes link tables together in the structure.
What is a context?
A context is a list of joins that define a path for a query. The tables involved in the joins are
included in the context.
Any objects derived from tables included in a context are compatible with each other. When a
query is made with objects related to separate contexts, more than one SELECT statement is
inferred and run. The results of the queries are then merged in the microcube. This avoids
incorrect results that might arise due to a loop or other situation with alternative routes.
Alternative routes can exist without a loop in the universe structure.
When it is not appropriate to resolve a loop by using an alias to break the loop, the loop must
be left in place. However, this results in an error message when running an end-user query.
This is because there are two alternate routes around the structure. Contexts are used to specify
those alternate routes and ensure that a single inferred SELECT statement only includes reference
to columns from tables in one of those routes.
In the Sales and Rental example, you can follow two different paths from the Client table to
the Model table:
• By way of Rental and Rental_Model:
COUNTRY_REGION.COUNTRY_ID = COUNTRY_REGION.COUNTRY_ID =
REGION.COUNTRY_ID REGION.COUNTRY_ID
MAKER.COUNTRY_ID = MAKER.COUNTRY_ID =
COUNTRY_MAKER.COUNTRY_ID COUNTRY_MAKER.COUNTRY_ID
Note: The name of the context is normally defined by the table with only the many (N) end of
joins attached to it.
You then create different sets of objects from the tables in the different contexts. As a result,
users can run either sales or rentals queries, dependent on the objects they select.
Note: Every join (except shortcut joins) must exist in at least one context.
Detect loops Loop detection tool suggests candidates for both aliases and
contexts.
Detect contexts
Detect Contexts detects and proposes a list of contexts to create.
The first loop is highlighted in the Structure pane, and the message tells you that this loop
is not covered by any context. If other loops exist, click the forward arrow button to cycle
through the loops. Each loop is highlighted in turn, and a method of resolution is
recommended.
2. Click the Candidate Context button to see what the tool suggests.
The Candidate Contexts dialog box displays.
3. Highlight the candidate context you want to add and click the Add button.
The context moves across to the Accepted Contexts field. You can click the Rename button
to give each context a more meaningful name.
Note: You may choose to leave the original context name in brackets. This can be useful in
order to remind you that you have changed the joins in the context, while still allowing you
to view the original definition.
4. Repeat the process until you have accepted all the candidate contexts.
5. Click OK.
6. Close the Loop Detection dialog box.
The List Mode window shows the created contexts.
The Joins pane indicates the joins that are involved in the currently highlighted context. The
Structure pane highlights the tables that are involved.
7. When you have created the contexts you require to resolve the loops, save the universe.
You may have just set the cardinalities, but you can still get this message because of
self-restricting joins. The system does not set cardinality on these, and therefore displays
this message. Click OK to continue because you have set the cardinality for all of the joins.
2. Click OK.
The system displays the Candidate Contexts dialog box.
3. Highlight the candidate context you want to add and click the Add button.
You move contexts across to the Accepted Contexts field. Rename them, if required, in the
same way as when using the Loop Detection tool.
4. Repeat the process until you have accepted all the candidate contexts.
4. When you have made a selection of joins, click the Check button to have Universe Designer
check whether there are any loops in the joins you have selected.
5. In the Description field, enter the text that displays in the user module Help field.
6. Click OK to create the context and close the dialog box.
Editing a context
Sometimes, a user creates a query using objects that reference tables from opposite ends of two
contexts, for example, a query using Client Name and Model.
The Client and Model tables are on opposite sides of the Rental and Sales contexts.
As a result, there are two potential routes for the inference engine to use in the SELECT statement
so, when the end users run the query, they receive a prompt message to choose one of those
contexts.
As the term “context” is not meaningful to end users, you need to ensure that the context names
and the Help descriptions clearly indicate how the choice of context influences the results.
3. Scroll down the list of highlighted joins to verify that all required joins are included. You
can add additional joins, or remove unnecessary joins.
4. The Context Name shows the name you accepted (or altered) when you created the context.
The Join List shows all the joins that are included in the context path. The highlighted joins
are included. Modify the context name if required.
5. Click the Description field and enter a suitable explanation of the context’s purpose.
6. Click OK to close the Edit Context dialog box.
7. Click the View List Mode button to close the List Mode window.
8. Save the universe.
The description that you entered appears in the Context Selection Help dialog box in
Business Objects end-user querying tools, and the process of selecting a context is made
easier for end users.
Testing contexts
Any end-user query that generates a SELECT statement which spans across the loop fails without
contexts in place. If contexts are in place, the end-user query tool generates the SELECT
statement(s) in one of three ways. To test contexts, make at least three queries, one to test each
form of SQL generation when applying contexts. The three query types are:
• Inferred query.
• Incompatible objects query.
• Ambiguous query.
Inferred query
A query is run without prompting an end user to choose a context. The query contains enough
information for the correct context to be inferred. For example, a user runs a query using the
Showroom, Model, and Sales Revenue objects.
When these queries are run, the data is returned without prompting the user to select a context.
The Sales Revenue object is a sum on the Sale_Model table, which is part of the Sales context.
The query infers that the Sales context is the one to use for the query.
Ambiguous query
An end user is prompted to choose between one query path or another. This occurs when a
query includes objects that, when used together, do not give enough information to determine
one context or the other.
When a query is ambiguous, the user is prompted by a dialog box in the Query Panel to select
the appropriate context. When the user selects a context, the corresponding tables and joins
are inserted into the SQL query.
For example, if you run a query containing only the Showroom and Model objects, more than
one context contains all the joins necessary to include the Showroom and Model tables to which
the two objects refer.
The user is prompted to identify which context to use by displaying the Context Selection
dialog box.
When the user selects one of the contexts and clicks OK, a SELECT statement is inferred using
the join path for the context chosen.
Note: For a user to select more than one context when running an ambiguous query, the Allow
selection of multiple contexts option in the SQL tab of the Universe Parameters dialog box in
the Universe Designer module must be selected.
Updating contexts
Contexts are not updated automatically when the universe structure is changed. If you add or
remove any tables or joins to the structure, you need to update all the contexts.
Recommended sequence
It is always best to create all your alias tables first, and then create your contexts, because of
the requirement to update contexts. Otherwise, your alias tables are not included in your
previously created contexts.
For loop resolution, therefore, the sequence is as follows:
1. Set cardinality on all joins.
2. Use Detect Aliases to detect all the loops that can be resolved with alias tables.
3. Insert all the required alias tables and their associated joins. Remember to set cardinality on
any new joins.
4. Use Detect Contexts to detect all the contexts that can be used to resolve the remaining
loops that could not be resolved with an alias.
The need to follow this sequence highlights the main drawback of using the Loop Detection
tool. If you detect all loops, and then follow the Loop Detection dialog box suggestions for
resolving them in the order that they are presented, you do not necessarily resolve all the alias
table loops first, followed by all the context loops. It is therefore better to use the alias detection
tool first, and then the context detection tool.
Remember also that you need to redefine any objects that are based on tables for which you
have created aliases. The overall sequence in universe design is as follows:
1. Add tables to the universe.
2. Insert joins.
Note: If you want to test your loop resolution in a query, you may need to create some basic
objects to allow you to run some simple queries. If you do this, always bear in mind the need
to redefine them when you have finished resolving loops.
If an end user runs a query including Country and Client (but not Region) objects, you find
that the inferred SQL includes the joins to the Region table. This is necessary because the Region
table forms the link between the Client and Country tables. However, the additional lookup
decreases the efficiency of the SQL.
You can overcome this inefficiency by making a join directly from the Client table to the Country
table. Now if a user builds a query just using Country and Client, the query does not need to
refer to the Region table.
You now have a loop. In this case, you do not have a multipurpose lookup table scenario, and
should therefore not alias.
Instead you would convert the created join to a shortcut join to break the loop.
Shortcut joins can change the results of existing queries and therefore should be used sparingly.
Shortcut joins should only be used when designing universes where it is possible in certain
circumstances to make the inferred SQL more efficient.
6. Click OK.
The shortcut join now appears as a dotted line between the two selected tables.
Instructions
In this activity new tables, new joins, and cardinality, are inserted into your Motors universe.
These result in loops in your universe structure. Resolve these loops and test the results in Web
Intelligence Rich Client.
1. In Universe Designer, create the following aliased tables:
2. Insert the RENTAL_PRICE_RANGE table. Select the Manager object and select the Tables button.
3. Insert the following joins and set their cardinality.
Joins
CLIENT.CLIENT_ID = RENTAL.CLIENT_ID
RENTAL.SALE_ID = RENTAL_MODEL.SALE_ID
RENTAL.SALE_TYPE = 'R'
RENTAL_MODEL.MODEL_ID = MODEL.MODEL_ID
SHOWROOM.SHOWROOM_ID = RENTAL.SHOWROOM_ID
RENTAL_MODEL.COLOUR_ID = COLOUR.COLOUR_ID
MODEL.MODEL_DAYRENT between
RENTAL_PRICE_RANGE.RENT_RANGE_MIN and
RENTAL_PRICE_RANGE.RENT_RANGE_MAX
• Ensure the following self-restricting join is added to the context (if the cardinality is set
to 1:1, this join is automatically added to the context):
RENTAL.SALE_TYPE = 'R'
• Ensure the following self-restricting join is added to the context (if the cardinality is set
to 1:1, this join is automatically added to the context):
SALE.SALE_TYPE = 'S'
10.Create the following four objects in the appropriate subclass of the Rentals class:
sum(RENTAL.DAYS_RENTED*
RENTAL_MODEL.SALE_QTY* Total Rental Invoice
Rental Revenue MODEL.MODEL_DAYRENT*
((100 - RENTAL.SALE_DISCOUNT)/100)) Value
11.Create a subclass called Day Rental Charges in the Car class, and then populate the subclass
with the following objects:
12.A requirement is raised from managers wanting to see which showrooms have which
franchises. Queries made for this requirement should bypass the sales and rentals contexts.
A linking table between SHOWROOM and MAKER, together with a new context, is required
to return these results. Insert the table named FRANCHISE in the universe structure. Insert
the joins specified below and set cardinalities:
• SHOWROOM.SHOWROOM_ID = FRANCHISE.SHOWROOM_ID
• FRANCHISE.MAKER_ID = MAKER.MAKER_ID
14.Create the following object in the Showroom class, and then use it in a query to test that
the context has resolved the loop correctly.
15. Launch the Universe Designer Query Panel via Tools ➤ Query Panel.
Add the Showroom and Franchises objects to the Result Objects pane and view the SQL.
Does this query bypass the sales and rentals contexts?
Tip: Use the Tables button for the Franchises object to ensure only the FRANCHISE context
is used.
Adding this table, allows users to report on models of any color regardless of whether they
are for sale or for rental.
4. What are the three types of queries you can use to test your contexts?
Lesson introduction
This lesson deals with two common SQL Traps: chasm and fan. Chasm traps and fan traps are
problems inherent in SQL that are caused by the order in which the elements of the SELECT
statement are processed.
After completing this lesson, you will be able to:
• Understand SQL traps and universes
• Resolve fan traps
• Resolve chasm traps
Chasm traps
A chasm trap is a type of join path between three tables when two many-to-one joins converge
on a single table, and there is no context in place that separates the converging join paths.
You only get incorrect results when the following circumstances all exist simultaneously:
1. There is a “many-to-one-to-many” relationship between three tables in the universe structure.
3. There are multiple rows returned for an object (usually a dimension) based on the "one"
table.
For example, in this diagram there is no loop, but the flow around the three tables is
many-to-one-to-many.
Note: A chasm trap is not dependent on the object types. The query could be made up of only
dimensions, only details, or only measures, or any combination of the three types with the
“many” tables for a chasm to occur.
In this scenario, the universe designer has not selected the “Multiple SQL statements for each
measure” option in the Universe Parameters SQL tab.
A user creates a series of queries using these objects and gets inaccurate results.
The results in the report are now correct, as the query has automatically generated two SQL
statements.
Using this option resolves the chasm trap problem. However, there are drawbacks to using
this method to resolve chasm traps.
When you run a query that includes objects from both contexts, this creates two SELECT
statements that are synchronized at run-time in Business Objects end-user query tools to prevent
the creation of a Cartesian product.
Creating contexts always solves a chasm trap in a universe. When you have a
"many-to-one-to-many" situation, always use a context.
3. Select a proposed context in the Candidate Contexts field and click Add to add it to the
Accept Contexts field. Click OK.
4. Repeat for other listed contexts.
The new contexts are listed in the Contexts pane of the List View window.
5. Select File ➤ Parameters or click the Parameters button.
Instructions
1. Create a new universe called Chasm_xx, where "xx" stands for your initials.
Use your MotorsOLEDB_xx connection to connect to the Motors database.
2. Select File ➤ Parameters from the menu bar or click the Parameters button and select the
SQL tab.
3. Clear the Multiple SQL statements for each measure option by clearing the check box.
4. Add the following tables:
• CLIENT
• SALE
• RENTAL (as an alias of the SALE table)
Join Cardinality
CLIENT.CLIENT_LASTNAME
Client Name + ' , ' + CLIENT.CLIENT_FIRSTNAME
Measures class
15. In Universe Designer, edit the universe by clicking File ➤ Parameters ➤ SQL tab, and select
the Multiple SQL statements for each measure option.
16.Save your universe locally.
17.In Web Intelligence Rich Client, create a new document using the Sales Revenue, Rental
Revenue, and Client Name objects. Select the Client Name object, and click the Apply a
Quick Filter button. From the List of Values, select Brent, Paul. Click View SQL to check
the SQL statement generated.
Tip: You may need to refresh the universes list to get the latest version of your universe.
Select Tools ➤ Universes and click Refresh.
• What is the sale amount?
• What is the rental amount in the new table?
• What happened to your figures?
18.Edit the query by clicking the Edit Query button on the toolbar.
19.Remove the Sales Revenue, and the Rental Revenue objects. Add the Sale Date, and Rental
Date objects. Click Run Query.
• What happens to the SQL and to the results?
20. In Universe Designer, edit the universe by clicking File ➤ Parameters ➤ SQL tab and clear
the Multiple SQL statements for each measure option again (clear the check box).
21.Insert the following contexts:
Context Joins
CLIENT.CLIENT_ID = RENTAL.CLIENT_ID
Rental
RENTAL.SALE_TYPE = 'R'
Fan traps
Fan traps occur when there is a “one-to-many” join to a table that “fans out” into another
“one-to-many” join to another table.
This is a common structure and does not normally result in a fan trap. You only get incorrect
results from the fan trap when the query includes a measure object on the middle table ('B') of
the table path and an object (of any kind) from the subsequent table ('C'). The trap only occurs
where (due to the database design) a column in table B holds data values which are already a
sum of those values held at table C. The results are normally noticeably wrong.
When a query is run using objects Y and Z, the inferred SQL includes tables B and C which
have a ‘one-to-many’ relationship. This results in a value for the Y object being multiplied by
the number of values of the Z object related to that Y object value. Like the chasm trap, the
effect is similar to a Cartesian product.
Like the chasm trap, the fan trap can be resolved by executing a separate SELECT statement for
object Y and object Z. The alternate solution is to avoid it in the first place.
You cannot automatically detect fan traps. You need to visually examine the direction of the
cardinalities displayed in the table schema.
If you have two tables that are referenced by measure objects and are joined in a series of
“many-to-one” joins, then you may have a potential fan trap.
The fan trap problem becomes apparent in a query that aggregates both an object based on the
Sale_Total column in the Sale table, and an object based on the Sale_Qty column in the
Sale_Model table.
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.
Create an alias for the table (on the many end of the join)
• Three tables in a containing the initial aggregation, joining it back to the
one-to-many relationship. non-aggregation table (on the one end of the join). Use the
• A dimension coming from Detect Contexts tool to detect and propose a context for
the first table and measures the alias table and a context for the original table.
coming from the two This is the most effective way to solve the fan trap problem
subsequent tables. because it works with measure and dimension objects and
does not cause inefficiencies.
The SELECT clause of the Sales Revenue object needs to be edited, so that it refers to the alias
table rather than the original Sale table.
As with resolving a chasm trap problem, two contexts need to be created. In this example, a
context for Sale, and a context for Sale_Model need to be defined. This allows for the results
to be merged into a single microcube to produce the correct results.
Moreover, if you make a query which includes a dimension object on the lower table in the
"one-many-many" path, you do not get the fan trap, even when that dimension object contains
This is the method used to avoid the fan trap in the Motors universe, when the Sales Revenue
and Number of Cars Sold measure objects are included in the same query.
Instructions
1. Create a new universe called Fan_xx, where "xx" stands for your initials.
Use your MotorsOLEDB_xx connection to connect to the Motors database.
2. Select File ➤ Parameters from the menu bar or click the Parameter button and select the
SQL tab.
3. Clear the Multiple SQL statements for each measure option by clearing the check box.
4. Add the following tables:
Join Cardinality
CLIENT.CLIENT_LASTNAME
Client Name + ' , ' + CLIENT.CLIENT_FIRSTNAME
Model ID SALE_MODEL.MODEL_ID
Measures class
12.Edit the query and add the Number of Cars Sold object.
• What is the sale amount now?
• What is the total number of cars sold ?
13. In Universe Designer, edit the universe by clicking File ➤ Parameters ➤ SQL tab and select
the Multiple SQL statements for each measure option.
14.Save your universe locally.
15.In Web Intelligence Rich Client, create a new document using the Sales Revenue, Number
of Cars Sold, and Client Name objects. Select the Client Name object and click the Apply
a Quick Filter button. From the List of Values, select Randall, Sean.
Tip: You may need to refresh the universes list to get the latest version of your universe.
Select Tools ➤ Universes and click Refresh.
18. In Universe Designer, edit the universe by clicking File ➤ Parameters ➤ SQL tab and clear
the Multiple SQL statements for each measure option by clearing the check box. Select the
Multiple SQL statements for each context option if it is not already selected.
19.Add an alias to the SALE table (SALE2).
20.Create the following joins:
Context Joins
CLIENT.CLIENT_ID = SALE.CLIENT_ID
CLIENT.CLIENT_ID = SALE2.CLIENT_ID
Sale2
SALE2.SALE_TYPE = 'S'
22.Modify the definition of the object that is performing multiple aggregations so that it points
to the alias table:
Lesson introduction
This lesson helps you understand and use restrictions, which are conditions in SQL that set
criteria to limit the data returned by a query.
After completing this lesson, you will be able to:
• Restrict the data returned by objects
Compare this with the following report, which is a restricted block containing data only for
clients from the United Kingdom:
The WHERE clause for the query now has an extra line at the bottom. This is the restriction added
by the designer that limits the return of data to UK Clients:
WHERE (COUNTRY_REGION.COUNTRY_ID=REGION.COUNTRY_ID)
AND (REGION.REGION_ID=CLIENT.REGION_ID)
AND (SALE_MODEL.MODEL_ID=MODEL.MODEL_ID)
AND (SALE.SALE_ID=SALE_MODEL.SALE_ID)
AND (CLIENT.CLIENT_ID=SALE.CLIENT_ID)
AND (SALE.SALE_TYPE='S')
AND (SALE.SALE_DATE between FINANCE_PERIOD.FP_START
and FINANCE_PERIOD.FP_END)
AND (COUNTRY_REGION.COUNTRY_NAME = ‘United Kingdom’
Remember that users can apply conditions themselves in their Business Objects querying tool.
Therefore, avoid creating optional restrictions that are of a simple nature, as the end user should
be capable of creating such conditions for themselves on a query-by-query basis.
There are often problems associated with inferred restrictions. You are therefore advised only
to force restrictions where they are absolutely necessary.
To ensure that a restriction is always inferred when a particular object is used in an end-user
query, place the restriction in the Where field of the Definition tab in the Edit Properties dialog
box related to the object. You can do this when you create the object or you can add it later.
You would apply the condition for each year using the database function that applies IF THEN
ELSE logic.
For Sales Revenue 2003, the SELECT statement looks like this:
Note: Many databases support the CASE function. Consult the documentation provided by
your database vendor to see what types of conditional functions are supported.
After you have created or edited the objects, test them individually and together in a single
query. When you view the SQL to check whether the inferred SELECT statement includes the
conditional SELECT syntaxes, the SQL appears as follows:
The conditional SELECT statements have removed the problem of the conflicting WHERE clauses.
The data correctly shows the 2003 and 2004 Sales Revenue for each client.
In Web Intelligence Rich Client, the predefined query filter built into the universe can be viewed
in the Report ManagerData tab, identified as predefined query filters.
When you have created a condition object in Universe Designer, test it in Web Intelligence Rich
Client by making a query that uses the filter. View the SQL to check that the inferred SELECT
statement includes the restriction in the WHERE clause and has the desired effect.
2. Click the class in which you want to place the condition object.
3. There are two ways you can insert a condition:
• Select the Insert Condition button on the Editing toolbar.
• Right-click the class and choose Condition from the drop-down menu.
This opens the Edit Properties dialog box for condition objects.
With this restriction in place, the data returned is restricted to sales data, no matter where the
table is used in the inferred SQL.
For example, if the Sale table appears only in the FROM clause of the SQL, the restriction is still
applied in the WHERE clause.
If a user ran a query to answer the question: “Which countries do our showrooms exist in?”,
you might think that a simple query using only the Showroom Country object in the Showroom
class would provide the answer. However, in the current universe, such a query would actually
infer SQL that returns all countries held in the Showroom_Country table.
SELECT
SHOWROOM_COUNTRY.COUNTRY_NAME
FROM
SHOWROOM_COUNTRY
To solve this problem, the Showroom Country object in the Showroom class must be restricted
so that it returns only country data relating to showrooms.
This is done by specifying that whenever the Showroom Country object is used in a query, the
Showroom table must also be inferred in the FROM clause of the SELECT statement. Providing
that the Showroom_Country table is joined to the Showroom table (by intervening tables) using
3. Scroll down the list of tables until you can see the table that is already highlighted.
4. Hold down the Ctrl key and click an additional table to force joins between the selected
tables.
5. Click OK to close the Tables dialog box.
6. Click Apply in the Edit Properties dialog box.
7. Click OK.
Instructions
The sales staff of Prestige Motors needs to drill from Day Rental Range through Model Day
Rental Charge to Model for Rental to deal with queries from potential customers.
1. Create a Model for Rental dimension object in the Day Rental Charges subclass.
2. Add a WHERE restriction to the Model for Rental object so that only models available for rent
are returned. The restriction is:
MODEL.MODEL_DAYRENT IS NOT NULL
3. Create a US Clients dimension object in the Client class below the Client Name object with
the settings:
• Type = Character
• Description = Returns only data for clients in the USA
• Select syntax:
CLIENT.CLIENT_LASTNAME
+ ', ' + CLIENT.CLIENT_FIRSTNAME
• Where syntax:
COUNTRY_REGION.COUNTRY_NAME = 'USA'
7. In the Annual Revenue subclass create two separate Sales Revenue measure objects related
to financial years FY03-04 and FY04-05 as indicated below. Use the CASE function.
• Sales Revenue for FY03-04
• Sales Revenue for FY04-05
8. Save your universe locally, then test the two new calendar year Sales Revenue objects in
Web Intelligence Rich Client:
• Build a query containing Showroom, 2003 Sales Revenue, and 2004 Sales Revenue
objects.
• Replace the 2003 Sales Revenue and 2004 Sales Revenue objects with the Sales Revenue
for FY03-04 and Sales Revenue for FY04-05 objects.
9. Remove the US and UK objects in the Client class that you just created, and create the
following condition objects instead:
• A condition object for US Clients.
• A condition object for European Clients.
• A condition object for Other Clients.
Lesson introduction
This lesson helps you use the @functions to provide more flexible methods for specifying the
SQL for an object.
After completing this lesson, you will be able to:
• Use @functions
Defining @functions
In the Edit Properties dialog box of an object, if you look in the Functions panel of either the
Edit Select Statement dialog box or the Edit Where Clause dialog box, you find a list of
@functions.
The most commonly used @functions are:
• @prompt(,,,,,,)
• @select()
• @where()
• @aggregate_aware(,)
These functions can be applied in the Select and/or Where fields of objects.
@prompt
The @prompt function is used by the designer to force the end user to enter a value for a
restriction when a query is run which includes the object in which the @prompt is specified.
In the example, the object Model for Rental is to be used by a salesman to list the models that
can be rented. However, different models are rented from different showrooms. Therefore,
you would want to restrict the returned list to cars rented from a single showroom. If you hard
coded the restriction, you would need a separate object for each showroom in the universe.
Using the @prompt function, you need only one.
@prompt syntax
The @prompt syntax consists of seven parameters, separated by commas:
• Prompt.
• Data type (A, N, or D).
• LOV pointer or hard-coded list.
• Mono or multi.
• Free, constrained, or primary_key.
• Persistent or not persistent.
• 'Default value':'key value'.
Note: The first two parameters are mandatory, and the remaining parameters are optional.
The first three parameters must be inside single quotes.
Data type
Data type refers to a character to specify the type of data that is returned:
'A' for alphanumeric
'N' for numeric
'D' for date
The specified character must be enclosed in single quotes.
Note: Make sure the syntax parses OK. When inserting the @prompt function in the Select
field, it automatically inserts seven commas. You may need to remove the remaining two
commas in the @prompt syntax.
The above example uses the "persistent" option. When refreshing a document, the last values
used in the prompt are displayed by default.
• @prompt syntax, using mono, constrained, not_persistent:
SHOWROOM.SHOWROOM_NAME =
@prompt('Enter Showroom Name','A',
'Showroom\Showroom',mono,constrained,not_persistent)
The above example uses the "not_persistent" option. When refreshing a document, no values
used are displayed by default in the prompt.
• @prompt syntax, using multi, constrained, persistent:
SHOWROOM.SHOWROOM_NAME IN
@prompt('Enter Showroom Name','A',
'Showroom\Showroom',multi,constrained,persistent)
The above example uses the "persistent" option. When refreshing a document, the last values
used in the prompt are displayed by default. Combining this with the "multi" option allows
the user to select or enter multiple values from the list of values.
The above example uses the "not_persistent" option. When refreshing a document, no values
previously used/selected in the prompt are displayed by default in the prompt. Combining
this with the "multi" option allows the user to select or enter multiple values from the list
of values.
• @prompt syntax, using mono, and primary_key:
SHOWROOM.SHOWROOM_NAME =
@prompt('Enter Showroom Name','A',
'Showroom\Showroom',mono,primary_key)
The above example uses the "primary_key" option. When prompted the user enters or selects
one value from the list of values, as the "mono" option is used. If the primary_key parameter
is present, the entered or displayed value is not used to generate the query. The associated
key value from the index awareness column is used instead. The function returns an integer
value (index). The primary_key option in the @prompt function needs to be assigned to an
integer or numeric database field, in this example, SHOWROOM.SHOWROOM_ID. This can be done
using index awareness.
If the user selects "Prestige Sports Cars" from the list of values, the SHOWROOM.SHOWROOM_ID
value is used to generate the query:
SELECT
sum(SALE_MODEL.SALE_QTY * MODEL.MODEL_PRICE *(100 - SALE.SALE_DISCOUNT )/100)
FROM
MODEL INNER JOIN SALE_MODEL ON (SALE_MODEL.MODEL_ID=MODEL.MODEL_ID)
INNER JOIN SALE ON (SALE.SALE_ID=SALE_MODEL.SALE_ID)
INNER JOIN SHOWROOM ON (SALE.SHOWROOM_ID=SHOWROOM.SHOWROOM_ID)
WHERE
(SALE.SALE_TYPE='S')
AND (SHOWROOM.SHOWROOM_ID = 2 )
The above example uses the "primary_key" option. When prompted the user enters or selects
one or more values from the list of values, as the "multi" option is used. If the primary_key
parameter is present, the entered or displayed value is not used to generate the query. The
associated key value from the index awareness column is used instead. The function returns
an integer value (index). The primary_key option in the @prompt function needs to be assigned
to an integer or numeric database field, in this example, SHOWROOM.SHOWROOM_ID. This can
be done using index awareness.
If the user selects all showrooms from the list of values, the SHOWROOM.SHOWROOM_ID value
is used to generate the query:
SELECT
sum(SALE_MODEL.SALE_QTY * MODEL.MODEL_PRICE *(100 - SALE.SALE_DISCOUNT )/100)
FROM
MODEL INNER JOIN SALE_MODEL ON (SALE_MODEL.MODEL_ID=MODEL.MODEL_ID)
INNER JOIN SALE ON (SALE.SALE_ID=SALE_MODEL.SALE_ID)
INNER JOIN SHOWROOM ON (SALE.SHOWROOM_ID=SHOWROOM.SHOWROOM_ID)
WHERE
When prompted the user enters or selects one or more values from the list of values, as the
"multi" option is used. If the primary_key parameter is present, the entered or displayed
value is not used to generate the query. The associated key value from the index awareness
column is used instead. Not_persistent is used, and no values previously used/selected in
the prompt are displayed in the prompt. Instead, when refreshing the report, the values
specified in the "default value" option are displayed.
If the user selects all showrooms from the default values in the list, the SHOWROOM.SHOWROOM_ID
value is used to generate the query:
SELECT
sum(SALE_MODEL.SALE_QTY * MODEL.MODEL_PRICE *( 100 - SALE.SALE_DISCOUNT )/100
)
FROM
MODEL INNER JOIN SALE_MODEL ON (SALE_MODEL.MODEL_ID=MODEL.MODEL_ID)
INNER JOIN SALE ON (SALE.SALE_ID=SALE_MODEL.SALE_ID)
INNER JOIN SHOWROOM ON (SALE.SHOWROOM_ID=SHOWROOM.SHOWROOM_ID)
WHERE
(SALE.SALE_TYPE='S')
AND (SHOWROOM.SHOWROOM_ID IN (1, 2, 3) )
@select
The @select function is a pointer to the Select field properties of another object. It is used by
placing the @select in the Select field of the Edit Properties dialog box of an object, using the
following syntax:
@select(path of existing object)
For example:
If you wish to create a new object called Model for Rental with the same code, rather than
creating the same code twice, you can refer to the original Model object via the @select function:
@select(Car\Model)
@where
The @where function is a pointer to the WHERE properties of another object.
It is used by placing the @where in the Where field of the Edit Properties dialog box of an object,
using the following syntax:
@where(path of existing object)
For example:
If you wish to create a new object called Showroom Rental Model that has to contain the same
WHERE syntax, rather than creating the same code twice, you can refer to the original Model for
Rental object via the @where function:
@where(Day Rental Charges\Model for Rental)
There are further benefits for using the @where function. If there are a number of objects and/or
condition objects that require the same restrictions to be placed upon them, you could use a
WHERE restriction object strategy to make the most efficient use of that restriction’s code.
Rental model
MODEL.MODEL_DAYRENT IS NOT NULL
Showroom choice
SHOWROOM.SHOWROOM_NAME
= @prompt ('Enter Showroom Name','A',
'Showroom\Showroom',mono, constrained)
Note that each of these restriction objects do not have SELECT properties specified.
The @where pointer can now be used to specify the restrictions required for the object called
Model for Rental without the need to double up on the WHERE syntax.
Also, by specifying each restriction in a separate WHERE clause restriction object, the strategy
has enabled you to build up the multiple restrictions on the object one step at a time. This is
particularly useful when creating complex restrictions on an object.
Moreover, the individual restrictions can be used for other objects and condition objects. In the
example above, the Where clause restriction object called Showroom Choice has also been used
for the Showroom condition object.
For this strategy to work, you need to be able to hide the class containing all the WHERE clause
restriction objects from end users.
The Where clause restriction object strategy has a number of advantages:
• Maintenance is easy because only a single instance of each restriction is required.
• The restrictions are easy to find. They are all under a single class. Restrictions can be mixed
and matched without the need for repetition.
To hide the class containing all the Where clause restriction objects
from end users
1. Click the class or object you want to hide.
2. There are different ways to hide classes and objects:
• Select the Show or Hide Item button on the Edit menu.
• Right-click the object or class and select Hide Item(s) from the drop-down menu.
• Use Ctrl+Shift+H.
Hidden classes and objects appear in italics in the Universe Designer Universe pane.
They are not shown at all in Business Objects end-user querying tools.
Where possible, it is best to choose the latter method as the statement processes quicker.
In Universe Designer, you can use a function called @aggregate_aware in the SELECT statement
for an object, so that both methods are referenced. This function directs a query to run against
aggregate tables whenever possible. If the data in the aggregate table is not calculated at the
level of granularity required to run the query, the object directs the query to run against the
tables containing the non-aggregated data.
A universe that has one or more objects with alternate definitions based on aggregate tables is
said to be aggregate aware. These definitions correspond to levels of aggregation. For example,
an object called Profit can be aggregated by month, by quarter, or by year.
The reliability and usefulness of aggregate awareness in a universe depends on the accuracy
of the aggregate tables. They must be refreshed at the same time as all fact tables.
When you apply the @aggregate_aware function, be aware of the available levels, and be clear
about the descending order of aggregation.
Each aggregation level SELECT statement is separated by a comma, and the entire expression
is enclosed in brackets. The final SELECT statement must be valid for all queries.
@aggregate_aware(<SELECT statement for highest agg level>,
<SELECT statement for second highest agg level>,
..
<SELECT statement for second lowest agg level>,
<original SELECT statement for basic agg calculation>)
Instructions
Continue to work with the Model for Rental dimension object that you created in the Day
Rental Charges subclass. This object returns all models available for rental. This is to be used
by sales staff and requires further restriction to a specific showroom.
1. Add the following @prompt syntax in the WHERE clause of the Model for Rental dimension:
SHOWROOM.SHOWROOM_NAME = @prompt
('Select showroom name','A','Showroom\Showroom',mono,constrained)
Note: When inserting the @prompt function, it automatically inserts seven commas. You
may need to remove the remaining two commas in the @prompt syntax, to make the syntax
work correctly.
Note: Parse the syntax. Parse fails as there is no SELECT statement defined in the object.
2. The SELECT properties of the Model and Model for Rental objects are the same. Use the
@select in the Model for Rental object to point to the SELECT properties of the Model object.
3. Create a new condition object called Showroom Rental Model in the Showroom class. The
WHERE clause restrictions for this condition already exist in the Model for Rental object. Use
the @where function in the condition object to point to the where properties of the Model for
Rental object.
4. Create a new class called Where Restriction Objects.
5. Create two new objects to go into the Where Restriction Objects class as follows:
• Rental Model containing the restriction:
MODEL.MODEL_DAYRENT IS NOT NULL
Note: When inserting the @prompt function, it automatically inserts seven commas. You
may need to remove the remaining two commas in the @prompt syntax to make the syntax
work correctly.
Note: Parse the syntax. Parse fails as there is no SELECT statement defined in the object.
8. Create a Maker Choice condition object under the Car class that, when used in a query,
produces a prompt dialog box requesting the user to enter a single manufacturer.
9. Check the integrity of the universe.
Note: The Integrity Check dialog box alerts you regarding the two hidden objects.
2. True or False. You can use the @where function in a condition object to point to an object,
but not the other way around.
3. What function is used to create an interactive object that causes a message to appear at query
runtime, that asks the user for specific input?
a. @where
b. @prompt
c. @select
d. @aggregate_aware
4. In the @prompt two parameters are mandatory and three are optional. What parameters are
optional?
Lesson introduction
Hierarchies allow you to organize dimension objects so that users can perform multi-dimensional
analysis using drill mode in end-user queries.
After completing this lesson, you will be able to:
• Understand hierarchies and universes
• Work with hierarchies
Hierarchies
A hierarchy is an ordered series of related dimension objects that are used for multi-dimensional
analysis. For example, a geographical hierarchy could group together dimension objects such
as Country, Region, and City.
Multi-dimensional analysis is a technique for manipulating data so that it can be viewed from
different perspectives and at different levels of detail. In Business Objects end-user querying
tools, users can analyze data at different levels of detail using a feature known as drill mode.
The example below shows a hierarchy of the dimension objects Country, Region, and City.
At the highest level, the user sees a Country. At the next level down, the Country is broken
down into more detail: the regions. At the next lower level, the regions are broken down into
more detail: the towns. A user can then analyze a measure object, such as Sales Revenue, against
any of the levels in the hierarchy.
Natural hierarchies
A natural hierarchy is one that follows a naturally occurring pattern from the most general at
the highest level to the most detailed at the lowest level. Examples of natural hierarchies can
be found in the geographical definitions of places and in the measurement of time:
• Country, Region, State, City, District, and Street.
• Year, Quarter, Month, Week, and Day.
Logical hierarchies
BusinessObjects hierarchies are not restricted to natural hierarchies. You can construct a
hierarchy from any related group of dimension objects that create a sensible analysis path.
The relationship between the dimension objects in a hierarchy normally are one-to-many as
you descend through the levels.
Default hierarchies
A default hierarchy contains all the dimension objects in a class in the order they are presented
in that class. It is based on the order of the objects within the class.
As the name suggests, a default hierarchy is automatically inferred by Business Objects end-user
querying tools whenever you have at least one dimension object in a class.
It is therefore important to organize dimension objects hierarchically in a class.
In this example, you can see that the dimension objects in each class follow an order from the
most general to the most specific.
Using this method of organizing your dimension objects in their classes is the key to setting
up usable default hierarchies.
You cannot add or remove objects from classes in the Hierarchies Editor.
You can use the Hierarchies Editor to create custom hierarchies.
2. Click the + box next to any class if you want to see the dimension objects organized in these
hierarchies.
3. Click Cancel to close the Hierarchies Editor dialog box.
The Scope of Analysis pane allows users to set up the query for drill analysis. All the
dimensions selected for the query are highlighted here, within their default hierarchies. In
order to allow users to drill down the hierarchy from one level to another, without having
to modify the query, you can set the scope of analysis before the query is actually executed.
Note: You can manually drag the objects you want to drill down to in this pane. In this
case, the Custom value appears in the Scope of Analysis level drop-down list.
5. To define default levels of scope of analysis, select the level drop-down list in the Scope of
Analysis, and click the arrow to select the scope of analysis levels.
The levels you define in the scope of analysis determines how many objects from the
hierarchy is included in the query, and therefore how many levels of detailed data is returned
in the Web Intelligence Rich Client document.
8. Click the Drill button in the Reporting toolbar to display the report in drill mode.
Note: The report tab at the bottom of the Rich Client main window now shows the name
Report 1 with a drill mode icon.
10.Double-click to drill down. The data in the measure column is aggregated to reflect next
level drill-down figures.
11.Drill down and up as you wish to explore the data available in the document’s microcube.
Custom hierarchies
A custom hierarchy combines objects from default hierarchies to build a custom analysis path.
Default hierarchies are based on the order of the dimension objects in their classes. These default
hierarchies may not provide the drill paths that users need to analyze their data. They may
need to follow drill paths that contain dimension objects from more than one class.
For example, if users of the Motors universe wanted to look at Sales Revenue from the point
of view of Client/Area and Financial Period, they would not be able to do this using the default
hierarchies.
2. Click New.
A new folder appears in the Custom Hierarchies pane.
3. Type a name for the custom hierarchy as the folder name, and press Enter.
4. In the left panel of the Hierarchies Editor dialog box, click the + box of the default hierarchies
that contain the dimension objects you want to include in the custom hierarchy.
The default hierarchy dimension objects appear.
5. There are several methods to add the dimension objects to the custom hierarchy:
• Select the object that you want to appear in the custom hierarchy, and click Add.
• Select multiple objects by holding the Ctrl key down, and click Add.
• Drag and drop the required objects to the new custom hierarchy folder.
The selected objects appear in the custom hierarchy.
Note: The dimension objects may not be in the order you require. You can move the objects
up and down the list by clicking them and then clicking the Move Up or Move Down
buttons. Alternately, you can use the drag-and-drop technique.
6. Click OK to save the changes to the hierarchies and close the Hierarchies Editor dialog box.
7. Save the universe.
2. Drag and drop only the default hierarchy folders you want the users to use as drill paths
from the left panel of the Hierarchies Editor dialog box to the right panel.
Note: When more than one hierarchy starts with the same dimension object path but diverges
at a lower level of the hierarchy, the default path in the user module is the one that is higher
in the list (if dimensions from both hierarchies are included in the query). You can alter this
default priority by changing the order of the hierarchies in the Custom Hierarchies list. You
can do this using the Move Up and Move Down buttons, or using the drag-and-drop
technique.
Note: When you add default hierarchies to the Custom Hierarchies list, it is good practice
to position the true custom hierarchy, if any, at the bottom of the list.
3. Click OK to save the changes to the hierarchies and close the Hierarchies Editor dialog box.
4. Save the universe.
Time hierarchies
One of the most common requirements for data analysis is to provide facilities for analysis
against different time periods.
Time is a special case because all the information for the dimension objects that make up the
hierarchy can come from a single column in a database. In most other cases, each dimension
object infers a separate database column.
2. Click the Properties tab. With the field type set to Date, the Automatic Time Hierarchy
button is shown in the Qualification zone.
4. Select the check boxes for the time-related dimension objects you want to create and edit
the names of the dimension objects, if required.
5. Click OK to close the Automatic Time Hierarchy dialog box.
6. If necessary, alter other object properties as required.
7. Click OK to close the Edit Properties dialog box.
In the Universe pane, the original date object has a plus next to it, indicating that other
objects are attached to it. These are the automatically created time dimension objects.
8. Click the + box to view and check the objects attached to the date object.
Note: You can see that the arrangement of the objects is not as you might expect. The original
date object is at the top of the hierarchy, and the other time objects appear to be subsidiary
objects to it. From this, it is apparent that there are two further disadvantages to this method
of creating time dimension objects. First, when a user sees a + box against an object, they
will think that detail objects are attached to it. Second, the objects are not ordered
hierarchically in the class, and, as a consequence, this might lead to confusion as to which
is the highest-level object in the class.
9. Double-click one of the automatically created time dimension objects (year, quarter, or
month) to view the Edit Properties dialog box for the object.
Advantages
• It is a fairly quick and easy way to set up a time hierarchy.
• Automatically creates the SQL SELECT statement using the appropriate scalar functions for
the RDBMS of the target database.
Disadvantages
• Does not give the designer any control over the layout of the dimension objects in the
Universe pane.
• Does not give the designer any control over the format of the data in the query report.
• The layout of the dimension objects in the universe can be confusing to users, who normally
expect to see detail objects under dimension objects.
• The format of the report can be confusing to users.
• An LOV can only be applied to the original date object, not to individual time dimension
objects.
All the negative points listed above can be avoided if another method of creating time dimension
objects is used.
7. The Universe pane now contains a class or subclass as in the following example:
Note: A time hierarchy created using this method is tested the same way as any other hierarchy.
Advantages
• The layout of the dimension object within the class is as a user would expect.
• Each of the objects can be edited individually.
• A separate LOV can be associated with each time dimension object, as required.
• The name of the hierarchy and the order of the objects mirror the class exactly.
Tip: If you do not know the relevant scalar functions, you could initially create the time objects
within a class using the automatic time hierarchy method. Then you could note the scalar
functions automatically inferred, remove the automatically created objects, and recreate them
using the database function method.
Another way of creating time dimension objects is to add a time-range table to the database
with columns and data as in the following example. This table can then be added to the structure
and its columns used to create time dimension objects. This is a good way of coping with
financial periods that do not coincide with the calendar year.
Advantages
• It is a good method of creating time dimension objects for time periods other than calendar
periods.
• The layout of the dimensions within the class is as a user would expect.
• Each of the objects can be edited individually.
• A separate LOV can be associated with each time dimension object, as required.
• The name of the hierarchy and the order of objects mirror the class exactly.
Disadvantages
• The additional join reduces the efficiency of an inferred SQL statement.
Instructions
1. To view all hierarchies, click the hierarchy button. Remove all custom hierarchies in the
Custom selection list.
2. Check that the hierarchical order of the dimension objects in the Client class is based on
geography.
The geographic hierarchy is: Country -> Region -> Area -> Town.
3. Save your universe locally, and then test the default hierarchy in Web Intelligence Rich
Client.
4. Create the following dimension objects using the automatic time hierarchy method: Sale
Year, Sale Quarter, and Sale Month.
5. Save the universe locally, and then test the resulting hierarchy in Web Intelligence Rich
Client.
When you run the query, view the SQL and note the scalar function used.
• Sales Quarter:
{fn quarter(SALE.SALE_DATE)}
• Sales Month:
{fn month(SALE.SALE_DATE)}
7. Create the following dimension objects manually in the Rental Dates subclass, using
alphanumeric database scalar functions and formatting: Rental Year, Rental Quarter, and
Rental Month.
• Rental Year:
'Calendar Year ' +
datename(YYYY,RENTAL.SALE_DATE)
• Rental Quarter:
'Q ' + datename(Q,RENTAL.SALE_DATE)
• Rental Month:
datename(mm,RENTAL.SALE_DATE)
12.Save your universe locally, and test the resulting hierarchy in Web Intelligence Rich Client.
13.Sales people want to drill down to a model using a specific drill path. In the bottom of your
custom hierarchy list, create a hierarchy to allow this drill path using the following objects:
• Showroom Country
• Showroom Name
• Maker
• Model
14.Save your universe locally, and then test the resulting hierarchy in Web Intelligence Rich
Client.
Lesson introduction
This lesson explains how you can add, modify, or remove a list of values (LOV) for an object.
It also introduces how to create a cascading list of values in Universe Designer and how to use
them in Web Intelligence Rich Client.
After completing this lesson, you will be able to:
• Create a list of values
• Work with LOVs in Universe Designer
• Create a cascading LOV
The name of the LOV file is the same name as shown in the List Name field, in the Properties
tab.
As a designer, you can edit the list name to call the file anything you want (over 100 characters
long), provided that the file ends in an .lov extension. Clicking the Restore Default button
changes the name back to the default file name.
Delegate search
The delegated list of values search allows you to delegate the search of values in an LOV to
the database.
This feature:
• Prevents the LOV from loading automatically.
• Restricts the data set returned.
• Improves performance by limiting the load time.
Instead, the report user can perform a search for a pattern within the database.
This option can be helpful when using an SAP BW data source. An SAP BW query can contain
more than ten variables, which means that ten or more lists of values can be loaded. Loading
and refreshing lists of values can have an important impact on performance.
The remaining two options, Allow users to edit this list of values and Hierarchical Display,
are not available for users creating reports with Web Intelligence and Web Intelligence Rich
Client.
2. Drag an object that you want to serve as a condition on the list of values for the active object
over to the Conditions pane.
3. Double-click an operator in the Operators pane.
4. Double-click an operand in the Operand pane.
5. Select or type values as required.
6. Click Run to save the condition and close the Universe Designer Query Panel.
7. Click Display to view the restricted list of values.
If a blank list appears, click Refresh. The values appear in the list.
8. Click OK to accept the modified list.
The .lov file in the universe subfolder updates with the modified list. This is the LOV that
the end users see when they use the edited object in a query.
3. Click the + box next to each class name displayed to see the objects in this universe that
have an LOV associated with them.
4. Select an object from the list.
5. Click Display.
The list of values for the selected object displays.
The Tools ➤ List of Values ➤ Edit List of Values option is useful if you want to edit all
the LOVs in the universe at the same time, instead of displaying the Edit Properties dialog
box for each object separately.
4. Drag the objects you want to place in the hierarchy into the Result Objects pane to the right
of the existing object and place the respective sorts on them.
5. Click Run to save the LOV query and close the Universe Designer Query Panel.
6. On the Properties tab of the object’s Edit Properties dialog box (in the Associate a List of
Values zone), click the Display button to see the LOV.
Note: If the list is blank, click the Refresh button to update the list.
Universe designers build the prompt(s) in the object definition, and report designers and power
users use it when they create and refresh reports using queries.
A universe designer defines the universe so that the user is always required to answer a series
of prompts to specify the values in a hierarchy of dimensions to be displayed in the report.
Only the data concerning the selected values is returned to the microcube.
Users can create a query that builds one of the objects into a prompted query filter. The Prompts
dialog box displays the list of values for all the objects you placed in the cascading LOV in
Universe Designer, in reverse order.
3. Open the appropriate class and double-click the object to move it into the Cascading List
of Values list.
By default, text appears in the Prompt Text zone to set the text that users see if this object
is used in a prompted query filter after you add the next object.
4. Double-click additional objects that need to appear in hierarchical order in the cascading
list of values.
Edit the prompt text if required.
5. Verify that the Hierarchical View check box is selected.
6. Click Generate LOVs to create the list of values.
If LOVs already exist for the selected objects, you are prompted with a message asking
whether you want to overwrite the existing values.
7. Click OK.
The Create Cascading List of Values dialog box closes.
3. Scroll down the list of values and click the + box to expand that folder.
4. Expand the further + boxes to select the lowest level value for your query.
The little arrow displayed next to the prompt text at the top of the Prompts dialog box
changes to a green check mark and the value you have chosen appears in the prompt.
5. Click Run Query to create the report.
The report displays the selected values.
Instructions
1. In Universe Designer, create a cascading LOV using the Maker, Category of Car, and Model
objects in the Car class.
2. Save your universe locally.
3. Build a query in Web Intelligence Rich Client that shows the number of cars sold per
showroom and prompts the users to select the Category of Car that they want to see in the
report.
Note: At the end of this activity, please remove the Cascading List of Values using the
following steps:
• In Universe Designer, change the object definition to associate a standard list of values
for all objects in the Car class.
• Save your universe locally.
2. What are three things that a universe designer should keep in mind when deciding whether
to associate an LOV with an object?
Lesson introduction
A derived table is a dynamic, virtual table that you create within the universe structure. It
allows you to transfer more of the processing load from the report server to the database and
improve query execution performance.
Index awareness is the ability to take advantage of the database indexes on key columns to
speed data retrieval. The objects that you create in the universe are based on database columns
that are meaningful to an end user.
After completing this lesson, you will be able to:
• Use derived tables
• Apply index awareness
7. Build objects based on the derived table columns in exactly the same way you do with
regular tables.
8. Save the universe.
7. Build objects based on the derived table columns in exactly the same way you do with
regular tables.
The derived table acts as a shortcut between the Client and Model table. The SELECT, FROM and
WHERE syntax therefore needs to contain the following:
SELECT CLIENT.CLIENT_ID,MODEL.MODEL_ID
FROM CLIENT, MODEL,SALE,SALE_MODEL
WHERE CLIENT.CLIENT_ID = SALE.CLIENT_ID
AND MODEL.MODEL_ID = SALE_MODEL.MODEL_ID
AND SALE_MODEL.SALE_ID = SALE.SALE_ID
The Rental table is in fact an alias table of the Sale table and cannot be referenced in the derived
table. To get the sale and rental values for Sale.Sale_Total, you need to use the Sale.Sale_Type
column that indicates which row is sales and which row is rental data.
The data for sales and rentals have been combined into a derived table. After joining the table
as shown in the diagram and creating a new context, and new objects, users can run a new
report in Web Intelligence Rich Client using the Client Name object from the Client table,
together with the Sales Total and Rental Total objects from the derived table. The data is returned
as one SQL statement and displays in one table.
When a query returns a joined SQL statement, the rows where there is no equivalent data are
returned as empty cells. These cells cannot be filtered on, as technically, they do not exist. Using
the derived table method, the cells where there is no data returns a value of zero. This means
that a quick filter can be used.
Allowing the user to return the clients that have both rental and sales values in a single SQL
statement.
Note: If you use derived tables to create different aggregation levels, be careful to consider the
impact on joins, contexts, and many-to-many relationships.
5. Click Check Syntax to check the syntax of your derived table and correct any potential
errors, then validate your nested derived table.
The nested derived table is added to the universe.
6. Click OK to validate your nested derived table.
The nested derived table appears in the universe Structure pane. Derived tables and nested
derived tables are lighter in color than tables that represent actual database tables.
Note: To display the table values, right-click the different tables.
Instructions
1. Using your Motors universe, insert a derived table to show the number of transactions per
customer.
2. Name the newly derived table DT_Best_Cust.
3. Create the SQL statement so that it looks like this:
SELECT CLIENT.CLIENT_ID, COUNT(SALE.SALE_ID) AS Number_of_transactions
FROM CLIENT, SALE
WHERE CLIENT.CLIENT_ID=SALE.CLIENT_ID
GROUP BY CLIENT.CLIENT_ID
7. Add the Number of Transactions object to the Client class. Define the object as a measure
object, and ensure the Associate a List of Values option is cleared.
8. In Universe Designer build a nested derived table, called DT_Nested, using the following
syntax:
SELECT DT_Best_Cust.CLIENT_ID,CLIENT.CLIENT_LASTNAME,
sum(DT_Best_Cust.Number_of_transactions)as Total_Transactions
FROM @DerivedTable(DT_Best_Cust),CLIENT
WHERE DT_Best_Cust.CLIENT_ID=CLIENT.CLIENT_ID
GROUP BY DT_Best_Cust.CLIENT_ID,CLIENT.CLIENT_LASTNAME
10.Add the Total_Transactions object to the Client class. Define the object as a measure object,
and ensure the Associate a List of Values option is cleared.
11.Save your universe locally.
12.In Web Intelligence Rich Client, build:
• A report that shows the number of transactions per customer and the number of
transactions per country.
• A report that shows the total transactions and sales revenue, per customer and per
country.
Universe Designer does not ignore duplicates with index awareness. If two customers have
the same name, Universe Designer retrieves only one unless it is aware that each customer has
a separate primary key.
In this case, Universe Designer has created a join to the Maker Country table in order to restrict
the countries retrieved.
With index awareness, you can tell Universe Designer that Country_ID is the primary key of
the Country_Maker table and that it also appears in the Maker table as a foreign key. Using
this information, Universe Designer can restrict the countries without joining to the
Country_Maker table.
In this case, Universe Designer is able to generate SQL that restricts the countries simply by
filtering the values of the Country_ID foreign key.
After setting up index awareness for Maker Country, Universe Designer generates the following
SQL, where “44” is the United Kingdom Country_ID value and “1” is the USA Country_ID
value:
SELECT
MAKER.MAKER_NAME,
max(MODEL.MODEL_PRICE)
FROM
MAKER,
MODEL
WHERE (MODEL.MAKER_ID=MAKER.MAKER_ID)
AND MAKER.COUNTRY_ID In ( 44,1 )
GROUP BY
MAKER.MAKER_NAME
3. Click Insert.
A key line is inserted in the list of keys field.
5. Select Enable.
6. Click OK.
7. Save the universe.
Instructions
1. Using the Client Country object in your Motors universe, enter the following under Keys:
2. When you insert a derived table and insert joins, what happens if you do not add the new
join to the appropriate context?
Lesson introduction
Using Universe Designer, you can choose to link universes so that they share common
components such as parameters, classes, objects, or joins.
After completing this lesson, you will be able to:
• Understand linked universes
• Create links between universes
This has the effect of making it appear as though the classes, objects, and structure of universe
A are part of universe B. However, they are just a lookup (signified by the fact that they are
grayed out) to universe A and cannot be edited in universe B.
Because the linked objects infer SQL against the same database defined in the connection for
the derived universe, it is not possible to use this functionality to make a universe query more
than one database.
• If you need to create the same universe twice with different universe IDs or connections
(master approach).
Key advantages
The key advantages of linking universes are:
• Reduced development and maintenance time.
The universe objects and structure are created only once, and only one instance of an object
needs to be maintained. The derived universe(s) is automatically updated when the linked
universe is changed.
• You can centralize often used components in a core universe, and then include them in all
new universes.
You do not have to recreate common components each time you create a new universe.
• Facilitated specialization.
Development can be split between database administrators who set up a basic core universe
and the more specialized designers who create more functional universes based on their
specific field.
Limitations
You can link the active universe to a core universe, only if the following requirements are met:
• The linked universes must use the same connection and connect to the same data source.
• In a production environment, the core and derived universes must be in the same repository.
• The core universe needs to have been exported before the derived universe.
Restrictions
You need to be aware of the following restrictions when linking universes:
• You can use only one level of linking. You cannot create derived universes from a universe
that is itself derived.
• All classes and objects are unique in both the core universe and the derived universes. If
they are not, then naming conflicts occur and Universe Designer renames objects from the
source universe.
• The two universe structures must be joined to avoid Cartesian products resulting from
end-user queries containing objects from both structures.
• Only the table schema, classes, and objects of the core universe are available in the derived
universe. This means that the contexts have to be detected again in the derived universe. In
some instances, this can be an advantage because the structure of the two universes is
effectively merged in the derived universe and the old contexts are incomplete.
• LOVs associated with a core universe are not saved when you export a derived universe
with the core universe structures.
• If there are two tables in the linked universes with a common name, the table being imported
is the table that is used, therefore no aliases are created. All joins will be placed on the new
table, assuming it is coming from the same database.
Strategies for using both these methods are discussed in this unit.
After completing this unit, you will be able to:
• Link universes
• Include one universe within another
• Understand the advantages of each method
Linking universes
When you link an active universe to another universe, the active universe becomes the derived
universe, and the linked universe becomes the core universe. Components from the core universe
are inherited by the derived universe.
A core universe has to be exported to the Central Management System (CMS), before you can
link it in any derived table. If the core universe has not been exported, it does not appear in
the list of available universes in the Universe Parameters ➤ Links tab.
In order to link universes, the derived universe (the universe for which you want to receive
the duplicated objects and structure), has to be open in Universe Designer. Using the Link
feature, you select the core universe file. When the link is established the contents of the core
universe are added to the open derived universe file.
3. Browse to the location to where the core universe needs to be exported and click OK twice
to export and exit the Export Universe dialog box.
10.Click OK.
The two universes are now linked. The tables and joins in the structure and the classes and
objects of the linked universe are grayed out, thus indicating that they reside in the source
universe and cannot be edited in the derived universe.
11.Set the joins between the two structures to avoid potential Cartesian products.
12.Remove existing contexts.
13.Detect aliases.
14.Detect contexts and customize them, if required.
15.Hide/create new objects as required.
To include a universe
The procedure for including is the same as for linking except that after selecting the universe
to link, and before confirming the selection in the Links tab, you perform these steps instead:
1. In the Links tab of the Universe Parameters dialog box, click the universe name in the Name
field.
The Include button becomes active.
Disadvantages of linking
• Only applicable for repository-based universes.
• Contexts have to be redefined in each derived universe.
• Exported lists of values are not available in each derived universe.
• The connection parameters have to be similar. For example, it is not possible to use this
technique to query more than one database.
• Only one level of linking is allowed.
Advantages of including
• It is a quick way of copying one universe into another/others.
• Maintaining one universe rather than a number of smaller universes is simpler.
Disadvantages of including
• It is only applicable for repository-based universes.
• Contexts have to be redefined in the new universe
• If the initial universe changes, the universe does not reflect those changes.
Instructions
Business requirement: Prestige Motors management wants to report on the sales performance
of its sales staff and their managers.
Use your Motors and Staff universes for this activity.
1. Export your Staff universe to the Central Management System. Go to File ➤ Export and
browse to the location specified by the instructor.
2. Open your Motors universe in Universe Designer. This is your derived universe.
3. Make room in the upper left corner of the Structure pane in the Motors universe.
9. Save your Staff universe, export it to the same location as in step 1, and close it.
10.Open your Motors universe and check that the change in your Staff universe is reflected.
11.Change the Link to Include.
12.Save and export your Motors universe to the same location as in step1.
13.Test the results in Web Intelligence Rich Client.
Note: The exported Motors universe appears as normal text format in Web Intelligence
Rich Client.
2. True or False. You can use linking to make a universe query more than one database.
3. True or False. When two universes are linked, if you make a change in the core universe,
the changes are automatically reflected in the derived universe.
4. To copy the contents of one universe into another, would it be better to Link or to Include
the universes?
Lesson introduction
In this lesson, you learn how to create restriction sets in order to apply security on universes.
In this lesson, you will be able to:
• Set access restrictions on a universe
You can create, edit, and delete a restriction set at any time once the universe has been exported
to the CMS. You can create multiple restrictions depending on the query needs of a target user
group.
The six tabs in this dialog box allow you to define the type of restriction you want to include
in this restriction set.
Caution: The Reset button at the lower left corner resets every change made in any tab. It
resets all options back to the defaults.
4. In the Restriction Name field, type the name you want to apply to the restriction.
5. Verify that the Connection tab is selected.
If you want this restriction set to specify that certain users use a specific connection to connect
to the data source, select the connection from the drop-down list or create a new one as you
would normally.
In this tab, you can limit the size of the result set and the execution time of queries for a
specific group of users. These are the same settings that you have used before in the Universe
Parameters dialog box.
8. If you have completed your restriction set, click OK to save the changes, otherwise navigate
the remaining tabs to apply further restrictions.
Note: Changes made in any of the first three tabs, display in red. This helps designers identify
and track any changes made by other designers.
Caution: The Reset button at the lower left corner resets every change made in any tab. It
resets all options back to the defaults.
In this tab, you can specify the objects in this universe that a specific user or group of users
will not be authorized to use in queries.
2. In the Objects tab of the Edit Restriction dialog box, click Add.
Note: If you are sure of the name of the object you want to restrict, you can type it in the
Object Name field and click OK to continue. Otherwise, continue to step 3.
3. Click Select.
The Object Browser displays.
In the Object Browser, you can select the universe objects that you want to restrict for a
specific user or group of users.
5. Select the object that you want to restrict and click OK.
6. Click OK.
The Objects tab of the Edit Restriction dialog box now displays the object you selected in
the list.
If you are sure of the table name and the Table and Where Clause values, you can type them
directly in the fields. Otherwise, continue to step 3.
7. Type the appropriate WHERE clause in the text box (or build the statement using the tables,
columns, operators, and functions available) to restrict the data.
8. Click OK to close the Where Clause Definition dialog box.
The table and WHERE clause appear in the New Row Restriction dialog box.
11.If you have completed your restriction set, click OK to save the changes, otherwise navigate
the remaining tabs to apply further restrictions.
Note: Plan and test your row restrictions very carefully. Row restrictions are only applied if
the table is actually invoked in the SQL statement generated by the universe. With aggregate
awareness, for example, the resultant SELECT clause of an object might not include the table
with the restricted column.
In this tab, you can define the replacement of a table referenced by an object in the universe
by another table for a specific user or group of users.
4. If you have completed your restriction set, click OK to save the changes, otherwise navigate
the remaining tabs to apply further restrictions.
2. Scroll down in the Available groups and users list until you see the individual user or group
you want to restrict.
Note: Users are identified in this list with an icon representing a single individual head;
groups of users are identified with two individual heads.
3. Double-click the appropriate user/group, or click the user/group and use the >> button to
move the group or user into the Selected users and groups list.
4. Click OK to confirm and close the Select Users and Groups dialog box.
The user/group appears in the Available groups and users list in the Manage Access
Restrictions dialog box.
Note: This list shows that no restriction has been assigned to this group yet. You need to
now assign a restriction to the selected user group.
5. In the Manage Access Restrictions dialog box, ensure that both the appropriate user set
and user group are selected.
6. Click the >>Apply button.
3. Select a user or group, and click the Move Up or Move Down buttons to change the priority
level.
4. Click OK.
2. Scroll down the list of groups and users and click the group or user whose restrictions you
want to view.
3. Click the Preview button.
Instructions
1. You must export the universe before you can create security restrictions. Click File ➤ Export.
In the Export Universe menu click Browse and select the folder to export to, as specified
by the instructor.
2. In your Motors universe, create a restriction set called Sales_only with the following
restrictions:
• Set the value of Limit size of result set to to five rows.
• Restrict all objects in the staff class.
• Add a row restriction with a WHERE clause definition SHOWROOM.COUNTRY_ID = (44).
3. Apply this restriction set to the sales user. Check with the instructor for the exact user name
to use.
4. Preview the restriction to check that it is correct.
5. Save your universe and export it to the same location as in step 1.
6. Log onto Web Intelligence Rich Client with the sales user account. Check with the instructor
for the exact user name to use.
7. Create a new report based on your Motors universe.
8. Verify that:
• Any query only returns 5 rows.
• The employees objects are not visible.
• No sales data for UK showrooms is returned.
2. How would you restrict data to only show Clients from the USA?
Lesson introduction
This lesson describes how to manage universes.
In deploying, managing, and maintaining universes, you ensure that the end users in your
organization have access to the universes they need to build reports.
After completing this lesson, you will be able to:
• Document universes
• Deploy universes
• Maintain universes
• Deploy universes in multiple languages
3. Select or clear the check dialog boxes so that the items you are interested in are printed.
where @<repository name> is the name of the repository the universe is being exported to.
• The universe is also stored in the file system of the Input File Repository Server (FRS), as a
.unw file. This is an object that contains both metadata information for the universe and the
link to the corresponding universe version stored on the repository file system.
• A new InfoObject is created in the Central Management Server (CMS). This object can be
managed through the Central Management Control (CMC). In the CMS, a BusinessObjects
administrator can change the universe name and description, move its location, and define
user access rights for the universe.
Each time the universe is exported to the CMS, the universe version in the FRS is updated.
This is the version that is available to BusinessObjects end users.
Note: Saving a universe is not the same as exporting a universe. Saving updates the universe
on your local file system, but it does not save the CMS repository version of the universe.
LOV files are stored in a folder with the same name as the universe file at the same level as the
universe.
Note: As a universe designer, you can also apply a restriction set to a selected group or
user account for a universe.
4. Click OK.
2. Select a folder from the Domain drop-down list dialog box where you want to export the
universe, or click the Browse button and select a folder in the folder browser.
3. Click a group in the Groups list dialog box.
This is the user group that is allowed to use the exported universe to create reports. The
groups proposed in the list dialog box are the groups in which the universe designer is a
member.
6. Click OK.
The universe is exported and the updated version in your local file system is synchronized
with an updated version of the universe in the CMS.
Importing a universe
As a designer, you can import one or more universes stored in the CMS repository.
When you import a universe, the CMS checks the universe version on the repository file system.
If the version is identical, the universe is made available to you if you are defined as a designer
in the CMS and you have the right to access this universe.
If the universe version on the local file system is more recent than the CMS version, a message
dialog box appears asking if you want to replace the universe in the folder. If you answer Yes,
then the universe on the local file system is replaced by the version in the CMS.
When you import a universe from the CMS, the .unw file store in the FRS file system and the
InfoObject from the CMS are then converted to a .unv file and transferred to the default local
machine location, for example:
\\Documents and Settings\<username>\Application Data\
Business Objects\BusinessObjects 12.0\universes\@<repository name>\
universe folder\<universe>.unv
where @<repository name> is the name of the repository the universe is being imported from.
You can only import a universe that has already been exported to the repository.
4. Verify the file path for the import folder in the Import Folder field.
This is the folder to where the universe is copied.
5. Click OK.
2. Double-click the universe file name in the list dialog box to lock the universe before importing
or exporting.
When introducing a new version of a universe make your primary concern its effect on existing
end-user reports that are refreshed regularly (as opposed to one-off reports). Conduct testing
as rigorously as if you were distributing a completely new universe.
Treat distributing new versions of a universe as you would any software update. Distribute
new versions in a controlled and regulated fashion.
3. Update the universe as necessary to reflect the changes in the database structure.
3. Check the properties of each object and, if required, redefine them to reflect the changes to
the table.
Note: If a table is deleted from the database, then it is no longer possible to use this process
to view the objects that are affected by the change. If possible, plan the change and view the
associated objects for a table before you delete it.
Alternatively, select Check Integrity on the Tools menu to identify the errors caused by the
changes to the structure.
When you change an object’s properties, there is little impact on the end user. For example, if
you:
• Redefine object SQL, there is no noticeable effect on the end user. When a user refreshes or
makes a query, the universe is re-imported automatically if the system detects a difference
in the flags for the .unv file in the repository. As this is done in the background, it is a very
fast process and as a consequence, the users do not realize that this is occurring.
• Rename an object, this does not affect the data in existing reports when refreshed. The only
difference end users might notice is that the column header in a tabular report changes as
this is based on the object name. This does not affect the refreshing of a report because the
object is identified by an object ID number and not its name.
• Move an object from one class to another, it does not cause any problems with the refreshing
of existing reports. However, remember that it can have a bearing on default hierarchies.
• Copy and add objects, changing an objects’s properties has no bearing on existing reports
because they are new to the universe and therefore could not be part of any existing report.
The only change you can make to the objects of a universe that has a major effect on existing
reports is to delete an object. When the report is refreshed an error occurs.
Translation Manager
Translation Manager is a product that allows Web Intelligence report designers and consumers
to build queries and to display content and text strings in Web Intelligence documents using
their preferred language.
This product is most useful in the context of worldwide BusinessObjects deployments. Instead
of having to duplicate universes and documents for each required language, the customer can
use Translation Manager to translate the metadata only once. The translated strings are stored
in the universe and in the resulting documents. This means customers can make significant
savings in development time and maintenance.
Translation Manager allows customers or their translation service providers to translate the
metadata stored in a Business Objects universe. The translated character strings are then stored
in the universe file. When a report designer creates a Web Intelligence document and retrieves
data using this universe, all translatable content is stored in several different languages in the
single Web Intelligence document.
The language chosen to display the document in the end user's web browser is dependent on
the language defined in the user's preferred viewing locale setting in InfoView (My Preferences
➤ General ➤ Preferred Viewing Locale ) or in the Internationalization settings in Web
Intelligence Rich Client (Tools ➤ Options ➤ Locale).
If the user's Preferred Viewing Locale or Internationalization settings are set to a language that
does not exist in the Web Intelligence document, then the data is displayed using the default
language instead. This default language value is defined when the universe data is translated
Note: Translation Manager does not allow you to translate the data retrieved by the query.
This is dependent on the database. A multilingual database is required to display the report
data in multiple languages.
Translation Manager is an application that allows customers to:
• Store in a single document all translatable content in several different languages.
• Enable end users to display content and strings in Web Intelligence documents according
to their preferred language.
4. Specify the target language for the translation. Select the appropriate language from the
Available Languages list, and click >.
The chosen language now appears in the Selected Languages pane. Also, a new column
appears in the Category View pane, where you can translate the strings into the chosen
language.
5. In the Category View pane, expand the Classes folder to view the available universe classes.
Expand a class to see the objects organized in the expanded class.
6. To translate a class name, expand the appropriate class.
In the Name field for the translation language add the appropriate translation string.
10.Before you can use the translated universe to build a query in Web Intelligence or Web
Intelligence Rich Client, the translated universe needs to be set to Ready for use status. In
the Selected Languages pane select the Ready for use checkbox for each of the translated
languages.
11.Save the translated universe locally, or save and export the universe back to the CMS.
• To save the translated universe locally:
1. Click File ➤ Save As and save the universe in the local universes folder.
Instructions
1. In Universe Designer, import your Motors universe and save it locally.
2. Launch Translation Manager.
3. Click File ➤ Open.
2. True/False The universe file’s revision number allows you to determine if you are working
with the latest version of the file.
3. To ensure that you are the only universe designer that can modify a universe, you can:
a. Ask your BusinessObjects administrator to restrict access to that universe.
b. Lock the universe when you export it to or import it from the repository.
c. Set restrictions on elements in the universe.
Customer scenario
Prestige motors has a total of 260 employees. Of the 260 employees, there are 12 who work
within HR, few of whom are required to create the reports, most have viewing rights only.
Most of the staff can schedule reports. The management needs to see high-level reports, and
not just straightforward tables. Showroom staff may be required to generate reports.
• Reports to detail the following:
1. Hierarchical reporting to be based on time, department, and geographic locations.
2. A list of absences detailing the employee, department, job title, showroom, date of absence,
duration of absence, and reason for absence.
3. Employee listing by manager, by department, and when they were hired
4. A summary of the number of employees by grade and total salary amount, per showroom
for each year.
5. Salary comparison levels versus absence correlation.
6. A salary cost report broken down by financial year and country on which you can drill
down to showroom from country and quarter and month from year.
7. A summary of the salary costs and absences per showroom and per year.
Two custom hierarchies are required: one for geographic drilling, the other for time based on
a financial year.
Items to watch out for:
1. Multipurpose lookup tables.
2. Chasm and fan traps.
3. Additional business requirements.
Instructions
1. Conduct a breakout session where as a group you need to identify the following points:
• Strategy: Define the scope of the universe. Identify and review the production and
development architectures. Assemble project teams and define the initial task plan.
• Analysis: Identify the ad hoc data access requirements of the user community and record
them in the form of candidate classes and objects. Identify security requirements.
• Schema Design: Map objects to corporate data sources. Resolve any circular paths or
loops within the data structures that support the required objects. Plan the architecture
for the project.
• Plan the development environment: Identify resources required to support a development
universe area. Identify source for development data. Verify appropriate connectivity and
initiate any changes or purchases required and plan their implementation.
• Plan the production environment: Identify resources required for a production universe.
Locate source of production data. Verify connectivity. Initiate any changes or purchases
required and plan their implementation.
• Adopt universe standards: Have appropriate naming conventions for universe names,
object definition guidelines, names for simple, complex and aggregate objects, class
names, alias tables, and help text. You may want to incorporate the class name in the
object's name. This may make object names a little long, but it makes it easier for end
users to understand where existing objects in a query come from, especially in reports
Instructions
1. Create a new universe called HRMotors_xx, where "xx" stands for your initials. Use your
MotorsOLEDB_xx connection to connect to the SQL Server database.
2. Using your paper design as a reference, design the universe schema. Insert tables, joins, and
create the appropriate classes and objects.
3. Resolve any potential loops or SQL traps.
4. Check the universe integrity.
5. Test your universe in Web Intelligence Rich Client.
Fact Tables
The fact table that sits in the center of this star schema usually contains business events recorded
over time. Examples of data that can be found in this table are: sales transactions, orders and
returns, bank transactions, shipments, and so forth.
The fact table normally consists of a set of numeric values and a number of foreign keys that
correspond to primary keys in the various dimension (lookup) tables. The information stored
in the fact tables is usually static as it is historical. The most common example of a fact table in
the star schema is for sales.
Dimensions
The dimension tables consist mainly of descriptive information linked to fact records. Examples
of dimension data are: customer names, product descriptions, suppliers, and vendors. Dimension
tables contain fewer records than the facts table. An important factor is that the information in
dimension tables is not static as records in dimension tables can be updated. For example, a
customer address might be modified in the source system.
ORACLE
This section provides solution syntaxes for ORACLE, based on SQL examples used in the
course.
CONCAT(CONCAT(
Client Name CLIENT.CLIENT_LASTNAME,', '),
CLIENT.CLIENT_FIRSTNAME)
CONCAT(CONCAT(CONCAT
(CONCAT(MODEL.MODEL_NAME,' '),
Model MODEL.MODEL_TRIM),' '),
MODEL.MODEL_ENGINE)
CONCAT('Q',TO_CHAR
Sale Quarter (SALE.SALE_DATE,'Q'))
TO_CHAR
Sale Month (SALE.SALE_DATE,'Month')
CONCAT('Q',TO_CHAR
Rental Quarter (RENTAL.SALE_DATE,'Q'))
TO_CHAR
Rental Month (RENTAL.SALE_DATE,'Month')
sum(CASE WHEN
to_char(SALE.SALE_DATE,'YYYY')
='2003'
Sales Revenue 2003 THEN (SALE_MODEL.SALE_QTY
* MODEL.MODEL_PRICE *(100 -
SALE.SALE_DISCOUNT)/100))
ELSE 0 END)
sum(CASE WHEN
to_char(SALE.SALE_DATE,'YYYY')
='2004'
Sales Revenue 2004 THEN (SALE_MODEL.SALE_QTY
* MODEL.MODEL_PRICE *(100 -
SALE.SALE_DISCOUNT)/100))
ELSE 0 END)
sum(CASE WHEN
FINANCE_PERIOD.FP_YEAR
Sales Revenue for ='FY03-04'
FY03-04 THEN (SALE_MODEL.SALE_QTY
* MODEL.MODEL_PRICE *(100 -
SALE.SALE_DISCOUNT)/100))
ELSE 0 END)
sum(CASE WHEN
FINANCE_PERIOD.FP_YEAR
='FY04-05'
Sales Revenue for THEN (SALE_MODEL.SALE_QTY
FY04-05 * MODEL.MODEL_PRICE *(100 -
SALE.SALE_DISCOUNT)/100))
ELSE 0 END)
DB2
This section provides solution syntaxes for DB2, based on SQL examples used in the course.
{fn concat
Sale Year ('Calendar Year ',char(year(
SALE.SALE_DATE)))}
{fn concat
Sale Quarter ('Q',char(quarter(
SALE.SALE_DATE)))}
{fn concat
Rental Year ('Calendar Year ',char(year(
RENTAL.SALE_DATE)))}
{fn concat
Rental Quarter ('Q',char(quarter(
RENTAL.SALE_DATE)))}
sum(CASE WHEN
year(SALE.SALE_DATE) = 2003
THEN (SALE_MODEL.SALE_QTY *
Sales Revenue 2003 MODEL.MODEL_PRICE *(100 -
SALE.SALE_DISCOUNT)/100))
ELSE 0 END )
sum(CASE WHEN
year(SALE.SALE_DATE) = 2004
THEN (SALE_MODEL.SALE_QTY *
Sales Revenue 2004 MODEL.MODEL_PRICE *(100 -
SALE.SALE_DISCOUNT)/100))
ELSE 0 END )
sum(CASE WHEN
Sales Revenue for FINANCE_PERIOD.FP_YEAR
FY03-04 ='FY03-04'
THEN (SALE_MODEL.SALE_QTY *
MODEL.MODEL_PRICE *(100 -
SALE.SALE_DISCOUNT)/100))
ELSE 0 END )
sum(CASE WHEN
FINANCE_PERIOD.FP_YEAR
='FY04-05'
Sales Revenue for THEN (SALE_MODEL.SALE_QTY *
FY04-05 MODEL.MODEL_PRICE *(100 -
SALE.SALE_DISCOUNT)/100))
ELSE 0 END )
MySQL
This section provides solution syntaxes for MySQL, based on SQL examples used in the course.
{fn concat('Q',
Sale Quarter QUARTER(SALE.SALE_DATE))}
{fn concat('Q',
Rental Quarter QUARTER(RENTAL.SALE_DATE))}
sum(CASE WHEN
{fn year(SALE.SALE_DATE)}
= 2003
Sales Revenue 2003 THEN (SALE_MODEL.SALE_QTY *
MODEL.MODEL_PRICE * (100 -
SALE.SALE_DISCOUNT)/100))
ELSE 0 END)
sum(CASE WHEN
{fn year(SALE.SALE_DATE)}
= 2004
Sales Revenue 2004 THEN (SALE_MODEL.SALE_QTY *
MODEL.MODEL_PRICE * (100 -
SALE.SALE_DISCOUNT)/100))
ELSE 0 END)
sum(CASE WHEN
FINANCE_PERIOD.FP_YEAR
Sales Revenue for ='FY03-04'
FY03-04 THEN (SALE_MODEL.SALE_QTY *
MODEL.MODEL_PRICE * (100 -
SALE.SALE_DISCOUNT)/100))
ELSE 0 END)
sum(CASE WHEN
FINANCE_PERIOD.FP_YEAR
='FY04-05'
Sales Revenue for THEN (SALE_MODEL.SALE_QTY *
FY04-05 MODEL.MODEL_PRICE * (100 -
SALE.SALE_DISCOUNT)/100))
ELSE 0 END)
Microsoft Access
This section provides solution syntaxes for Microsoft Access, based on SQL examples used in
the course.
sum(IIf(FINANCE_PERIOD.FP_YEAR
Sales Revenue for ='FY03-04',(SALE_MODEL.SALE_QTY * MODEL.MODEL_PRICE *
FY03-04 (100-SALE.SALE_DISCOUNT)/100)),0))
sum(IIf(FINANCE_PERIOD.FP_YEAR
Sales Revenue for ='FY04-05',(SALE_MODEL.SALE_QTY * MODEL.MODEL_PRICE *
FY04-05 (100-SALE.SALE_DISCOUNT)/100)),0))
This section contains the answers to the reviews and/or activities for the applicable lessons.
3. Where can you define what specific information about the universe gets printed?
Answer: Under Tools ➤ Options ➤ Print/PDF.
1. Information about universe administration appears on the Universe Parameters dialog box.
Under which tab can you find this information?
Answer: The Summary tab.
3. If you want to distribute the completed universe to the user population using the
BusinessObjects repository, which type of connection should you use?
Answer: Use a secured connection.
2. What are three reasons why using the automatic detection routine for setting join cardinalities
is not recommended?
Answer:
○ Cardinality is based on logic. The automatic detection routine uses physical cardinality,
and runs a physical count on the values in both columns being joined. You may get
incorrect results if the physical count does not return the same result as a logical analysis
of the data.
○ The algorithm used by the automatic detection routine assumes that you have sufficient
quantity of data in both tables to be representative in ratio to the database in a live
environment. If you are designing against a test database, for example, with only a
representative sampling of data, because the routine runs a physical count, it could give
you the incorrect answer.
○ The automatic detection routine runs three subsequent queries at the target database per
join, which may take a very long time for large databases.
1. Which of the three types of objects contain aggregate functions that map to statistics in the
database?
Answer: Measure objects.
2. When you are testing objects, what are the three things for which you need to test?
Answer:
○ Do the objects exist? If not, you may have forgotten to save your universe since the object
you are testing was created.
○ Does the SQL appear correct?
○ Are the results of the query correct?
3. If each object maps to a column or function in a target database, when used in a query, what
kind of statement does the object infer?
Answer: A SELECT statement.
1. Measure objects are very flexible because they are semantically dynamic. What does this
mean?
Answer: This means that the values they return in a query vary depending on the dimension
and detail objects that are used with them.
2. Measure objects are created in the same way as a dimension or detail object. However, the
object properties differ in two ways. What are they?
Answer: The object properties differ as follows:
○ The Data Type field must be set to Number.
○ The Select field must include an aggregate function.
4. What are the three types of queries you can use to test your contexts?
Answer:
○ Inferred
○ Incompatible
○ Ambiguous
1. What is a restriction?
Answer: A restriction is a condition in SQL that sets criteria to limit the data returned by a
query.
2. True or False. You can use the @where function in a condition object to point to an object,
but not the other way around.
Answer: True
3. What function is used to create an interactive object that causes a message to appear at query
runtime, that asks the user for specific input?
Answer:
b. @prompt
4. In the @prompt two parameters are mandatory and three are optional. What parameters are
optional?
Answer:
○ LOV pointer or hard-coded list
○ Mono or Multi
○ Free or Constrained
1. A _____________ hierarchy is the hierarchy based on the order of the objects within the
class.
○ a) Default
○ b) Custom
Answer: Default
2. What are three things that a universe designer should keep in mind when deciding whether
to associate an LOV with an object?
Answer:
○ Because an LOV is based on a SELECT Distinct query that is sent to the target database,
associating an LOV has implications for the efficiency of Web Intelligence.
○ The only purpose for creating an LOV is to assist the end user in choosing an operand
value for a condition. If the LOV does not do this, there is no point in associating it with
the object.
○ Unless the LOV is based on a personal file and not a query, the list only holds values
that exist within the database.
1. What part of the SQL expression does Universe Designer use to create column names in the
derived table?
Answer: It uses an alias (in SQL) to create column names.
For example:
count(Region.Region_ID) as number_of_regions
2. When you insert a derived table and insert joins, what happens if you do not add the new
join to the appropriate context?
Answer:
○ When you parse the derived table’s SQL, it generates an exception.
○ When you run a query, the derived table creates a Cartesian product.
○ The objects you create from the derived table are incompatible with objects from any of
the existing contexts.
2. True or False. You can use linking to make a universe query more than one database.
Answer: False
3. True or False. When two universes are linked, if you make a change in the core universe,
the changes are automatically reflected in the derived universe.
Answer: True
4. To copy the contents of one universe into another, would it be better to Link or to Include
the universes?
Answer: Include
1. What are the six types of restrictions that can be included in a restriction set?
Answer:
○ Connections
○ Query controls
○ SQL generation options
○ Object access
○ Row access
○ Alternative table access
2. How would you restrict data to only show Clients from the USA?
Answer:
Define a WHERE clause in the Rows tab with the syntax:
COUNTRY_REGION.COUNTRY_NAME = 'USA'
1. Why would you decide to print details about the universe components?
Answer:
○ To track progress against project plans during universe development and test phases.
○ To archive after the design work is finished.
○ To communicate the components of the universe to other designers.
2. True/False The universe file’s revision number allows you to determine if you are working
with the latest version of the file.
Answer: True.
3. To ensure that you are the only universe designer that can modify a universe, you can:
Answer:
b. Lock the universe when you export it to or import it from the repository.