Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
I
i
i"-,,
\
'---' BusinessObjects XI R1/R2:
Universe Design
''-../
Instructor's Guide
DM310R2
/
Copyright
Patents
Business Objects owns the following U.S. patents, which may cover
products that are offered and sold by Business Objects: 5,555,403,
6,247,008 B1, 6,578,027 B2, 6,490,593 and 6,289,352.
Trademarks
~
(
{~
I~
~
i
I
"
"'-J
c o N T E N .T s
About this Course
Course objectives xvi
Course audience xvi
Prerequisite education xvi
Prerequisite knowledge/experience xvi
Course success factors xvii
Training facility setup xvii
Course materials xvii
Learning process xviii
Recommended education xix
Facilities Setup
Introduction xxii
Facilities Setup xxii
Setting up for the activities xxiv
Before class begins v-xxiv
Getting Help xxxii
Lesson 1
Understanding BusinessObjects Universes
Understanding BusinessObjects universes 1-2
Introduction 1-2
What is a universe? 1-2
Universes are used to query the database 1-2
Classes and objects 1-3
How universes are used 1-3
Advantages of a universe 1-3
Metadata and the semantic layer 1-4
BusinessObjects Universe Designer components 1-5
Using the Quick Design Wizard 1-7
Using Designer module commands 1-8
Saving and exporting a universe 1-11
Opening, importing, and exporting universes 1-11
Importing a universe 1-11
Giving all users access to a universe 1-13
Activity: Viewing a universe in Designer 1-14
I
)
Using the Universe Development Cycle 1-15
The Universe Development Cycle 1-15
Activity: Plan a universe 1-17
Lesson summary 1-18
Quiz: Understanding BusinessObjects Universes 1-18
Lesson 2
Creating the Course Universe
The course database and universe 2-2
Introduction 2-2
Course database description 2-2
Assumptions 2-2
Analysis of reporting requirements 2-3
Development plan 2-4
Creating the universe 2-5
Introduction 2-5 (~
Lesson 3
Building the Universe Structure
Populating the universe structure 3-2
Designing a schema 3-2
Schema design and the universe creation process 3-3
(~
Adding tables 3-4
Viewing data from the Table Browser 3-5 (~
Lesson 4
Creating Dimension Obj eets
Objects and classes 4-2
Introduction 4-2
Objects 4-2
Classes 4-4
Creating classes and objects 4-5
Introduction 4-5
Creating classes 4-5
Creating an object 4-6
Defining a new object as a detail object 4-7
Creating classes or objects by dragging tables or columns 4-8
Working with classes and sub-classes 4-10
Editing the object properties 4-11
Copying and pasting objects 4-18
Find and replace 4-18
Checking integrity 4-20
Viewing parent tables 4-20
Testing objects 4-21
Activity: Creating and testing classes and objects 4-22
Objectives: 4-22
Lesson summary 4-27
Quiz: Creating Dimension Objects 4-27
Lesson 5
Creating Measure Obj eets
What are measure objects? 5-2
Defining measure objects 5-2
Levels of aggregation 5-3
Creating measure objects 5-7
Creating measure objects 5-7
Testing measure objects 5-8
Activity: Create and test measure objects 5-10
Lesson summary 5-12
Quiz: Creating Measure Objects 5-12
Lesson 7
Resolving Loops in a Universe
Understanding loops 7-2
Introduction 7-2
Recogni~ng~ops 7-2
Problems caused by loops 7-3
Loops in a universe schema and not in the database 7-3
What is the loop doing? 7-3
Resolving loops 7-4 (~
Lesson 8
Resolving SQL Traps
Understanding SQL traps and universes 8-2
Resolving chasm traps 8-3
Chasm traps 8-3
Detecting chasm traps 8-4
The Chasm trap scenario 8-4
Resolving chasm traps 8-6
Using multiple SQL statements for each measure to resolve chasm traps .. 8-7
Using contexts to resolve chasm traps 8-10
Activity: Resolving chams traps 8-11
Resolving fan traps 8-14
Fan traps 8-14
Detecting fan traps 8-15
The fan trap scenario 8-15
Resolving fan traps 8-17
Using aliases and contexts to resolve fan traps 8-18
Another solution using aliases and contexts 8-21
Avoiding fan traps altogether 8-23
Activity: Resolving fan traps 8-24
Lesson summary 8-27
Quiz: Resolving SQL Traps 8-27
Lesson 9
Applying Restrictions on Objects
Restricting the data returned by objects 9-2
Defining data restrictions 9-2
, Methods of restricting data in Web Intelligence 9-4
--.../
Applying restrictions to objects 9-5
Applying restrictions to objects 9-5
An alternative to applying restrictions to objects 9-7
Applying restrictions using condition objects 9-9
Restrictions using condition objects 9-9
Applying restrictions to tables 9-11
Applying restrictions using the tables button 9-12
Applying each type of restriction 9-14
Activity: Applying restrictions 9-15
Lesson Summary 9-17
Quiz: Applying Restrictions on Objects 9-17
'-..../
Lesson 11
Using Hierarchies
Understanding hierarchies and universes 11-2
Hierarchies 11-2
Natural hierarchies 11-3
Logical hierarchies 11-3
Working with hierarchies 11-4
Default hierarchies 11-4
Viewing default hierarchies 11-5
Creating custom hierarchies 11-8
Creating a custom hierarchy 11-9
The effect of custom hierarchies on default hierarchies 11-10
Editing types of hierarchies 11-12
Time hierarchies 11-13
Creating time hierarchies 11-13
Time hierarchies based on database functions 11-17
Table-based time hierarchies 11-19
Activity: Using hierarchies 11-21
Lesson summary 11-23
Quiz: Using Hierarchies 11-23
Lesson 12
Aggregate Awareness
Understanding aggregate awareness and universes 12-2
What is Aggregate Awareness? 12-2
Summary Tables 12-3
Summary Tables and SQL 12-4
Applying aggregate awareness to objects 12-5
Setting up Aggregate Awareness _ 12-5
Step 1: Insert a summary table and set joins cardinality 12-5
Step 2: Set the contexts 12-6
Step 3: Redefine the objects 12-7
Step 4: Define incompatible objects _ 12-9
Using aggregate awareness to resolve fan traps 12-12
Testing aggregate awareness 12-13
Activity: Aggregate awareness 12-14
Lesson summary 12-16
Quiz: Aggregate Awareness 12-16
Lesson 13
Derived Tables and Indexes
Using derived tables 13-2
What is a derived table? 13-2
Advantages of using derived tables 13-2
Adding derived tables 13-3
Activity: Derived tables 13-6
Applying index awareness 13-7
What is index awareness? 13-7
Setting up index awareness 13-8
Activity: Index awareness 13-12
Lesson summary 13-13
Quiz: Derived Tables and Indexes 13-13
Lesson 14
Linking Universes
Understanding linked universes 14-2
What are linked universes? 14-2
Using linked universes 14-3
Possible linking strategies 14-3
Advantages and limitations to linking 14-4
Creating links between universes 14-5
Linking universes 14-5
Editing the derived structure 14-7
Including one universe within another 14-8
When to link and when to include? 14-10
Activity: Linking universes 14-11
Lesson summary 14-12
Quiz: Linking Universes 14-12
Lesson 15
Securing Universes
Setting access restrictions on a universe 15-2
About security and universes 15-2
What is a restriction set? 15-2
Creating a restriction 15-4
Applying a restriction set to users 15-14
Setting restriction group priority 15-17
Viewing user and group restrictions 15-18
Activity: Setting access restrictions 15-19
Lesson summary 15-20
Quiz: Securing Universes 15-20
Lesson 17
Creating Universes from Metadata
Creating a universe from an XML metadata file 17-2
Which metadata sources are supported? 17-2
Working in the Metadata Exchange panel 17-3
Creating a universe from metadata 17-4
Activity: Creating universes from metadata 17-9
Lesson summary 17-10
Quiz: Creating Universes from Metadata 17-10
Appendix A
End of Course Challenge
The Challenge A-2
Lesson 4
Creating Dimension Objects 2 hours
o Objects and classes
o Creating classes and objects
o Lesson summary
Lesson 5
Lesson 11
Using Hierarchies 45 minutes
o Understanding hierarchies and universes
o Working with hierarchies
o Lesson summary
Lesson 12
Aggregate Awareness 1 .5 hours
r
o Understanding aggregate awareness and universes
o Applying aggregate awareness to objects
o Lesson summary
Lesson 13
Derived Tables and Indexes 1 hour
o Using derived tables
o Applying index awareness
o Lesson summary
Lesson 14
Linking Universes 30 minutes
o Understanding linked universes
o Creating links between universes
o Lesson summary
Lesson 15
Securing Universes 45 minutes
o Setting access restrictions on a universe
o Lesson summary
Lesson 16
Managing Universes 45 minutes
o Documenting universes
o Deploying universes
o Maintaining universes
o Lesson Summary
Lesson 17
Creating Universes from Metadata 30 minutes
o Creating a universe from an XML metadata file
o Lesson summary
o The Challenge
Course audience
The target audience for this course is universe designers.
Prerequisite education
To be successful, learners who attend this course must have attended the
following offerings:
Not applicable for this offering
Prerequisite knowledge/experience
To be successful, learners who attend this course must have working
knowledge of:
Good working knowledge of SQL and/or relational database
management systems.
Familiarity with the type of data and the logical structure of the databases
in their organization.
Familiarity with BusinessObjects Web Intelligence, Desktop Intelligence
and report building.
Course materials
The materials included with the course materials are:
Name card
Instructor's Guide
The Instructor's Guide contains an agenda, lessons, and practice
activities. The Instructor's Guide outlines detailed contents as well as
instructor notes, which do not appear in the Learner's Guide, for teaching
this course.
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.
Point out the Evaluation form
feedback At the conclusion of this course, instruct the learners to provide feedback
form located on the course content, instructor, and facility through the evaluation
at the back of process. Their comments will assist us to improve future courses.
the training
Additional information for the course is provided on the resource CD or as a
guide to the
learners as hard copy:
part of the Sample files
course intro- The sample files on the resource CD can include required files for the
duction and course activities and/or supplemental content to the training guide.
again at the
end of last Overview webinar(s)
day of class. Additional resources include:
Online Help and User's Guide
As an instructor, encourage the learners to retrieve information and find
answers to questions using the online Help and/or the User's Guide that
are included with the product.
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.
Facilities Setup
This section lists the facilities setup requirements for the course.
Facilities Setup
The classroom should have the following:
This section Learners' Guides, one per student
is to be
Note: Learners' Guides should be delivered to the training site three business
completed by
the Business days before the training class is scheduled to begin.
Objects An overhead display panel/projector connected to the instructor's
training computer
customer.
A whiteboard and a variety of erasable markers and eraser
A flip chart and a variety of markers
A non-laser pointer
Allow 8-12 One computer for the instructor and one computer for each learner taking
hours to the course (maximum of 12 learners in a classroom) with the minimum
complete this hardware and software requirements
section.
The minimum hardware requirements are:
Pentium3 700 MHz or higher processor required
512 MB RAM, 1 GB Recommended
CD-ROM or DVD drive Software
Deployment of Universes
This course uses the following universes:
Motors2004
Staff2004
eFashion
The first two universes listed will be created during this course. Both universes
access data that is stored in the Microsoft Access database, Motors2004.mdb.
This database file, plus the final version of the Motors2004.unv and
Staff2004.unv files are available on the course Resource CD.
THEN
Go to Step 3.
10.
IF
n for
foreFashion
eFashion already
already exists
exists.
15 Click Next.
16 Click Test Connection. Verify that the test was successful.
If you do not see the message 'The server is responding!" Click the <
Back button and resolve the issue.
20 Click OK.
21 Click Tools> Check Integrity.
22 Select the checkbox for Check All.
e'c 2ai"",~g~~
?,:»:~Objebtt: OK
'Pl!lwJ~ OK
. p&ti> C~8m'$: OK
[#O_k loop:OK
:£ffIJI\'m\1iIdi~
27 Click Continue.
28 Select the Folder.
29 Select the Groups (leave default if you are not sure).
30 Click OK.
The Universe successfully exported message appears.
31 Click OK.
32 Close BusinessObjects Designer.
33 Repeat this procedure for the two remaining universes used in this
course.
Note: As stated previously, the final versions of the Motors2004 and
Staff2004 universes and the Motors2004 database (used as data for
both universes) are provided on the course Resource CD.
Verify users can log into the J5P version of BusinessObjects Enterprise
11.
Getting Help
If you encounter difficulties while setting up your facility, contact your Business
Objects Training Coordinator.
Duration: 30 minutes
Introduction
This lesson gives a general introduction to universes.
After completing this unit you will be able to:
Describe a universe
Describe BusinessObjects Universe Designer interface elements
Save, export and import universes
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
intormation is stored. -
,"
Universes are made up of objects and classes that map to data in the
database, using everyday terms that describe the 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.
A BusinessObjects universe is a file that contains the following:
Connection parameters to a single data source.
SQL structures called objects that map to actual SQL structures in the
database such as columns, tables, and database functions. Objects are
grouped into classes.
A schema of the tables and joins used in the database. Objects are built from
the database structures that you include in your schema.
Web Intelligence, Desktop Intelligence or Crystal Reports users select the
universe they are authorized to access in order to build queries. They build a
query by selecting objects defined in the universe, and in this way, they are not
required to see or know anything about the underlying da!a structures in the
database.
BusinessObjects Designer XI Release 2 now gives universe designers the
ability to build universes from OLAP and metadata sources. It also offers the
ability to build universes against Unicode databases and run reports that
display data in multiple languages.
J0
'-./
'--/
'--./
'--'"
'--'"
'''-./
-./
'-.../
---../
-..../
---../
---../
-.../
tV
The objects you create in the universe must be relevant to the·end user's
business environment and vocabulary. The role of objects is to present a
business-focused front end to the SQL structures in the database.
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 sub-classes.
Objects
An object is a named component that maps to data or a derivation of data in
the database. The name of an object should be drawn from the business
vocabulary of the targeted user group. Objects and classes are discussed in
more detail in Lesson 4.
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 you use to create a universe is 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 iocally.
Human
Resources
~
I
('
('
('
(~
('
r
('
~
I
('
('
('
('
('
('
/
To start Designer:
1 Click the Start button on the taskbar.
2 Select the Programs menu.
3 Click the Designer program from the StartlPrograms/BusinessObjects
11/BusinessObjects Enterprise program menu.
The login dialog box for the repository appears.
The default
user name is
Administrator
The default
password is
left blank.
authentication
your
name repository level
of the repository
user name
server
passwor.
thentication Login information
I
User
Password
Name
System
I~
I~
(
~
Ir--
Menu options
You can perform most tasks by choosing options from the menu. The Designer
menu bar looks like this:
Toolbar buttons
The toolbar gives you quick access to many tasks. Designer has three tool bars:
the Standard toolba, the Editing toolbar, and the Formula tool bar..
Right-click menus
Drop-down menus display on your screen when you click the right mouse
button. Drop-down menus usually give you access to options related to the
task you are currently performing. For example, if you click the right mouse
button in the Universe pane, a drop-down menu for creating classes and
objects is displayed:
Designer window
The Universe window is made up of two segments.
On the right- hand side is the pane in which you insert the database
tables and then view the universe structure that infers the FROM and
SELECT clauses into a SELECT statement.
This is known as the Structure pane.
On the left-hand side is the pane in which you create the classes and
objects that users will see when they build queries using this universe.
The objects physically point to the tables you see in the Structure pane.
This is known as the Universe pane.
Zoom
Often it is not possible to view the whole of the schema at normal magnification
due to its size. Zoom in or out using the drop-down list to choose your
percentage view for the schema.
Arrange tables
You can select this button to have Designer automatically organize your tables
sequentially and horizontally.
Note: You can undo only the last command. If you do not like the results,
choose Undo from the Edit menu.
Ctrl-A.
Action
Click it. the
the
Ctrl-click
you want header of the
to highlight.
header table.
of table
each and
tabledrag and
(or join)
Procedure
table or join drop the table to the desired position.
To
To mark
To mark more
move
mark aa join
a
all than
table
tables
single onejoins
and
table
I~
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 Designer.
You can import one or more universes stored in a universe folder in the
repository.
To import a universe:
1 Select the Import command from the File menu.
The Import Universe dialog box appears.
2 Select a universe folder from the drop-down list
To save a universe:
The universe name can be different from the .unv file name.
Designer XI When you use Save As to save the universe under a new name, the new
no longer universe is not associated in the repository. You must export the new universe
requires that to the repository to create a version of the new universe.
the universe
file name be You can use the following methods to save a universe:
8 characters 1 Select File> Save from the menu bar.
or less. 2 Click the Save icon.
3 Press CTRL+S on the keyboard.
Note: Do not save two different universes with the same file name. This leads
to conflicts when you attempt to export these universes to the
repository.
J
To save universe information as a PDF file:
1 Select File> Save As.
2 Select Portable Document Format (PDF) from the Save as type drop-
down list.
3 Click Save.
Objectives
By the end of this activity, you will be able to:
Open a universe and identify universe elements in Designer.
Instructions
1 Open Designer.
2 Open the eFashion.unv file found in the default installation folder:
C:\Program Files\Business Objects\BusinessObjects Enterprise
11.5\Samples\en\Universes
Or, find the same file on the Resource CD for this course.
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 the Arrange Tables button to automatically organize tables.
7 Click the View List Mode button 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 Right-click the Article_Color_Lookup table to view Number of Rows in
Table (Refresh row count for all tables).
10 Right-click the Article_Color_Lookup table to view a sample of Table
Values.
11 Open the Product class to view the objects it contains.
12 Double-click the Color object (notice the name, description, and select
fields).
13 Select Parameters on the File menu and change the universe long name
to New eFashion.
14 Close the universe.
Introduction
Universe development is a cyclical process that includes planning, designing,
building, distribution, and maintenance phases. Use Designer to design and
build a universe. However, the usability of any universe is directly related to
how successfully the other phases in the development cycle interact with each
other.
Know what
Understand
Familiarize
Identify what ·
data
limitations.
theproject
a target is
yourself
user
the contained
standard
information
joins.
population
strategy.
withreports
cardinality.
data within
company
the
For
90urce and
users
users each
example,
andhow
business
need. table
require.
it isthe
become of
structured.
number
familiar
Phase
Analysis
Planning
· ofDevelopment
with
level.
For
each
shouldits
departmentstructure.
universes
example,
ofhave
terminology
Preparation
orthat
isby
the target
the
so the
Description
should be
username
capacity
you task?
can created
group
databases. and
structured
to beobjects
linked and which
by
to what
sensibly. ones
Stress with The analysis of user requirements and design are the most important stages
learners the in the process. Users must be heavily involved in the development process if
importance of the universe is going to fulfill their needs both with the business language used
using a to name objects and the data that can be accessed.
phased or
iterative Implementation will be successful if the first three stages are carried out
approach properly. It is advisable to spend 80% of the time allocated to the development
during of a universe on the first three stages:
universe preparing
design and analyzing
development.
planning
If you have spent the appropriate amount of time in laying the foundation for
your universe, the remaining 20% of the time spent actually using Designer to
build your universe will be much more productive.
r---
I
Objectives
By the end of the activity, you will be able to:
Use the first three stages of the Universe Development Cycle
Instructions
Familiarize yourself with the following 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?
Do you know what the users' ad-hoc information needs are?
Are you familiar with their business terminology and formats?
Review
Summary
Recap the After completing this lesson, you are now able to:
lesson Describe a universe
objectives
with the Describe BusinessObjects Universe Designer interface elements
learners as a Save, export and import universes
check that all Use the Universe Development Cycle.
learners have
acquired the
required
skills before
moving on to
the next
section.
Duration: 45 minutes
Introduction
In order to create a SusinessObjects universe, you must first be very familiar
with the data and structure of the database to which the universe will be
connected.
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).
Introduction
In this unit, we will begin to create the course universe, based on the analysis
of business requirements and the development plan above.
To create a new universe, you must first define a number of parameters, such
as the parameters to be used to connect to the data source.
After completing this unit, you will be able to:
Create a new universe
Create a new data source name
Create a new connection in Designer
Describe the universe parameter settings
dJotit IBM
iJ.;:1I Informix
E}··.i'ID Microsoft
. ffi @MS Access 2000
6 .@ MS Access 2002
,....~ . ODBC Drivers
1£ .. @.MS Analysis Services 2000
1£ . @ MS SQL Server 2000
!£ . @ MS SQL Server 7,x
11,,,,,% ~1ySQL
I£.§} NCR
l£i1l Oracle
f:B.@ SAP
l£·it'3 Sybase
Personal connections
Use personal connections to restrict data access to the universe creator and
the computer on which it was created.
You do not use personal connections to distribute universes. Use personal
connections:
to access personal data on a local machine
to access specific database accounts to test an SOL sample through the
Free-hand SOL option in BusinessObjects
Shared connections
Allow access to data for users. These connections are unsecured. Shared
connections can be useful in a universe testing environment.
Secured connections
Secured connections centralizes and control access to data. They are the
safest type of connection. Used secured connections to protect access to
sensitive data.
You can create secured connections with Designer.
Connections are stored in BusinessObjects Enterprise. These can be shared
with other designers with the appropriate privileges.
You must use secured connections if you want to distribute universes through
BusinessObjects Enterprise. Secured connections can be used and updated
at any time. To define a secured connection you must be using
BusinessObjects products in Enterprise mode.
After you have chosen your connection type and clicked Next, the Perform a
test page appears. It summarizes the information for your connection and
allows you to verify that the connection is valid.
You can accept the default advanced settings or select from the advanced
options.
4 Click Next.
The Custom page appears.
5 Customize the settings for listed parameters or accept the default
settings.
Custom Parameters
Define custom parameters to access your middleware
6 Click Finish.
If you created the connection from the Universe Parameters dialog box,
the Universe Parameters dialog box appears with the new connection
listed in the Connection box.
You can add new connections or edit existing connections from the
Connections dialog box. You cannot modify the name of an existing
connection.
2 Click Cancel to close the dialog box.
To edit a connection
1 Select Tools> Connections.
The Connections list appears.
2 Click a connection name in the list of available connections.
3 Click Edit.
The Login page for the connection appears.
4 Type a new data source or database name in the Data Source box if
required.
5 Type modifications to login parameters as required.
6 Click Next.
To delete a connection
1 Select Tools> Connections.
The Connections list appears.
2 Select a connection name in the list.
3 Click the Remove button.
A confirmation dialog box appears.
4 Click Yes.
The connection is removed from the list.
Universe parameters
This unit describes the parameters that you can define using the different tabs
available in the Universe Parameters dialog box.
For more detailed reference information about these parameters, refer to the
Business Objects Designer's Guide.
universe
Settings
SQL
Strategiesstatistics.
Limitations
Description
Types set
parameters
ofand
Universe
Version defined
queries
used
name, for
by the
for
that
that
revisionthe use
linked
the of system
universe.
canend
description, is resources.
universes.
be user
dynamically
Adesigner
strategy
allowed
connection
information, isconfigured.
a
toscript
run. and
parameters,
comments, used
and
toParameter
extract structural
information. information identify
These parameters from a database.
the universe.
Information
Parameter
Links
Controls
SQL
Strategies
Definition
Summary
Revision
Date
Universeofofthe
Information
List
Description last
number
modification
creation
number
about indicates
date
the and andthe
of classes,
universe the
the number
name
name
objects,
for ofthe
times
the
oftables,
yourself modifier.
orcreator.
another
aliases,
Information
Include
universe.
joins,
the
that
designer.
Description
and information
universe
you
bycontexts,
whom,
can
This
field
has
use about
information
ifand
you
on
been
it tothe the
hierarchies
so
track
exported universe
Identification
desire.
ischanges
only
contained for in
toavailable
themade
page. users
repository.
tointhe
the in the
Designer.
universe
Revision
Modified
Statistics
Comments
Created You can print the text contained in this box, which means
Selecting strategies
A strategy is a script that automatically extracts structural information from a
database or flat file. 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 SOL 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 uickl, and you want to use metadata --.--
information at already exists in ::!n::!t::!h::!seor database desiqn 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
will probably not use the automatic creation possibilities that the Strategies tab
offers.
Built-in strategies are the default strategies that are shipped with Designer.
You can select them by clicking the drop-down menus in this Strategies
Parameters tab. There are built-in strategies for all supported databases,
which cannot be modified. You can, however, create custom strategies, which
are known as external strategies. Built-in strategies appear by default before
external strategies in the drop-down lists.
Note: The built-in strategies for detecting joins will only select on matching
column names, ignoring all other column names, and may create
unnecessary joins.
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
queries generating more than one SOL statement.
The time limit that you specify for query execution is the total execution time
for a query. If the query contains multiple SOL 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 will not correspond to its allotted execution time
within the query.
When you specify an execution time limit for multiple SOL 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.
Links parameters are used to 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 saves on maintenance where some
objects are used in many universes.
'-
In Designer, you can dynamically configure certain SOL parameters that are
common to most databases to optimize the SOL generated when utilizing
them. These parameters apply only to the active universe, and are saved in
the .unv file. The parameters that are available from this page are no longer
listed in the PRM file for the target database.
Objectives
By the end of this activity, you will be able to:
Create a new universe and define its connection to the database.
Instructions
1 Copy the Motors2004.mdb file from the resource CD into a folder on the
C:\ drive.
2 Create a DSN called MotorsDSN.
3 Start a Designer session.
4 Log into the Enterprise server.
S Create a new universe and define the following parameters:
Name = Motors2004
Description = This universe provides information on the Prestige
Motor Cars Database for Showrooms, Models sold, Rental and Sales
Business
Connection = Motors2004
Tip: Use the New Connection Wizard to create the Motors2004 connection
against the Motors2004.mdb.
6 Save the new universe in a file called Motors2004.unv.
7 Create another new universe and define the following parameters:
Name = Staff2004
Description = This universe provides information on the personnel of
Prestige Cars.
Connection: Motors2004
8 Save the second universe in a file called Staff.unv and close it.
Review
Summary
After completing this lesson, you are now able to:
Understand the database you will use during this course
Know the specification of the universes you will build during the course
Create a new universe
Create a new data source name
Create a new connection in Designer
Describe the universe parameter settings
Duration: 1 hour
Introduction
A schema is a graphical representation of a database structure. In Designer
you create a schema for the part of the database that your universe represents.
After completing this unit, you will be able to:
Design a schema
Add tables in the Structure pane
Organize your view of tables
Designing a schema
The schema contains tables and joins. The tables contain columns that you
eventually map to objects 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 more
than one table.
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. These objects should be defined from a user
needs analysis. Examine the database for tables that allow you to create these
necessary objects.
D:\Universe Design\Sour
rBu ABSENCE
I±JL;! ..6.NNUALJIGURES
'u ANNUAL_SALARY
.w CLIENT
rBL;!' COLOUR
ffiL;! COUNTRY
$u DEPARTMENT
ffiL;! EMPLOYEE
$pL;! FINANCE_PERIOD
EBw FRANCHISE
$·0 JOB
['flu LOOKUP
$r;:J'MAKER
lEw MODEL
MODEL COLOURS
From the Table Browser you can select tables to include in the Universe
schema. You can insert a single table or multiple tables simultaneously.
'---' 10 .4
637829452.5
.8
.5
911
.4
Bentley
Forrester
Cherokee
V70
1199755
98763Carrera
64805
18225
21920
16995
26525
22800
19500
145005
71605
55005 ••..
. j! ----
IUOI ,
'u,
,,·qlU:1l
:::::::~
1052
V70
'---'
'--./
'---'
CLIENT _10
CLIENT _LASTNAME
CLIENT JIRSTNAME
CLIENT_ADDRESS
CLIENT _ TOIJN
CLIENT_AREA
CLlENT_AREA_CODE
CLIENT _PHONE_NO
REGION_ID
EMPLOYEE_ID
CLIENT_AGE
COUNTRY_ID
You can use various commands to manipulate tables within the Structure.
These are described in the sections that follow.
To select tables
Usually the first step in moving, copying, or deleting tables is to select them.
To select a single table, click the table header.
To select several tables, press Ctrl and click the table header of each
table you want to select in turn.
To select several tables that are graphically close together, use click and
drag to select multiple tables.
To select all tables, press Ctrl + A or choose Edit> Select All from the
menu bar.
To deselect a table
1 Click the background of the Structure.
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.
i REGION 10
rCOUNTW)O
EMPLOYEE~IO
j,1'-'LlENT 10
Gregory The
Don
Sarah
Neil
Osaka
34
Bedfordshir
Berkshire
Hertfordshil
'w'atford
D Satoru
T
London
Keith
Bob59
Isao
Steve
12
Reading
High
M 32435
Kenii
Tokyo
94 Gables
Leith
atsuo
unstable
45
10
190 Kawasaki
Downs
Hamilton
Sutton
asayuki
'w'yco Road
Yamamoto
Yorkshire
Toyota
Toyota
Apple
Toyota...Row
Ave
Grove ......
Road
P...
A
Blvd ...
'w'atts
Smith
Okumura
Thomas Johnson
Kamimura
Mukumoto
Makino
Oneda
Philips
Armstrong
3 Click Close.
Objectives
Insert tables into the Motors2004 universe.
Instructions
1 Insert the tables listed below into the Motors2004 universe.
COUNTRY
REGION
CLIENT
SALE
SALE_MODEL
COLOUR
MODEL
MAKER
STYLE
-
SALES PRICE RANGE -
SHOWROOM
FINANCE_PERIOD.
2 Order the tables so that they are laid out in the same way as the
illustration below.
~t~~~ro~~~bb
FP START
FP ::END
: FP YEAR
: FP -QUARTER
: FP :MONTH
mE}:::::·:·:····
SAlE.JD
CLIENT-ID
SALE-DATE
SHOWROOt-LID
SAlE.....SAL.E.....DISCOUNT
SALE-TYPE
<;:;:;:;:;:::t:W#Rytm SALE-TOTAL
:::OUNTRY_ID SALE-RENT AL-PERIOD
:OUNTRY_NAME
Introduction
After you have inserted more than one table in the schema, you need to create
joins between related tables. Ajoin is a condition that restricts the result set of
a multi-relational query. Joins are as important as tables in a schema because
they allow you to combine data from multiple tables in a meaningful way.
After completing this unit, you will be able to:
Understand why you need joins in the universe structure
Create joins
Set join cardinalities
Explain the join types
View the join expression using List Mode
Check the integrity of the universe structure and joins
To prevent this from happening, you need to specify a join between the tables
in the Structure pane in Designer.
REGION_IO
REGION_NAME
COUNTRVJO
4 Position the pencil symbol over the COUNTRY _ID column in the
REGION table.
The target column is highlighted.
5 Release the mouse button.
The join between the two tables is created. Note that the definition of the
join appears in the Formula toolbar.
6 Double-click the new join.
The Edit Join dialog box appears. It lists join properties.
Note: The properties that you can set for a join, including cardinality and
join type, are described in this or the following section. The Edit
Join dialog box displays the default properties of the join.
7 Click OK to close the Edit Join dialog box.
8 Click the new join and press the Delete key to continue the exercise.
Click
The Edit Join dialog box appears.
2 Select the COUNTRY table from the Table1 drop-down list.
The columns for the COUNTRY table appear in the list under the table
name.
3 Click COUNTRY _ID, the column that you want to be at one end of the
new join.
4 Select the REGION table from the Table2 drop-down list.
The columns for the REGION table appear in the list under the table
name.
S Click COUNTRY _ID, 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.
Note: The properties that you can set for this join, including the join
operator, cardinality, and join type are described in the following
sections of this lesson.
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.
Table1 Table at the left end of the join. Columns are listed
for the table selected in the drop-down list.
Table2 Table at the right side of the join. Columns are listed
for the table selected in the drop-down list.
Operator Operator that defines how the tables are joined. The
operators available to a join are described in the
section.
Shortcut Join Defines the join as a shortcut join. Shortcut joins are
described in the following section.
Join operators
Select an operator for a join from the drop-down list between the Table1 and
Table2 boxes. The operator allows you to define the restriction that the join uses to
match data between the joined columns.
<
>=
<=
>
=
--- I is equal
less
is greatertothan
than
not equal or
to equal to to
or equal
!=
Edit
The Edit button opens an SOL 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 SOL syntax of the
join expression. If the parse is successful, you receive a result is OK message. If
Designer encounters an error, you receive an error message indicating the
source of the problem.
~
I
3 Click the join expression in the text box at the place where you want to
add or modify the SQL syntax.
You can use the editing features to modify or add SQL syntax as follows:
About cardinality
Cardinality is the means by which Designer identifies the relationships
between tables in the universe structure. The cardinality can be one-to-one (1-
1), or one-to-many (1-N). For example, a country can have many regions, so
the relationship between the Country and Region tables is 1-N. The cardinality
information has nothing to do with inferring the SQL. It is used only to give the
other detection routines the information they need to detect and resolve loops.
Note: It is very important that all cardinalities are set correctly for the loop
detection and resolution routines to work correctly. These routines will
be presented in detail later in this course.
You can choose to set cardinality manually or by using an automatic detection
routine.
~
'-.../
'-.../
4
Click OK to validate your changes and close the Edit Join dialog box.
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).
CUENT FIRSTNAME
CUENT ADDRESS
CUENT TOWN
CUENT AREA
ICUENT LASTNAME
UENT AREA CODE
UENT PHONE NO
IREGION 10
EMPLOYEE 10
CUENT AGE
'COUNTRY 10
UENT 10
SHOWROOM 10
SALE SALE
ISALE DATE DISCOUNT
SALE TYPE
Outer joins Link two tables, one of which has rows that may
not match those in the common column of the
other table.
~-_ __ .._---.........,
I COUNTR'(COUNTRY __
REGION.REGlON_NAME • !
rROM
COUNTR~ ',
IwHERE
REGION !'
,!COUNTRY.COUNTR'CIP-REGlON,COUNTRY_IQ ) I
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 on~yshow information on US and UK. However, you may wish
to show all three countries irrespective of equivalent value in the foreign key of
the Region table. To achieve this you should use an outer join.
In specifying an outer join in a standard SOL Select statement, you are
required to identify which of the two tables is the outer. Using straight SOL (as
opposed to generating it using a universe), the problem is that different
RDBMS define outer differently and the syntax of the statement also differs.
For example, depending on the underlying RDBMS, the outer join may be on
the left or right.
In a universe, you can get around this problem by always defining the outer
join on the opposite table to the one you want all values from, irrespective of
the RDBMS. The outer join is always placed on the table that contains all the
data, that is for, Country, in the example above.To do this, you place a check
against that table in the Edit Join box. Once this is done, the correct outer join
is therefore inferred when used in the generated query, and the syntax is
always correctly inferred for the appropriate RDBMS (assuming you have the
correct SOL inference driver).
Using an outer join would return all countries, including those without regions.
An outer join is shown by a small circle on the join line in the universe structure.
I~b
I
If you do place outer joins in the middle of a table path, the subsequent joins
in the path may also have to be made outer to avoid errors.
Always remember that outer joins may cause the query to run slower than a
query with no outer joins.
This problem can be resolved by using aliases and aggregate aware, both of
which are covered in later lessons of this course.
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.
In such a case, the shortcut join is only effective when the value being looked
up has been denormalized to lower levels in a hierarchy of tables, so the same
value exists at all the levels being joined.
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 (S = car
sale, R = car rental). Without the self-restricting join, the results set of the query
would produce rows where the Sale_Type column is equal to either'S' or 'R'. With
the self-restricting join in place, any object based on the table or joins passing
through that table would produce query results covering only car sales.
There are several other ways of restricting data, which are covered in a later lesson
of this course.
._.Car MDDELMODEL PRICE between SALES PRICE RANGE.PRICE RANGE ANNUAL fiGURES
;t:··:.iBsnov..oom SALE.SALE DATE between FINANCE PERIOD.FP START and FINANCE; MODELS-
SHOWAOOM.SHO'W'ROOM ID=SALE~SHOWROOM ID . RENTALS
&~Client FRANCHISE
CUENT .CUEHT ID-SALE.WENT ID -
· (:~
i·..·1I!J Area
SALE.5ALE ID=5ALE
SALE MODELMODEL
SALE-MODELCOLOUA
MODELSAlE
ID=MODELMODEl
ID
lD=COlDUR.COLDUA
10
ID
SAliS
2 Select the Check Universe Structure and Parse Joins check boxes.
3 Click OK.
Designer checks the universe and displays the Integrity Check Results
dialog box.
l'i!'UlffillnE.
Objectives
By the end of this activity, you will be able to:
Insert joins between tables in the Motors2004 universe and set
cardinalities.
Instructions
1 Insert the following equi-join using the drag-and-drop technique:
COUNTRY COUNTRY _10 to REGION.COUNTRY _10
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 CLlENT.REGION_ID
4 Insert the following theta join and set cardinality.
MODEL.MODEL_PRICE BETWEEN
SALE_PRICE_RANGE.PRICE_RANGE_MIN AND
SALE_PRICE_RANGE.PRICE_RANGE_MAX
5 Insert the following self restricting join and set cardinality.
SALE.SALE TYPE='S'
6 Check integrity for:
Universe structure and joins
7 Notice the divergences found in the integrity check of the Motors2004
universe. This is the result of having un-joined tables.
8 Check that the universe structure includes all of the joins in the table
below:
The joins
should be
- defined with 1:N
N:1
Cardinality Theta
Self
Type
Equi
GE.PRICE_RANGE_MIN
_ID AND following
Joins
SALE_PRICE_RANGE.PRICE_RANGE_MAX
theSHOWROOM.SHOWROOM_id =
D
YICE
= CLiENTREGION_ID
IENT
_IDBETWEEN
=ID=SALE.CLlENT IDcardinalities:
REGION.COUNTRY_ID SALE.SALE_TYPE='S'
SALE_MODEL.MODEL_ID = MODEL.MODEL_ID
.
Equi N:1
1:N
Cardinality Theta
Type
Equi
_START AND Joins
FINANCE_PERIOD.FP _END
BETWEEN
==
R_ID=COLOUR.COLOUR_ID
MAKER.MAKER_ID
STYLE.STYLE_ID SALE.SALE_ID = SALE_MODEL.SALE_ID
Lesson summary
Review
'I:, 1 Tables
~~'
'/ 2 Joins
2 What are three reasons that using the automatic detection routine for
setting join cardinalities is not recommended?
Answer:
Summary
Recap the After completing this lesson, you are now able to:
lesson
Design a schema
objectives
with the Add tables in the Structure pane
learners as a Organize your view of tables
check that all
Understand why you need joins in the universe structure
learners have
acquired the Create joins
required Set join cardinalities
skills b~fore Explain the join types
moving on to
the next View the join expression using List Mode
section. Check the integrity of the universe structure and joins
Duration: 2 hours
Introduction
Because universes are made up of objects and classes, it is important to
understand exactly how each of these elements is used.
After completing this unit, you will be able to:
Explain what universe objects are
Explain what universe classes are
Objects
In Business Objects products, an object is a named component in a universe
that represents a column or function in a database.
In 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
Designer are the objects that end users see and use in the reporting tools, for
example, in Web Intelligence.
In the Java Report Panel, Web Intelligence 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 Web Intelligence Java or HTML report panel, the
object infers a SELECT statement. When multiple objects are combined, a
SELECT statement is run on the database which includes the SOL inferred by
each object and a default WHERE clause.
As a universe designer, you use Designer to create the objects that Web
Intelligence users select to build and run their queries.
You can also create objects for use only in Designer, so that they are hidden
in Web Intelligence, Desktop Intelligence or Crystal Reports.
pare that
a dimension. map is
dimensions.
A detail to always
statistics in the
o i. Costof
Sales
.q. -CarSales
Revenue
Model
Colour Description
columns
database
attached dimension
query.
rics by a or
that
towhich functions
maps
are
dimension.
oryou key
wanttoItinone
to
totheProvides
Focus
or more
acom- descriptive
of analysis
Contains adata about
aggregatein functions
query. A
ualification $.
in .. 8J
[t}.
I~HiliiiJ CarModel
2L Category
8JMaker of Car o Object
or Number
database. of CarsSold
functions
tion
that related
provide These
in
to athe maps
are Examples
database
the
dimension.
detailed
to one
met-
informa-
more columns
Measure !~J:i&!J Sales
Figures Dimension
etail
g.~ISalesl
(~ Sales Details
9~ Sales Dates
r i!.iI Sale Month
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.
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.
Introduction
Now that we have defined classes and objects, the next step is to understand
how to employ these elements. This unit will focus on classes.
After completing this unit, you will be able to:
Create a class
Create objects
Create classes and objects automatically
Create classes and objects by copy and paste from another universe
Edit object parameters
Check integrity
Test the objects in Web Intelligence
Creating classes
To create a class:
1 Click the 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,
you will create a subclass within that class.
2 i~~
Click @,«ifrom the Editing tool bar.
OR
Select Insert> Class from the menu bar.
OR
Right-click in the Universe pane and choose Insert Class from the
speedmenu.
The Class Edit Properties dialog box displays.
3 In the Class Name field, enter a name.
4 In the Description field, enter a description of the class content. This will
be reviewed by users, so it should be written in their business language.
Avoid technical database language.
Creating an object
To manually create an object
1 Click the class in which you want the new object to be placed.
In this example, click the Client class.
9 ,i;j Car
, l. iu Sales Prices
8~ Client
6 Follow the procedure to create a second object in the Client class, and
name the object Client ID.
!?,~ Car
L .. fijI Country Id
8·~ Client
f"~$J -r:-lie-n-t-T-ow-n~1
8·· ill Client Name
Note that the name of the object is based on an adaptation of the column
name. This is based on a strategy that is set in the Strategies tab of the
Parameters dialog box. The default strategy used replaces underscores with
spaces and the initials of each character string are altered to upper case and
the remainder becomes lower case.
The key advantage of this object creation method is that it automatically places
the column in the SELECT field of the object properties as illustrated below.
The Objects and Classes window will now look similar to:
-~
: l..~ Sales Prices
GH~ Client
Note: It is recommended that you do not create too many levels of sub-
classes (more than three) because too many levels make it difficult
for users to find the objects they need.
To delete a class
1 Click the Sales Price subclass.
2 Press the Delete key.
OR
Right-click the sub-class and then choose the Clear option from the drop-
down menu.
The remaining tabs in the Edit Properties dialog box are described in the
following sections.
This folder also stores the .LOV files created in Designer which are used to
restrict the list of values returned for objects for which the designer wants to
control access to the data.
If you then use Client Country in a query with the Client Name object, the query
will not need to reference the Country table in the database; the Country data
will be taken from the Client table directly.
':ELECT
COUNTRY,GOUtrR\'_~H\ME"
CUENT.CUENTJASTI'P,i-J'E " ',' " CLiENTCLlENTJ;RSTNAi-AE
-ROM
CCI)NTRY
CUE!,,(
F~EGiCf',!
HERE
((·;C~UNTR'r-';COUh!TF~'(~)D;::REGJON.C:JUt~iTi,{_10. -)
l~ND (REGIO~J.F{EC~iOH ...tD " CUEi,jT.REG;C~N...,iU)
You can specify the following types of information in the Source Information
tab:
To find a string
1 Ensure the Objects pane of the 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 Click Find from the standard toolbar.
The Find/Replace dialog box opens.
'-.-/
245
'-../
'-.-/
---../
---../ 3
Enter the string to search for in the Find What field and the string with
which it is to be substituted in the Replace field.
Select the check box as required.
Click Find Next.
Click Replace and then move to the next instance of the string by either
clicking Find Next or the standard toolbar option.
1 Click
The Integrity Check dialog box displays.
2 Select the P~rse Objects check box:
"'
/'
/~'
3
4 Designer checks the universe and displays the Results dialog box.
5 Identify the reason for any reported errors and resolve them.
To associate a table:
1 Right-click the object.
2 Select the View Associated Table option.
The associated tables of the object will be highlighted in the Universe Structure
pane and the list mode display (if open).
Objectives:
By the end of this activity, you will be able to:
Create and test classes and objects.
Instructions
In this workshop you will create classes, subclasses and dimension and detail
objects for the Motors2004 universe and then test the universe's objects and
joins.
1 Create the following class:
Client
2 Create the following class and subclass:
Car
Sale Prices (subclass of Car)
3 Create a Client Name dimension object manually with the settings:
Type = Character
Description = Last name, First name
SELECT = CLlENT.CLlENT_LASTNAME +', '+
CLlENT.CLlENT FIRSTNAME
Associate a LOV
4 Create a Client 10 detail object automatically with the settings:
Type = Number
Description = Unique Client 10 Number
SELECT = CLlENT.CLlENT _10
No Associated LOV
5 Check the integrity of the objects.
6 Create the Showroom class.
7 Create objects for each of the classes as identified in the tables below.
Some of the properties for each object have been specified for you.
However, you will have to determine the data type, qualification, and
whether or not a LOV should be associated with each object.
Showroom class
SELECT
SHOW- Statement Object inofwhich
Name
Address
showroom
Town of
show- showroom
ROOM.SHOWROOM_ADDRESS
SHOWROOM.SHOWROOM_
SHOWROOM.SHOWROOM_NAME TOWN
room
exists
Description
Object Name
8 Modify the properties of the following objects so that they are qualified as
detail objects, and associated with the Client Name dimension object:
Client Address
Area Code
Phone Number
9 Modify the properties of the Showroom Address object so that it is
qualified as a detail object, and associated with the Showroom dimension
object.
10 Create a class called Sales and two sub-classes in the Sales class:
Sales Details
Sales Dates
11 Drag the FINANCE_PERIOD table from the Structure pane and drop it in
the Universe pane.
12 Edit the objects that have been created automatically in the new Finance
class, according to the table below.
Financial class
- - SELECT
FINANCE Statement
PERIOD.FP
FINANCE_PERIOD.FP
Object
YEAR
FY03-04 For example, Q1 Month 01
_QUARTER
_MONTH
Description
Object Name
Financial
13 Make sure you have defined each object using the appropriate object
type.
The Class and Objects pane in Designer show appear like this:
r .. · m. Country.
:..··11 Region
~.--m Area
m ..Client Town
['}: 11 Client Name
Client ID
Client Address
Area Code
Phone Number
GJ·:®J Car
;.;;J "Maker
: ... 11 Category of Car
$'~ ~howrQoml
. :.:.:11 Showroom Town
!~1:',®J Sales
S·.€iJ Sales Details
',. m Invoice ID Number
Review
Summary
After completing this lesson, you are now able to:
Explain what universe objects are
I;:xplain what universe classes are
Create a class
Create objects
Create classes and objects automatically
Create classes and objects by copy and paste from another universe
Edit object parameters
Check integrity
Test the objects in Web Intelligence
Duration: 30 minutes
Introduction
After completing this unit, you will be able to:
Define measure objects
Determine levels of aggregation
You can see from the illustration that two separate queries using the same
Sales Revenue measure object but different dimension objects results in the
measure returning different values.
Levels of aggregation
How a measure infers SQL
If an aggregate function was used in the Select definition of the object, it
automatically infers a Group By clause in the Select statement if it also
includes other types of objects.
Inference of the Group By clause is dependent on the SOL rule:
If the Select clause line contains an aggregate, everything outside of that
aggregate in the clause must also appear in the Group By clause.
That is why dimension and detail objects must not contain aggregates. Any
dimension or detail that is used in the same Web Intelligence query as a
measure object will always be included in an automatically inferred Group By
clause.
In the example above, you can see that the Country dimension object is
inferred not only in the Select clause, but in the Group By clause.
"ki
/
II Server Query (SQL)
Enterprise
..•
~ I
I
I ~.
Results
I provider
I
Report . I
I
,
When projecting only some variables from the microcube, aggregation occurs.
Minimum
Sum
Count
Maximum
Average
None or Average (not
·· Recommended Projected
·· · Select Aggregate
recommended)
Aggregate
Introduction
After completing this unit, you will be able to:
Create measure objects
Test measure objects in Web Intelligence
Tip: It is best to use the Select Edit box to insert the Select clause content of
a measure as you can then use the Function and Columns pick lists.
Objectives
By the end of this activity, you will be able to:
Create and test measure objects.
Instructions
1 Create the following subclass in the Sales class:
Sales Figures
2 Create a Sales Revenue measure object with the settings:
Type = Number
Description = Total Sale Invoice Revenue
Select = SUM(SALE_MODEL.SALE_QTY *
MODEL.MODEL_PRICE * ((100 - SALE.SALE_SALE_DISCOUNT) /
100»
Function = SUM
No Associated LOV
3 Test the Sales Revenue object as follows:
Save the universe. Export the universe and log into InfoView. Create
a new Web Intelligence document and select the universe you just
exported.
Build a query containing only the Sales Revenue object. Note the
value returned.
Edit the query by adding the Country dimension object. Check the
SQL and note the GROUP BY clause. It should contain the SQL for
the Country object. Run the query. Apply a SUM calculation to the
Sales Revenue column of the projected block. Does the sum match
the value of the previous query? Note the value of the Sales
Revenue in a row of the block (for example, USA).
Edit the query by adding the Region dimension object. Check the
SQL and note the GROUP BY clause. It should now contain the SQL
for the Country and Region objects. Run the query. Apply a break to
the Country column and reapply the sum calculation to the Sales
Revenue column of the projected block. Does the Country group
sum match the value of the noted block row from the previous query
(e.g. USA)?
Change the projection to the block from the microcube by removing
the Region column from the block. Does it aggregate to Country level
correctly?
Edit projection to the block from the microcube by removing the
Country column from the block. Does it aggregate to the total Sales
Revenue level correctly?
Edit the query again to remove all objects except Sales Revenue.
Add the Showroom and Maker objects, and run the query. Using drag
Object
SalesCost
Select StatementTotal ofQTY)
NumberCar
of Cars Sold
SUM(SAlE_MODEL.SAlE_ QTY
* MODEL. MODEL_COST) Description
Object Name
sles
Review
Summary
Recap the After completing this lesson, you are now able to:
lesson
Define measure objects
objectives
with the Determine levels of aggregation
learners as a Create measure objects
check that all Test measure objects in Web Intelligence
learners have
acquired the
required
skills before
moving on to
the next
section.
Duration: 30 minutes
Introduction
A list of values is a list that contains the distinct data values associated with an
object.
After completing this unit, you will be able to:
Explain what a list of values (LOV) is
Use a list of values in Web Intelligence
As you create objects in the universe, you should use the following questions
as a guide to help you decide if you should associate a LOV to an object or not:
Do the users need to see a list of values for this object? Are they
likely to want to apply query filters or condition on this object?
Is the data dynamic or static? Will the data be updated frequently?
How long will it take to run the SELECT DISTINCT query?
What does the list need to include?
Using a LOV
When users build queries in Web Intelligence or Desktop Intelligence, they can
define query filters (or conditions, in Desktop Intelligence) to restrict the
amount of data returned by a specific object used in the query. To do this, they
view the list of values for that object in order to specify which value(s) will be
returned. The LOV for the object appears in the Web Intelligence Filter Editor,
which helps the user choose the terms for the filter.
For example, in the Maker object with the SELECT clause
MAKER.MAKER_NAME, the LOV will contain all the distinct car
manufacturer's names in the MAKER table. A user who wants to limit the query
MotOls2004 L5 Final
~~-'WJ,Sales Dates
4 Click the bulleted list to the far right of the query filter definition and select
the Value(s) from list operand from the Operand Type list.
This list of values returned by the Maker name object appear in the Filter
Editor, as shown below:
/
The query filter appears as in this example:
Introduction
A list of values is a list that contains the distinct data values associated with an
object.
After completing this unit, you will be able to:
Associate a LOV with an object
View the contents of a LOV '.
Set options for generating a LOV
Modifying the contents of a LOV
Create a hierarchical view of a LOV
3 If you want to turn off the LOV for this object, click the Associate a List
of Values check box to clear it.
....J
Using Lists of Values-instructor's Guide 6-5
There are three things that a universe designer should keep in mind when
deciding whether or not to associate a LOV to an object:
Because a LOV is based on a SELECT DISTINCT query that is fired at
the target database, associating a LOV will have implications for the
efficiency of Web Intelligence or Desktop Intelligence.
The only purpose for creating a LOV is to assist the end user in choosing
an operand value for a query filter. If the LOV does not do this, there is no
point in associating it with the object.
The LOV only holds values that exist within the database.
It is therefore recommended that you do not provide a LOV for the following
types of object:
All measure objects
Any object where the LOV will consist of a large number of values
Any object where the list on its own would be meaningless
Aston Martin
Caterham
Ferrari
Jaguar
Jeep
Lotus
Porsche .
Rolls Royce
Subaru
Volvo
To create a file to hold the contents of the LOV query in Designer, use the same
procedure, but instead of clicking Cancel at step 4, click OK. In that case, the
list is saved as a .LOV file in the universe subfolder on the file system.
The default location is the Universe subfolder of the default installation folder:
The default name for the list is taken from the first five characters of the object
name, followed by digits that refer to the order in which objects are displayed
in the Classes and Objects window. The file has an .LOV extension.
As a designer, you can edit the list name to call the file anything you want (with
an .LOV extension). Clicking the Restore Default button changes the name
back to the default file name.
/ '-oJ
Hierarchical display
If you select the third check box, Hierarchical Display, the list of values will be
displayed in the hierarchical order that you as a universe designer have
defined.
The hierarchical display of LOVs is discussed in the next section of this lesson.
2 Edit the list of values by dragging and dropping the Category of Car name
object into the Conditions pane, and applying a condition as shown
below:
3 Click Run to save the condition and close the Query Panel.
H:;'~Client
a:i~ Showroom
The List of Values dialog box displays all the objects in this universe that
have an LOV associated with them. From here, you can select any of
these objects, display, edit, purge and refresh the LOV.
Jeep
Subaru
2 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, as shown below:
o Country
Region
3~
Area
, Client Name
Client Id
Note: Other than the original object, which must be listed first, the other
objects should be listed in hierarchical order, one-to-many, left to
right, and each object should be sorted.
3 Click Run to save the LOV query and close the Query Panel.
_ Germany
41·GiliI Japan
!±1-!jJ)jJ United Kingdom
81;ZS USA
Gill East Coast
gj' Northern States
l?ifi!I Chicago
, iii Baker, Tom
·1iI Baker, William
iii Brown, Nick
iii D~lan; Bob
iii Getz, Stan
iii Jones, Tom
Iii Lee-Curtis,Jamie
5 Click OK to set the hierarchical view as the default display of the LOV for
Desktop Intelligence users.
Continue to the next unit to discuss hierarchical view and cascading LOVs in
Web Intelligence,
Introduction
A cascading LOV is a feature in Designer that allows you to associate a LOV to a
series of objects defined in a hierarchy.When a user applies a prompted query filter
to one of the objects used in the cascading LOV,Web Intelligence prompts the user
to select a value for each level of the hierarchy.
Note: You remove a cascading LOV in the same way that you remove an
ordinary LOV, by editing the object properties and deleting the
condition in the object definition.
After completing this unit, you will be able to:
Set up a cascading LOV
Use the cascading LOV in Web Intelligence
_Car
[~.@]Client
• :n' n Country
;...:fj Region
··..m Town
>:. ill. Area
[fj··ml!lllm!lll!l
: ..4 Address
~.,.' Area Code
\. ·4 PhoneNumber
~ -CBent Id
; Number of dients
$'~5howroom
l·..·F~her,Canie
.: Lee.JoneScPelel
;... PetersLou
.-. Petea,Martin
i-' Smilh.John
Objectives
By the end of this activity, you will be able to:
Associate LOVs to objects.
Instructions
Use the 1 Edit the Maker object so that it only lists cars bought by clients from the
following UK.
objects in 2 Save and export the universe and then build a query in Web Intelligence
these
using the Maker object.
queries:
Maker, 3 Run the query to verify that only data from cars bought in the UK displays
Category of in the report.
Car, Model Tip: Use Maker when you create the query filter.
4 In Designer, create a cascading LOV using the objects in the Car class.
5 Save and export the universe.
6 Build a query in Web Intelligence 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.
7 In Designer, change the object definition to associate a standard List of
Values for all objects in the Car class.
8 Save and export the universe.
Review
Summary
Recap the After completing this lesson, you are now able to:
lesson
Explain what a list of values (LOV) is
objectives
with the Use a list of values in Web Intelligence
learners to Associate a LOV with an object
check that all View the contents of a LOV
learners have
Set options for generating a LOV
acquired the
required Create a hierarchical view of a LOV
skills before Set up a cascading LOV
moving on to
the next Use the cascading LOV in Web Intelligence
section.
Duration: 3 hours
'-../ J
Introduction
A loop is a join path issue that arises from the way that tables are related in a
relational database. Loops can produce instances where a query returns too
few rows of data.
Recognizing loops
LlENT LASTNAME
LlENT FIRSTNAME
LlENT ADDRESS
LlENT TOWN
. ~LlENT AREA
, LlENT PHONE NO
.•~CLlENT
REGION AREA
ID CODE
MPLOYEE 10
LlENT AGE
OUNTRY ID
ALE I
'LiENT ID
ALE DATE
HOWROOM ID
'ALE SALE DISCOUNT
'ALE TYPE
'ALE TOTAL
'ALE RENTAL PERIOD
A loop exists when the joins between tables form a continuous path.
For example, in the table layout above, the designer has added joins between
the two tables to create two linked sets of information.
One set links the car sale details, the client, and the client's region and
country of residence.
The other set links the car sale details, the showroom, and the country
where the showroom is located.
Together, these joins form a loop.
I
Problems caused by loops
Suppose users of the Motors2004 universe want to produce reports showing
the revenue generated by car sales to clients, including both the location of the
showroom where the cars are sold and the address (including country) of the
clients.
The designer adds the tables needed to provide this information and creates
the joins as shown in the example above. The designer has also created
objects for the Showroom Country, Client Country, and Sales Revenue.
If the loop was allowed to remain and a query could be run using the
Showroom Country, Client Country and Sales Revenue objects, the report
seems to suggest that only clients from the US bought cars in the US
showrooms, and only clients from the UK bought cars in the UK showrooms -
and no clients came from any other countries. When you know that there are
clients from other countries, this result shows that there is a problem.
AND {SALE.SALE_ID=SALE_MODEL.SALE_ID }
AND {SALE.SALE_TYPE= 'S' }
Notice that the two joins at the top of the SOL 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
Resolving loops
Loops are a problem inherent in SOL. Nevertheless, you rarely come across
them when writing one-off SOL scripts. It becomes more apparent, however,
because in building a universe you create a permanent model from which all
SOL queries are to be inferred. There are various techniques within SOL that
you can apply to resolve loops. These techniques can also be used to resolve
loops within the Designer module.
Introduction
One way to solve a loop in the universe structure is to create an alias table.
After completing this unit, you will be able to:
Describe aliases
Resolve loops using aliases
Resolve self-join loops using aliases
About aliases
CUENT LASTNAME
CLIENT FIRSTNAME
CLIENT ADDRESS
CLIENT TOWN
CLIENT AREA
CUENT AREA CODE
CUENT PHONE NO
REGION ID
EMPLOYEE ID
CUENT AGE
COUNTRY ID
SALE DATE
> SHOWROOM ID
SALE SALE DISCOUNT
SALE TYPE
,ICLIENT ID
I§~t~ ~~~'i-~L PERIOD
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 SOL into accepting that you are using two different tables.
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 will have
only the one end of the one-fa-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 SOL 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
1 The Loop 1/1 indicates how many loops have been detected. Ifthere 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.
2 Click Insert Alias in the Loop Detection dialog box.
Designer automatically creates an alias of the Country table. You may
need to move the new alias table so that you can see the structure.
Note: The original table of which the new table is an alias is shown in
brackets in the title.
In the above example, the Country_Showroom alias table has been created in
the Structure, the join between this Alias table and the Showroom table has
been made automatically, and the loop has been broken.
Note: When the problem table has two purposes, Designer might nominate
either of the two as the candidate for the Alias table.
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.
All the tables that could be aliased to resolve a loop are listed in the left
panel. The suggested alias names are shown in the right panel. You can
change these, if required.
3 Select a table name and click Rename.
The Rename Table dialog box displays.
4 Enter the new name for the alias and click OK.
The Rename Table dialog box closes and the new alias name is shown in
the right panel.
S To create the alias table, click Create.
Designer displays a confirmation request.
6 Click OK to create the alias table.
Note: If there are several candidates for aliases, you can then repeat the
process for the next table. When there is only one candidate (as in
the example above), 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 are still referring to the right table. It may be that
they should be defined from the alias table to infer the correct SQL and get the
correct result.
'---./1
Whichever method you choose, you must always redefine objects that now
use the Alias table.
EPT 10
EMP LASTNAME
EMP FIRSTNAME
EMP 008
EMP ADDRESS
EMP AREA CODE
EMP TOWN
EMP PHONE
SHOWROOM 10
EMP START
EMP MGR 10
EMP SEX
08 10
Each employee is uniquely identified by the EMP_10 field, and each employee
has a manager, who is identified by the EMP_MGR_IO 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_IO field to the EMP_10 field, as in
this example:
iiE'~RG6¥!i!i@;';;
',EMP ID
!~~~T JPsTNAME D
i~:~~
bl~~TNAME
!EMP ADDRESS
EMP U\STNAME
EMP FIRSTNAME
EMP D08
. EMP AREA CODE EMP ADDRESS
EMP TOWN EMP AREA CODE
EMP PHONE EMP TOWN
SHOWROOM ID EMP PHONE
EMP START SHOWROOM ID
EMP START
EMP MGR ID
EMP SEX
~t~EX=-·· [
When the self join has been resolved, you can create separate objects for both
the manager and the subordinate employees.
For example, in the Motors2004 universe you can then add a class named
Personnel, containing objects named Manager and Staff. The Select
statement for Manager needs to concatenate the Last name and First name
from the Managers table, while the Select statement for Staff needs to
concatenate the Last name and First name from the Employees table.
Note: This solution only works for situations where the levels in the hierarchy
are known and fixed. Alternative solutions are available for hierarchies
that are either of an unknown number of levels or variable.
Introduction
Another way to solve a loop in the universe structure is to use a shortcut join.
After completing this unit, you will be able to:
Describe how shortcut joins can make a query more efficient
Resolve loops using shortcut joins
ID
LASTNAME
FIRSTNAME
COUNTRY ID EGlON ID ADDRESS
COUNTRY NAME EGlON NAME TOWN
OUNTRY ID AREA
AREA CODE
PHONE NO
ID
If an end user runs a query including Country and Client (but not Region)
objects, you will find that the inferred SOL 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 SOL.
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 will not have to refer to the Region table.
i;HUm::iii;\WI;fu!wf''''
'CLIENT ID ..
CLIENT lJI.STNAME
CLIENT ADDRESS
. CLIENT TOWN
CLIENT AREA
._ •CLIENT AREA CODE
.••.•••
'- .\ • CLlENT
CLIENT PHONE
...•... NO
FIRSTNAME
-',,- ___ ~ REGION ID ID
EMPLOYEE
.••.•••
~...;;;.CLlENT .AGE.
However, you now have a loop. In this case, you can resolve the loop by
specifying the join as a shortcut join as opposed to creating an alias or
contexts.
'-./
'-.-/
'-../
Click the Shortcut join check box just below the Cardinality zone.
Click OK to close the dialog box.
The join has been redefined as a shortcut join, which appears in the
Structure window like this:
LlENT ID
ICLIENT LASTNAME
CLIENT FIRSTNAME
CLIENT ADDRESS
CLIENT TOWN
CLIENT ,",REA
CLIENT AREA CODE
CLIENT PHONE NO
REGION ID
MPLOYEE ID
LlENT AGE
OUNTRY ID
Now if you were to try detecting loops, you will find that none are
detected. The shortcut join is telling the SOL only to use this join if the
Region table is not included in the query. Therefore, there is no loop, and
the efficiency of the SOL has been improved.
Note: Shortcut joins are not automatically detected for contexts. If you want
to include them in a context you have to manually edit the context.
However, this is not always desirable. In some cases, the efficiency
gains of a shortcut join are based on the fact that it straddles contexts.
Objectives
By the end of this activity, you will be able to:
Resolve loops by creating alias tables.
Instructions
In this workshop you will add new tables, insert new joins, and set cardinality,
that will create loops in the Motors2004 universe. You will then resolve the
loops and test them.
1 Insert the following join and set its cardinality.
COUNTRYCOUNTRY _ID=SHOWROOM.COUNTRY _ID
2 Use the Detect Loop tool bar 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 tool bar button and create two alias tables called:
COUNTRY_SHOWROOM
COUNTRY REGION
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 _REGION.COUNTRY _ID=CLlENT.COUNTRY _ID
Set the new joins cardinalities. In the third join, be sure to select the
Shortcut join check box.
4 Create a Country object in the Showroom class with the settings:
Name = Showroom Country
Type = Character
Description = Country in which showroom exists
Select = COUNTRY _SHOWROOM.COUNTRY _NAME
Associate a LOV
5 Edit the Country object in the Client class as follows:
Name = Client Country
Select = COUNTRY _REGION.COUNTRY _NAME
6 Check integrity.
The check integrity routine will find divergences because the COUNTRY
table is now isolated. Ignore this message and don't delete the original
table.
7 Save and export the universe.
S In Web Intelligence, test the new objects as below.
Introduction
Another way to solve a loop in the universe structure is to create contexts.
After completing this unit, you will be able to:
Describe contexts
Resolve loops using contexts
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 our 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 results set of the query would produce
rows where the SALE_TYPE column is equal to either'S' or 'R'.
In Lesson 3, 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 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, will create a loop because the query will not know
which table to go through to get to the MODEL table, SALE or the alias
RENTAL.
You can solve this type of loop by creating two contexts which will define the
correct route through the universe structure. These routes link together tables
in the structure.
What is a context?
A context is simply 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.
Included in the context are all the tables that can be reached by following the
flow from many-fa-one. Tables that can only be reached by flowing back from
one-fa-many are not included in the context.
Note: If contexts are an important part of your universe structure, it can be
very helpful to arrange your tables in this way, so that you can easily
see the individual contexts.
, ''''''''\;; :eDENI':,:::':'::""
CUEI"T 10
CLIENT LASTNAME
CLIENT FIRSTNAME
CLIENT ADDRESS
CLIENT 'TOWN
CLIENT AREA
CLIENT AREA CODE
CLIENT PHONE NO
REGION 10
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 a Web Intelligence or Desktop Intelligence query. This is because
there are two alternative routes around the structure. Contexts are used to
specify those alternative 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:
and
Sale_Model
Sale.ClienUd
Sale.Sale_ld=
Style.Style_ld
Model.Model_Price
Model.
Sale_Model.
Maker.MakeUd
Sales ModeUd
MakeUd=
Client.Region_ld
Client.ClienUd= Content
Country.Country_ld=
Region.Country_ld
Region.
Sale _Price _Id between
ModeUd=
Region_ld=
_Range.
ModeI.Style_ld=
_Model.Sale Price
Price_Range
_Range_Max
_ Min
Max
Min and
Rental. ClienUd
Client.Region_ld
Sales
Region.Country_ld
_Price
Style.Style_ld_Range. Price_Range_
Rental_Model.Sale_ld
Model.ModeUd
Maker.Maker_ld RentaCModel Context
Sales_Price
Model.Model_Price
RentaI.Sale_ld=
Client.ClienUd=
RentaL
Model. _Range.
ModeI.Style_ld=
Maker
Model._Id=
Region.Region_ld=
Country. Country _Id=between
Price_Range_
ModeUd=
Note: The name of the context is normally defined by the table with only the
many 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 queries or Rentals queries,
dependent on the objects they select.
Note: Every join (excepting shortcut joins) must exist in at least one context.
In the Motors2004 universe, the routine would detect all the loops that
you created with the two alias Rental tables. The first loop is highlighted
in the Structure window, 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.
5 Click the Candidate Context button to see what the routine suggests.
The Candidate Contexts dialog box displays.
6 Highlight the Candidate Context you want to add and click the Add
button.
COUNTRY
MAKER
MODEL
REGION
RentaJ(SALE)
RENTAL.-MODEL (SAlE~ODEL)
SI'LE
SA.LE...MODEL
SALES_PRfCE.-F'\ANGE
S1YLE
The Joins panel indicates the joins that are involved in the currently
highlighted context. The Structure window highlights the tables that are
involved. If you click the SALES context in the Contexts panel of the List
Mode window, the Joins panel and the Structure window will highlight the
joins and tables in the SALES context.
10 When you have created the contexts you require to resolve the loops,
save the universe.
2 Define a name to identify the context in the Context Name field. In this
example, you might call your contexts SALES and RENTALS.
3 Select the joins that define the path for the context by clicking the
individual joins in the Current context join list. To remove a join from the
selected list, simply click it again to remove the highlight.
Note: You can also add joins to a context in the List Mode window. Select
the context to which you want to add a join, then press the Ctrl key
and click the join you want to add.
4 When you have made a selection of joins, click the Check button to have
Designer check whether there are any loops in the joins you have
selected.
Editing a context
Sometimes, when a user makes a query containing objects that require the
Select statement to contain tables which straddle a loop, they are requested to
choose a context from a dialog box. As the user has no understanding of what
a "context" is, it is important to ensure that the context names and the Help
descriptions clearly indicate what effect choosing the context will have on the
results.
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.
The description that you entered appears in the Context Selection Help dialog
box in Web Intelligence and Desktop Intelligence, and the process of selecting
a context is made easier for end users.
Inferred query
A Web Intelligence 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. Web Intelligence infers that the Sales
co.ntext 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, Web Intelligence displays a dialog box that
prompts the user 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, Web Intelligence identifies that more than one context contains all the
joins necessary to include the Showroom and Model tables to which the two
objects refer.
It therefore asks the user to-identify which context to use by displaying the
Context Selection dialog box.
Recommended sequence
Because of this requirement to update contexts, it is always best to create all
your alias tables first, and then create your contexts. Otherwise, your alias
tables will not be 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.
5 Accept the candidate contexts, or create your own contexts manually.
The need to follow this sequence highlights the main drawback of using the
Loop Detection routine. 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 will not necessarily resolve all the alias table loops first,
followed by all the context loops. It is therefore better to use the Alias Detection
routine first, and then the Context Detection routine.
Remember also that you will have to redefine any objects that are based on
tables for which you have created aliases. The overall sequence in universe
design is therefore as follows:
1 Add tables to the universe
2 Insert joins
3 Detect and resolve loops
4 Create all the classes and objects
However, if you want to test your loop resolution in the User module, you may
need to create some basic objects just 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.
Remember to check the inferred SQL by creating objects and running queries
in Web Intelligence or Desktop Intelligence.
Objectives
By the end of this activity, you will be able to:
Resolve loops by using contexts.
Instructions
In this workshop you will add new tables, insert new joins, and set cardinality,
that will create loops in the Motors2004 universe. You will then resolve the
loops using contexts, and test them.
1 In Designer, create the following aliased tables:
RENTAL (alias of SALE)
RENTAL_MODEL (alias of SALE_MODEL)
2 Insert the table.
RENTAL_PRICE_RANGE
3 Insert the following joins and set their cardinality.
Joins
- - - -
RENTAL.SALE_ID=RENTAL_ MODEL.SALE_ID
FINANCE_PERIOD.FP
RENTAL_MODEL.COLOUR_ID=COLOUR.COLOUR_ID _START
_END
RENTAL_PRICE_RANGE.RENT and
_RANGE_MAX
_RANGE_MIN and
RENTAL.SALE DATE
CLlENT.CLlENT TYPE='R'
SHOWROOM.SHOWROOM
MODEL.MODEL_DAYRENTbetweenID=RENTAL.SHOWROOM
between
ID=RENTAL.CLlENT
RENTAL_MODEL.MODEL_ID=MODEL.MODEL_ID
10 10
11 Create a subclass called Day Rental Charges in the Cars class. Then
populate the subclass with the following objects.
Select Statement
MODEL.MODEL_DAYRENT
T_RANGE Description
RENTAL_PRICE_RANGE.REN
Standard of Rental
Charge banding
Object Day Charge
Description
Charge Object Name
Day
ntal
12 Save and export the universe, then test the contexts used to resolve the
loops by building the following queries in Web Intelligence:
Select Statement
MAKER.MAKER CarNAME
manufacturers
Object Descriptionwith
Object
which the Name
contractedshowroom has a
dealership.
ises
Review
Summary
After completing this lesson, you are now able to:
Understand the causes of loops
Detect loops in a universe structure
Describe aliases
Resolve loops using aliases
Resolve self-join loops using aliases
Describe how shortcut joins can make a query more efficient
Resolve loops using shortcut joins
Describe contexts
Resolve loops using contexts
Introduction
In order to avoid common SQL traps in your universe, it is important to
understand how aggregates in queries may result in incorrect data.
After completing this unit, you will be able to:
Explain how SQL traps can cause queries to return inaccurate results
Introduction
This unit explains how chasm traps can occur in the universe structure and
how to resolve them.
After completing this unit, you will be able to:
Explain what a chasm trap is
Detect chasm traps in a universe structure
Resolve chasm traps
Chasm traps
A chasm trap is a common problem in relational database schemas in which a
join path returns more data than expected.
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 exist:
1 There is a "many-to-one-to-many" relationship between three tables in
the universe structure
AND
2 The query includes objects based on the two "many" tables
AND
3 There are multiple rows returned for a single dimension value.
For example, in this diagram there is no loop, but the flow around the three
tables is many-to-one-to-many.
.'
/ ..,/
",
"'- .•••..•.
,.~ ~. z
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.
When a query that uses objects Y and Z is run, the inferred SQL includes
tables B, C, and A that have a "many-one-many" relationship respectively. The
chasm trap causes a query to return every possible combination of rows for
one measure with every possible combination of rows for the other measure.
This results in the ..values for each object to be multiplied by the other. The
effect is similar to a Cartesian product but is known as a chasm trap.
\
i?@j Sales
'i···n Sale Date
i r' >J' Sales Revenue
8 <.\illRentals
j•. 71 Rental Date
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.
Test!
3\ £~I 11 ,('
_ ' o
~ It) ~ ,
Test 2
Test 3
The first two queries return the correct data but combining Sales Revenue and
Rental Revenue in the third query returns inaccurate results.
To understand what is happening here, we need to ~xamine the rows that are
returned by the queries to make the aggregated figures. In our example, we
can do this by adding the Sale Date and Rental Date objects to the queries to
return individual transaction details.
Notice that there are two Sale transactions in query test 1. There are also two
Rental transactions in query test 2.
Test 1 Test 3
The query returns every possible combination of Sale rows with every possible
combination of Rental rows. Hence, the Sale transactions each appear twice
as do the Rental transactions, -andas a result of this the aggregates have been
multiplied by the number of related rows on the alternative 'many' table.
Where you have a many-one-many relationship for tables in the FROM clause,
the resulting logical table produces something akin to a Cartesian product.
Only then is aggregation applied. This is the reason for the chasm effect.
The problem with chasm traps is that, unless you look at the detail rows, there
is nothing to alert you to the situation.
"
~;
..•
In universes
one these
object
for
When
In
SQL or
bothis situations
both of the
included
statements
you
fact
have
tables.
that ...
fact tables.
a query
dimension
isin
contain
that
The you If aavoid
based
advantage
only
or
can dimension
measure
detail on
of ordefined
aobjects detail
universe
objects
usingdefined
multiple
contextsfor
You ...
each measure
statements for for
SOL statements returned.
using
creating
and this solution,
produce
contexts
incorrect
toa Cartesian
resolve
results,
the
that you need to maintain later. product
you
chasm
shouldwill
trap. be
consider
Do not
Use use multiple
multiple SQL As the previous solution can slow query response time
However, there are drawbacks to using this method to resolve chasm traps.
It's not that there is anything inaccurate about the dates, but the multiple
occurrences will be confusing to users.
When you run a query that includes objects from both contexts, this creates
two SELECT statements that are synchronized to produce two separate tables
in Web Intelligence, avoiding the creation of a Cartesian product.
Objectives
By the end of this activity, you will be able to:
Detect contexts to resolve a chasm trap in the universe structure.
Instructions
1 Create a new universe called Chasms.unv where your connection is to
the Motors2004.mdb.
2 In File Parameters, SQL tab, clear the Multiple SQL statements for
each measure option (deselect the check box).
3 Add the following tables
CLIENT
SALE
RENTAL, as an alias of the SALE table
4 Create the following joins and set the cardinality:
1:N
Cardinality
Join
PE='S'
_ID=RENTALS.CLlENT
_ID=SALE.CLlENT _ID _ID RENTAL.SALE_TYPE='R'
5 Create two classes: one called Chasm Objects, and the other called
Measures.
6 Add the following objects with the following syntax:
DimensionSelect
CLIENT.
SALE. SALE_DATE , + NAME
RENTAL.SALE_DATE
CLIENT_FIRST Dimension
+ '
Qualification
LIENT.CLIENT_LASTNAME Object AND
'BRENDT'
CLIENT.CLIENT_FIRSTNAME = 'PAUL'
Sale Date WHERE CLAUSE
CLIENT.CLIENT_LASTNAME =
Context Joins
SALE.CLIENT_IO=CLlENT.CLlENT_10_10
RENTAL.CLlENT_IO=CLlENT.CLlENT
RENTAL.SALE_TYPE='R'
SALE.SALE_TYPE='S'
Rental
Sale
Introduction
This unit explains how fan traps can occur in the universe structure and how
to resolve them.
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 will 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 useing objects Y and Z, the inferred SOL includes tables
Band 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.
In this scenario, a user runs a query with a measure object from the SALE table
and another measure object from the SALE_MODEL table:
~ .•~ Clier~
.. n.1ii! C!ieM! N<lov"
r.;;'i:U S,:.!t}$
i .rt::::/j""MooefnJNiXiiJ)ei,·,·,n,!
. 'Iii! Sale Dille
'mO S••!eR~~
; ~ ....'* Nun"£Mrflfr:Ar~·Sdcl!
[£~[Aci1t<lk!
j
In the example above, the fan trap problem becomes apparent in a query that
aggregates both an object based on SALE. SALE_ TOTAL and an object based
on SALE_MOoEL.SALE_QTY.
Test 1
Test 2
Test 1 Test 2
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.
3 Create a join between the new alias table, SALE_ALIAS (SALE), and the
CLIENT table.
4 Set cardinality.
5 Set contexts.
I
-/ 7 Create a query using a measure object from the alias table and another
measure from the subsequent table in the table path of the universe
structure, in this example, using Sales Revenue and Number of Cars
I Sold.
~
Moreover, if you make a query which includes a dimension object on the lower
table in the 'one-many-many' path, you will not suffer the fan trap; even when
that dimension object contains the same value for all rows related to the
measure value. The fact that the measure and dimension objects are in
separate contexts forces two separate Select statements, thus avoiding the
problem.
xfl
y 6)
z 6)
.y
In the universe structure shown below, you have created an alias table of the
SALES table, and created a join between the alias and the original table. This
is to separate the dimension in SALE from the measure, which will now be
looking at SALE_ALIAS.
S.ALEJD
iCUENT JD
CLIENT ..L.A.STNAME C ISAJ..E..DATE
CLIENT ..FIRSTNAME C
ISHOWROOMJD
CLIENT ...ADDRESS C !SALE.5ALE.DISCOUNT
OLiENT _TOWN 0 :SALE.TYPE
CLIENT ...AREA 0 iSALE.TOT AI...
CLIENT ...AREA-CODE C SALE..RENT ALYERIOD
CLIENT "pHONE.NO C
oND
ALEJD D "" "" -
D-
\
;;~
CLlENTJD
SHOWROOMJD
.ALE.TYPe SAJ..E_QTY
SALE_TOT
SALE..RENT
SAl.E..DATE
"ALEJD
SALE5ALE..DISOOUNT AL AL"pERIODN~
·.'.·,·HH.·.·,·.·,·.·.·.·.·,·.·,·.·.·.·,·,·.WN.·.·.·m.·_·.·N.·.·.·.· MODELJD L;$~b:d~t:f
···N·.·.·.··.",···············
HOWROOMJD
IV?:?\t~¥M*%t?~{:':;:::
ALEJD
ALE.SALE..DISODUNT
COLOURJD
pUENT JD
ALE..DATE AlE_TOT
AlE..RENT AL AL"pERIOD
ALE_TYPe
This is the method used to avoid the fan trap in the Motors2004 universe,
should the Sales Revenue and Number of Cars Sold measure objects be
included in the same query:
In the Motors2004 universe you have created during this course, the Sales
Revenue measure is not based on the total figure in the SALES table but on a
number of columns from the SALES, SALE_MODEL and MODEL tables which
are held in the database at the same level of granularity as the number of cars
sold. Hence, no fan trap exists and the correct result will be obtained.
Note: Another method of resolving a less common form of fan trap is covered
in the Aggregate Awareness module of this course.
Objectives
By the end of this activity, you will be able to:
Detect contexts to resolve a fan trap in the universe structure.
Instructions
1 Create a universe called Fans.unv where your connection is to the
Motors2004.mdb.
2 In File Parameters, SQL tab, clear the Multiple SQL statements for
each measure option (deselect the check box).
3 Add the following tables
CLIENT
SALE
SALE_MODEL
4 Create the following joins and set the cardinality:
1:N
Cardinality
Join
SALE_
PE='S' MODEL.SALE_ID
_ID=SALE.CLlENT _ID
Dimension Select
CLIENT.
SALE_MODEL.MODEL_ID , + NAMEQualification
CLIENT_FIRST
Sum(SALE.SALE_TOTALJ
Sum(SALE_MODEL.SALE_QTYJ Dimension
Measure
+ '
LIENT.CLIENT_LASTNAME Object
'CRANDALL' AND
CLIENT.CLIENT_FIRSTNAME = 'SEAN'
ModellD WHERE
CLIENT. CLAUSE
CLIENT_LAST NAME =
'-"
-.../
'--./' 9
810
1:N
Cardinality
Join
YPE='S'
SALE2.SALE_ID
CLlENT.CLlENT_ID=SALE.CLlENT _10
Joins
Context
SALE2.SALE_ID=SALE.SALE_I0
SALE2.SALE_TYPE='S'
SALE.SALE_TYPE='S'
SALE.SALE_ID=SALE_MODEL.SALE_ID
Sale2
Sale Model
Review
Summary
Recap the After completing this lesson, you are now able to:
lesson
Explain how SOL traps can cause queries to return inaccurate results
objectives
with the Explain what a chasm trap is
learners to Detect chasm traps in a universe structure
check that all Resolve chasm traps
learners have
acquired the Explain what a fan trap is
required Detect fan traps in the universe structure
skills before Resolve fan traps
moving on to
the next
section.
Duration: 1 hour
Introduction
A restriction is a condition in SQL that sets criteria to limit the data returned by
a query.
You define restrictions on objects to limit the data available to users. Your
reasons for limiting user access to data should be based on the data
requirements of the target user. A user may not need access to all the values
returned by an object. You might also want to restrict user access to certain
values for security reasons.
After completing this unit, you will be able to:
Define data restrictions
Apply data restrictions to objects
Apply data restrictions using condition objects
The WHERE clause for the query is created from the SQL inferred from the
joins made in the Structure window:
WHERE
CCOUNTRY_REGION.COUNTRY_ID=REGION.COUNTRY_ID)
AND CREGION.REGION_ID=CLIENT.REGION_ID)
AND CSALE_MODEL.MODEL_ID=MODEL.MODEL_ID)
AND CSALE.SALE_ID=SALE_MODEL.SALE_ID)
AND CCLIENT.CLIENT_ID=SALE.CLIENT_ID)
AND CSALE.SALE_TYPE='S')
AND CSALE.SALE_DATE between FINANCE_PERIOD.FP START and
FINANCE_PERIOD.FP_END)
Compare this with the following report, which is a restricted block containing
data only for clients from the United Kingdom:
'J
Gregory, Neil
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'
SELECT
SHOWR OOM.SHOWROOM_NAME.
MODEL.MODEL_NAME&" &MODEL.MODEL_ TRIM&' '&MODEL.MODEL_ENGINE
FROM
SHOWROOM.
MODEL.
SALE_MODEL
SALE
WHERE
(SALE_MODEL.MODELjD=MODEL.MODELJD )
AND (SALE.SALUD=SALE_MODEL.SALUD )
AND (SALE.SALE_ TYPE='S' )
AND (SHOWROOM.SHOWROOMJD=SALE.SHOWROOMJD )
AND (MODEL.MODEL_DAYRENT IS NOT NULL )
The last line of the WHERE clause is taken from the object restriction.
/
An alternative to applying restrictions to objects
There is an alternative to applying restrictions to objects without using WHERE
clauses. You will still have multiple objects, but you will avoid the conflicts that
affect the return of data in queries.
This method involves using a conditional SELECT clause for the object instead
of a WHERE clause.
For example, if you want to force users to select financial results by year, you
could create a series of Sales Revenue objects (one for each year). Each
object would be edited, starting from the standard sum aggregate used in the
basic Sales Revenue Select statement:
You would apply the condition for each year using the Character function
IIF(restriction , action if true, action if false).
For Sales Revenue 2003, the Select statement would look like this:
When the query is run, the report should look like this:
Carter, Sue
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, the predefined condition objects built into the universe are
identified in the Edit Query view Data tab with yellow filter icons.
For example, if the designer has created condition objects for French Clients
and UK Clients, the Data tab would contain these condition objects:
B~_
?
i· French Clients
L.? UK Clients
_L '" UKClients
When you have created the condition object, you should test it in Web
Intelligence by making a query that uses the condition object. View the SQL to
check that the inferred Select statement includes the restriction in the WHERE
clause and has the desired effect.
LEJD
LIE~T_ID
~LE_DATE
~OW~OOI,jJD
LE3ALE_DISCOLJ~T
LE_TI'PE
SALEJOTAL
LE_~ EtnAL_PE~ kJD
With this restriction in place, the data returned will be 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 will still be applied in the WHERE clause.
This is the main advantage of applying restrictions at the table level.
For example, in the Motors2004 database, the Country table contains a single
list of countries, but these include the country from which clients come, the
country where a car showroom is located, and the country where a car maker
is located.
As a designer, you can create objects from the Country table for use in the
Client class (for the Client Country), in the Car class (for the car Maker
Country), and in the Showroom class (for the Showroom Country). We have
done this in previous lessons and avoided loops by creating the appropriate
alias tables.
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 only equi-joins, the
object is then guaranteed to only ever return countries in which Showrooms
exist.
MAKER_COUNTRY
MODEL
REGION
RENTAL
RENTAL_MODEL
RENTAL_PRICE_RANGE
SALE
SALE_MODEL
SALES _PRICE_RANGE
SHOV.ROOM
If you want to view only the tables already referenced by this object,
select the Show selected only option.
4 Hold down the Ctrl key and click the SHOWROOM table to force joins
between the selected tables.
This ensures that when the Country Showroom object is used in a query,
the SQL retrieves only the countries that have showrooms.
Objectives
In this activity you will apply enforced restrictions to objects and tables and
create optional restrictions using condition objects.
Instructions
1 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. To do this, you need to create the
Model for Rental dimension object in the Rental Figures subclass. This
object will have the same SELECT properties as the Model object but it
will contain a WHERE restriction so that only models available for rental
are returned. The restriction is:
'-./
" MODEL.MODEL_DAYRENT IS NOT NULL
'-./
'-./
'--"~
'-./'
'-..../
'----'
--../
'-..../
" 2 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 = CLlENT.CLlENT_LASTNAME +', '+
CLlENT.CLlENT _FIRSTNAME
WHERE = CLlEf)lT-"CPUNTRYCOUNTRY _NAME = 'USA'
3 Create another object in the Client class for UK clients.
4 Save and export the universe, then test the two new Client objects in
Web Intelligence:
Build a query containing UK Clients, US Clients, and Sales Revenue
/
objects.
The query should return no data because of the conflict of restrictions.
In Designer, create a new subclass below the Sales class called Annual
Revenue. Populate it with separate Sales Revenue measure objects for
the calendar years 2003 and 2004 as indicated below. Use the IIF
function to do this.
2003 Sales Revenue
2004 Sales Revenue
6 Save and export the universe, then test the two new Sales Revenue
objects in Web Intelligence:
Build a query containing Showroom, 2003 Sales Revenue, and 2004
Sales Revenue objects.
7 Replace 2003 Sales Revenue and 2004 Sales Revenue object Select
properties IIF function with one related to financial years FY03-04 and
FY04-05, instead of calendar years.
Review
Summary
Recap the After completing this lesson, you are now able to:
lesson Define data restrictions
objectives
with the Apply data restrictions to objects
learners to Apply data restrictions using condition objects
check that all
Apply restrictions to tables
learners have
Apply data restrictions using the Tables button
acquired the
required Apply each type of restriction
skills before
moving on to
the next
section.
Duration: 45 minutes
Introduction
The @ Functions can be found in the Functions panel of the Edit Select
Statement and in the Edit WHERE Clause dialog boxes for objects.
After completing this unit, you will be able to:
Define @Functions
Use the @Prompt function
Use the @Select function
Use the @Where function
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 will find the following functions:
@AggregateAware(,)
@Prompt(",,)
@Script(,,)
@SelectO
@VariableO
@WhereO
These functions can be applied in the Select and WHERE dialog boxes of
objects. They are used to provide flexible methods of specifying SOL.
The most commonly used @Functions are:
@Prompt(",,)
@SelectO
@WhereO
\ \
TT
/
~.
I
~
--../
i
In the example above, 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. Hence, 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, you
need only one.
@Prompt syntax
The @Prompt syntax consists of five parameters, separa~ed by commas:
Prompt
Data Type (A, N, or D)
LOV Pointer or hard-coded list
Mono or Multi
Free or Constrained
J
J
Using Functions with Objects-Instructor's Guide 10-3
The first two parameters are required. It is a best practice to provide values for
the first two parameters and the last three, as necessary. However, if you leave
out a parameter, you must still include the required commas. For example:
SHOWROOM. SHOWROOM Name = @PROMPT('Enter Showroom Name' ,'A',
'Showroom\Showroom', Mono, Constrained)
The @Select function allows you to reuse existing code. The advantage of
using this function is that it allows you to specify SOL code only once. This has
two key advantages:
You need to maintain only one instance of the SOL code.
It ensures consistency of the code.
In the example above, you can see that the code in the Select properties of the
Model object is:
MODEL. MODEL_NAME & ' ,& MODEL. MODEL_TRIM & ' ,&
MODEL. MODEL_ENGINE
The @Select function is a pointer to the Select dialog box properties of another
object.
This same code is used in the object called Model for Rental. Therefore, if you
should need to change the code, you would have to change it twice.
You can avoid this by changing the Select properties code in the Model for Rental
object to:
@Select(Car\Model)
'--/ I
The @Where function acts as a pointer to the Where dialog box of another
object.
It is also a dynamic link between objects, so that updating the original object
WHERE clause automatically updates the other objects or condition objects.
'--/ I
This same code is used in the condition object called Showroom Rental Models.
Therefore, if you should need to change the code, you would have to change it
twice.
You can avoid this by changing the Where properties code in the Showroom
Rental Models condition object to:
@Where(Day Rental Charges\Model)
Note: You can use the @Where function in a condition object to point to an
object, but not the other waya round.
As with @Select, its purpose is to allow you to reuse existing code, and it has the
same advantages:
You need to maintain only one instance of the SQL code.
It ensures consistency of the code.
9-~;!+r~Fr-.'",~i'~ l?·Sjt~
~·..-8 1?~.>''.JfN~~ ~¥·S·M.:i~
: ,t::-~~t::ri1ri!!S:ofV~hd~
?:Qij D;OYR;rl.<l: O1;r9":':
f,-g -Mcdd~JfAtJnK:l
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 "dummy" object strategy to
make the most efficient use of that restriction's code.
The idea behind the strategy is that you create a new and separate object for
every restriction required, in a separate class to the "normal" object classes.
Then, within the "normal" objects, whenever a restriction is required, you merely
point to the appropriate "dummy" object using the @Where function.
In the example above, you can see that two "dummy" objects have been created
that contain only a name and Where restriction, as follows:
Rental model
MODEL. MODEL_DAY RENT IS NOT NULL
Showroom choice
SHOWROOM. SHOWROOM_NAME = @Prompt
('Enter Showroom Name', 'P;, 'Showroom\Showroom' ,mono,constrained)
Note that each of the dummy 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 WHERE clause
code.
Also, by specifying each restriction in a separate dummy 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 dummy 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
dummy objects from end users.
The procedure for this is as follows:
1 Click the class or object you want to hide.
2 Select Hide Item(s) on the Edit menu.
Or right-click the object or class and select Hide Item(s) from the drop-
down menu.
Hidden classes and objects appear in italics in the Designer Universe pane.
They are not shown at all in Web Intelligence or Desktop Intelligence.
The "dummy" 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.
Objectives
By the end of this activity, you will be able to:
Apply @Functions to objects and condition objects
Instructions
1 In the previous lesson, you created a Model for Rental dimension object in
the Day Rental Charges subclass. This object returns all models available
for rental. This is to be used by sales staff and should be further restricted
to a specific showroom. Use the @Prompt function to achieve this. The
parameters for the @Prompt should be:
Prompt = 'Enter showroom name'
Data type = '{!\
LOV = 'Showroom\Showroom'
Mono
Constrained
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 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 two dummy objects in a new class called Dummy Restriction
Objects as follows:
Rental Model containing the restriction:
MODEL. MODEL DAY RENT IS NOT NUll
Review
a)@Where
b)@Prompt
c)@Script
d)@Variable
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
All arguments must exist.
Summary
Recap the After completing this lesson, you are now able to:
lesson
Define @Functions
objectives
with the Use the @Select function
learners to Use the @Where function
check that all
learners have
acquired the
required
skills before
moving on to
the next
section.
Hierarchies allow you to organize dimension objects so that users can perform
multi-dimensional analysis using drill mode in Web Intelligence or Desktop
Intelligence documents.
In this lesson you will learn about:
Understanding hierarchies and universes
Working with hierarchies
Duration: 45 minutes
Introduction
Hierarchies in universes allow users to create reports that are enabled for
multi-dimensional analysis with drill mode.
After completing this unit, you will be able to:
Explain how hierarchies allow users to drill down to different levels of
detail using drill mode in Web Intelligence and Desktop Intelligence
Hierarchies
A hierarchy is an ordered series of related dimension objects that are used for
multidimensional analysis. For example, a geographical hierarchy could group
together dimension objects such as Country, Region and City,
Multidimensional analysis is a technique for manipulating data so that it can be
viewed from different perspectives and at different levels of detail. In Web
Intelligence and Desktop Intelligence, 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 will see 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 cities. A user can then
analyze a Measure object, such as Sales Revenue, against any of the levels
in the hierarchy.
/.K.
A l\I:mchestt'l' N t'Wcastlt'
South
Logical hierarchies
Web Intelligence hierarchies are not restricted to natural hierarchies. You can
construct a hierarchy from any related group of dimension objects that will
create a sensible analysis path.
The relationship between the dimension objects in a hierarchy normally will be
one-to-many as you descend through the levels.
For example, one Country has many Towns; one Town has many Showrooms;
one Showroom has many Franchises:
9~ Showroom
'..···1IiII Country
f····1IiII Town
f:1:1"1IiIIShowroom
ffi"1IiII Franchises .
'-./ I
Introduction
After completing this unit, you will be able to:
View default hierarchies in a universe
Set the scope of analysis in a Web Intelligence document using a default
hierarchy
Create a custom hierarchy
Create time hierarchies
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.
-;J Area
,TI dient Town
:TI . dient Name
':" .•• Client Address;
t ..•. Client ID
. 1) Area Code
..•.• ' Phone Number
Ji Numberof Clients
;~HanCar
~:";&lShowroom
~..n showroom Country
'··n Showroom Town
9 :TI, Showroom
"ft- Showroom Address
c.. 'TI Franchises
tfJ-·fOOi Sales
ff·@ilRentals
f~:'<f£l Financial Period
. -TI Financial Year
i ...-m ' Financial Quarter
'- . ','1 Financial Month
$..@1ilDummrRest!ktionObjects
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 + 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.
't~H~ Client
~ ·@iJ·Shov,l!oom
$-.€il Financial Period
~''''3 FrnatiCialYear
~····m ' Financial Quarter
i. <'1, financial Month
-G.},.~ Rentals
S-€ilSal ••
!tH~ S.a!esDetails
H-}"~ Sales Dates
g..-§] Sales Figures
'._n. Q Aver-age levenu
:•••• -• .@:
;""""" <.)
-
'_n __~
---
Number of Cars
Cost of Car
C"ern
Iii Cl)tU"jtfY
Iii Region
Custom Hierarchy
iii .6sea
15'-
ryhm Client I FY
iii T 0'1111'1 , !" tI Cauntly
Ii Client N,aJI'Ie I'''' 111 Region
Default Hierarchies !. 111 Area
.. tI
1'" Town
$)~ Firnmcial Period
1'"111 C1ient N6fOe
L i9 Financial Year
• ) i L,~111 Financial Year
i~M tit Financial Quarter
"~iii Finllncial Month
As you have seen, default hierarchies are based on the order of the 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 Motors2004 universe wanted to look at Sales
Revenue from the point of view of ClienUArea and Financial Period, they would
not be able to do this using the default hierarchies. In such cases, there are
two options:
Desktop Intelligence users can create their own one-off custom hierarchy
in Desktop Intelligence (this functionality is not available in Web
Intelligence ).
As universe designer, you can build a permanent custom hierarchy as
part of the universe.
The advantage of creating a custom hierarchy as part of the universe is that it
can be used across documents by any user. If a Desktop Intelligence user
creates a one-off custom hierarchy, it is available only in that document, and
Web Intelligence users cannot create one at all.
In the analysis phase of the universe development process, the designer
should identify those custom hierarchies that are to be used regularly. These
should be created in Designer as permanent custom hierarchies.
'--/ )
2 Click New.
A new folder appears in the Custom Hierarchies panel.
3 Type a name for the custom hierarchy as the folder name, for example,
Custom, and press Enter.
4 In the left panel of the Hierarchies Editor dialog box, click the + of the
default hierarchies that contain the dimension objects you want to include
in the custom hierarchy.
The default hierarchy dimension objects appear.
S Click the object (or multiple objects, using Ctrl-Click) that you want to
appear in the custom hierarchy, and then click Add.
OR
Drag and drop the required objects onto the new Custom hierarchy
folder.
In this example, select all the objects in the Client default hierarchy, plus
Financial Year object. 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. Alternatively,
you can use the drag-and-drop technique.
Once you decide to create custom hierarchies, you must copy any of the
defaults that you want to keep over to the right-hand side list box. Even if you
do not want to create new ones, to exclude the default hierarchies that you do
not want users to use as drill paths, you must copy the useful ones over.
In order to make any change at all in the hierarchies, you either start over by
creating new custom hierarchies or you copy only the useful default
hierarchies into the Custom Hierarchies list box.
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 Web Intelligence will be the one that is higher in the
list (if dimensions from both hierarchies are included in the query).
You can alter this defal!lt priority by changing the order of the
hierarchies in the Custom Hierarchies panel. 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 and export the universe.
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.
The Classes and Objects window now looks like this:
Sales Dates
3 Sale Date
Notice that the original date object now 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 + to view and check the objects attached to the date object.
'-"
-..J
...J
....J
...J
-..J
...J
'-.-/
'...../
Sales Dates·
Note: You can see that the arrangement of the objects is not as you
might expect. The Sale Date 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 +
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.
Double-click one of the automatically created time dimension objects
(year, quarter, or month) to view the Edit Properties dialog box for the
object.
1,184,563.50
Quarter 979,683.00
681,144.00
835,289.00 Sales Value (Re\
3,680,679.50
Sum:43 2 1 SalesValue
231,674.00
333,911.00
269,704.00
835,289.00 (Re\
Month
Sum:
11
12 10
Advantages
It is a fairly quick and easy way to set up a Time Hierarchy.
Automatically creates SQL SELECT clause 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 Classes and Objects window.
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.
A LOV can only be applied to the Date Seed 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.
Calendar Date
;m Calendar Year
Calendar Quarter
;m Calendar Month
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.
Disadvantages
It takes longer to create the objects of the time hierarchy than when using
the Automatic Time Hierarchy method.
The person designing the universe needs to know the relevant scalar
functions and how to use them.
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 example below. 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.
Note: You may recognize the table. You inserted it into the Motors2004
universe Structure during the Joins lesson of the course, when you
explored theta joins. You then used the table to create time objects
during the Classes and Objects lesson.
rp ...;"STA'RT
rp E~D
rp :YEA'R
rp _QUAi=!TI:J~
rp _lJotni-l
LEJD
LIEtn JD
/ o.LI:: DATE
i-Io.";j 1=!OOY 10
ALE &(J,LE O"'&::OLl ~T
SALI::)VPE-
''''ALE TOTAL
,O,LI::: 'R E~TAl_PEJtIOD
$~ Financial Period
r .... fiI Financial Year
..iii Quarter
fiI Financial Month
;,....1iI Sale Date
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 SOL statement.
/
11-20 Universe Design-Instructor's Guide ./
/
J,
Practice
Objectives
In this activity, you will infer default hierarchies and create custom hierarchies
for the Motors2004 universe.
Instructions
1 Switch back to default hierarchies if you have followed along during this
lesson.
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 and export the universe, and then test the default hierarchy in Web
Intelligence.
4 Create a Sale Year, Sale Quarter, and Sale Month dimension object using
the Automatic Time Hierarchy method.
5 Save and export the universe again, and then test the resulting hierarchy
in Web Intelligence. When you run the query, view the SQL and note the
scalar function used.
6 Create a Rental Year, Rental Quarter, and Rental Month dimension object
manually in the Rental Dates subclass. Ensure that the quarter and
month dimension object values are preceded by a character string such
as Q and Month respectively.
7 Check that the order of the dimension objects in the Financial Period
class is based on time.
S Save and export the universe again, and then test the resulting
hierarchies in Web Intelligence.
Prestige Motors wants to analyze clients geographically (by Country, Region,
and Town) but then further analyze the breakdown of client expenditure by
financial year.
1 Create a custom hierarchy to allow users to do this by including the
./ Country, Region, Town and Financial Year objects in the hierarchy .
I
Car I
1
r'j .•..
1
/'
Review
a) Default
c) Custom
Answer:
a
2 What are two advantages of Automatic Time Hierarchies?
Answer:
Summary
Recap the After completing this lesson, you are now able to:
lesson
Explain how hierarchies allow users to drill down to different levels of
objectives detail using drill mode in Web Intelligence and Desktop Intelligence
with the
learners to View default hierarchies in a universe
check that all Set the scope of analysis in a Web Intelligence document using a default
learners have hierarchy
acquired the Create a custom hierarchy
required
skills before Create time hierarchies
moving on to
the next
section.
Duration: 1 .5 hours
'-" I
Introduction
Aggregate awareness is a term that describes the ability of a universe to make
use of aggregate tables in a database. Using aggregate tables speeds up the
execution of queries, improving the performance of SQL transactions.
After completing this unit, you will be able to:
Understand what is meant by the term aggregate aware
Understand why universes that are aggregate aware allow queries to
process more efficiently
SHOWROOMJD
MAKERJD
FP_YEAR
ANNUAL_SALE_ VALUE
ANNUAL_SALE_COST
ANNUAL_SALE_NUMBER
ANNUAL_RENT_VAlUE
ANNUAL_RENT _NUtv1BER
Annual_Figures
126 rows I
Sales Revenue = sum(ANNUAL]IGURES.ANNUAL_SALE_VALUE)
Introduction
The first step in setting up aggregate awareness in a universe is to determine
which objects are to be aggregate aware. You can use either measure objects
or dimension objects.
After completing this unit, you will be able to:
Set up aggregate aware objects
Use aggregate awareness to resolve fan traps
Test aggregate awareness in the universe
INUAL_SALE.NUMBER· SHOWROOM_TOWN
NUAL.RENT _VALUE SHOWROOMPRE~CODE
NUAL.RENT .NUMBER COUNTRYjD
To detect contexts
1 Click the Detect Contexts toolbar button.
2 Accept the new contexts, renaming them if required.
Financial
Rental
Number
Existing ofYear
Sale Revenue
Cost ofRevenue
Car Cars
Sales
objectsSold
Rented
Summary Table columns
ANNUAL_RENT_NUMBER
ANNUAL_RENT_VALUE
AN
ANNUAL_SALE_VALUE
NUAL_SALE_NUMBER
NUAL_SALE_COST
FP_Year
When you have added the Summary Table, each of these objects will have two
possible sources for returning data:
the original SELECT statement in the existing object
a SELECT statement consisting of Table_Name.Column_Name from the
Summary Table
3 You must now specify which of these methods should be used when a
query is run using these objects. You do this by modifying the SELECT
properties for the affected objects using the @AggregateAware function.
Note: It can make the structure of the SELECT statement clearer if you
keep each level of the @AggregateAware function on a separate
line.
3 Click at the beginning of the existing statement, if necessary.
4 Double-click the @AggregateAware function in the @ Functions list
dialog box.
5 Insert the aggregate" actions within the brackets of the @AggregateAware
function in order, highest to lowest level of aggregation data. Separate
each action with a comma.
6 Click OK to accept the SELECT statement.
In our example, the Edit Properties dialog box now looks like this:
When you have redefined all the objects, the next step is to set when Web
Intelligence can use the Summary Tables, by defining which dimension and
measure objects are or are not compatible with the STs.
All objects that infer columns from tables in the same context as the Summary
Table can automatically be deemed compatible with the Summary Table.
However, a Summary Table that does not contain any foreign keys cannot be
joined to other tables and cannot be part of a context. In that case, any query
that contains objects from the Summary Table and from other tables will
produce a Cartesian product. Therefore, all objects based on columns from
any other table should be deemed incompatible.
You set incompatible objects using the Aggregate Navigation tool.
'--'
65
'-'
7''~~
'----'
'...J---'
J
Use your familiarity with the universe to check that objects shown as
compatible (that is, not checked) will operate correctly and not produce
Cartesian products or an incompatible combination of objects.
If an object is set incorrectly, select or clear the object by clicking it.
Repeat actions 3 and 4 for each table required.
When you are satisfied with all incompatibility settings, click OK to close
the Aggregate Navigation dialog box.
xl1
y •
z •
.Y
The solution makes use of aggregate awareness functionality despite the fact
that it does not involve a summary or aggregate table
Objectives
Bu the end of the this activity, you will be able to:
Insert summary tables into the Motors2004 universe and make the
universe aggregate aware.
Business requirement: Prestige Motors management is finding that the
annual and quarterly reports take a long time to run. They have
requested that these reports be produced without any noticeable
processing delay.
Instructions
1 Incorporate the ANNUAL_FIGURES summary table in the Motors2004
universe and apply aggregate awareness as follows:
Insert the ANNUAL_FIGURES table in the structure of the universe,
and insert the following joins and set cardinality.
SHOWROOM.SHOWROOM_ID=ANNUAL_FIGURES.SHOWROOM_ID
ANNUAL_FIGURES.MAKER_ID=MAKER.MAKER_ID
Detect contexts.
Note: In this instance, the new joins and tables do not affect existing
contexts. Do not delete or overwrite the existing contexts.
Redefine the SELECT properties of the objects as indicated below:
Rental Revenue =
@Aggregate_Aware(sum(ANNUAL_FIGURES.ANNUAL_RENT_VALUE
),sum(RENTAL.SALE_RENTAL_PERIOD *
RENTAL_MODEL.SALE_OTY * MODEL. MODEL_DAY RENT * (100 -
RENTAL.SALE_SALE_DISCOUNT) / 100»)
Sales Revenue
@Aggregate_Aware(sum(ANNUAL_FIGURES.ANNUAL_SALE_VAlUE
),sum(SALE_MODEL.SALE_OTY * MODEL. MODEL_PRICE * ((100
- SALE.SALE_SALE_DISCOUNT) / 100»)
Review
Summary
Recap the After completing this lesson, you are now able to:
lesson Understand what is meant by the term aggregate aware
objectives
with the Understand why universes that are aggregate aware allow queries to
learners to process more efficiently
check that all Set up aggregate aware objects
learners have Use aggregate awareness to resolve fan traps
acquired the
Test aggregate awareness in the universe
required
skills before
moving on to
the next
section.
Lesson 13
Derived Tables and Indexes
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.
In this lesson, you will learn about:
Using derived tables
Applying index awareness
Duration: 1 hour
"-./
I
Introduction
This unit explains-what derived tables are and how you create them as
dynamic,. virtual tables in the universe .•
After completing this unit, you will be able. to:
Understand the advantage of adding derived tables to your universe
structure
Insert a derived table in the universe
'~
"-'
'-./
-./
"'-.-/
'"----'
,,--,
"--'
"--'
--'
"--'
count(REGION.REGION_ID) as number_of_regions
from COUNTRY,
REGION
group by COUNTRY_NAME
CLIENTJD
CLlENT_LASTNAME
CLlENT_FIRSTNAME
CLIENT_ADDRESS
CLIENT_TOW'N
CLIENT_AREA
CLlENT_AREA_CODE
CLlENT_PHONE_NO
REGION_ID
EMPLOYEE_ID
CLIENT_AGE
COUr~TRYJD
, Car
¢"iD Showroom
$121 Client
rtHi!! Financial Period
$"iD Rentals
¢"iD Sales
$"121 Dummy Restriction Obiects
$'\M Personnel
8~IDerived Tabl~
: ... tIi1 Country Name
,,", IiiiII Number Of Regions
I
'-.J
Objectives
By the end of this activity, you will be able to:
Create a derived table that shows the number of transactions per
customer.
Instructions
1 Using Motors2004, insert a derived table to show the number of
transactions per customer.
2 Name the new derived table 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
GROUP BY CLIENT.CLIENT_ID
SALE_tO
LlEr~TJD CLIENT_10
LlENT_LASTNAME SALE_DATE
,.CLIENTJIRSTNAME SHO\oiROOM_ID
: CLIENT_ADDRESS SALE_SALE_DISCOUNT
CLlENT_ TO\oiN 'ISALE TYPE
CLIENT_AREA SALE=TOTAL
, CLlENT_AREA_CODE SALE_RENT AL_PERIOD
CLIENT_PH ONE_NO
••EMPLOYEE 10
r~'REGlmUD
:'-'IIt:'r.IT •••r.::c
Introduction
This unit describes how to set up a universe in Designer to take advantage of
primary and foreign keys that may already exist in the data source.
After completing this unit, you will be able to:
Understand what index awareness is
Set up primary key index awareness
Set up foreign key index awareness
FROM
CLIENT,
SALE,
SALE_MODEL,
MODEL,
WHERE
( CLIENT.CLIENT ID=SALE.CLIENT_ID
AND (SALE.SALE_ID=SALE_MODEL.SALE_ID
AND (SALE_MODEL.MODEL_ID=MODEL.MODEL_ID
AND (SALE.SALE_TYPE='S'
AND
GROUP BY
In this case, Designer has created a join to the Country_Region table in order
to restrict the countries retrieved.
With index awareness, you can tell Designer that COU NTR Y_10 is the primary
key of the Country_Region table and that it also appears in the Client table as
a foreign key. Using this information, Designer can restrict the countries
without joining to the Country_Region table.
In this case, Designer is able to generate SQL that restricts the countries
simply by filtering the values of the COUNTRY _10 foreign key.
3 Click Insert.
A key line is inserted in the list of keys box.
4 To define key awareness for the primary key:
Click the drop-down arrow next to Primary Key and select Primary in
the Key Type list.
Click within the line under Select field, and then click the ... button
that appears, to open the SQL editing dialog box.
5 Repeat steps 3 and 4 for all columns that make up the primary key.
6 If you want to add a WHERE clause:
Click within the line, under the Where column, then click the ... button
that appears, to open the Edit Select statement dialog box.
5 Repeat steps 3 and 4 for all columns that make up the primary key.
6 If you want to add a WHERE clause:
Click the Where column and then click the ... button
Build the foreign key SQL WHERE clause and click OK to close the
dialog box. There is no Where clause in this example.
Select Number from the drop-down list of key types.
7 Select Enabled.
8 Repeat the steps for all columns in the foreign key and then click OK.
Objectives
By the end of this activity, you will be able to:
Apply index awareness to improve the performance of SQL generation in
Web Intelligence.
Instructions
1 Using the Client Country object in Motors2004, enter the following under
Keys:
CLiENTCOUNTRY _10
COUNTRY_REGION.COUNTRY_10
COUNTRY_REGION.COUNTRY_ID=CLlENTCOUNTRY _10
Primary key
WHERE
Foreign key
Review
Duration: 30 minutes
Introduction
Using BusinessObjects Designer, you can dynamically link one or more
universes. This can reduce development and maintenance time. When you
modify a component in the core universe, Designer propagates the change to
the same component in all the derived universes.
After completing this unit, you will be able to:
Understand what linked uinverses are and why you would choose to use
them
Understand the advantages and limitations of using linking
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.
'il'<t~::.Derived ~1iveT:';es B
and c,_,
,/
Creating links between universes
Introduction
There are two methods you can use to link universes. Each are used for
different purposes:
Linking universes
When you link universes, you create a set of objects and structure in a
single core universe and you reuse them in a derived universe.
Including one universe within another
When you include universes, you use linking to copy the contents of the
core universe into the derived one, but then you use the Include feature
to break the link between the two universes.
Strategies for using both these methods are discussed in the following topics.
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.
_.. To link a universe to a core universe, the core universe must have been
exported to the repository.
You begin by opening the .unv file that will become the derived universe. That
is, first you open the universe to which you want to receive the duplicated
objects and structure. Using the Link feature, you then select the core universe
file so that its contents are added to the open .unv universe file.
.I
beach Island Resorts Marketing, unv
ef ashion ,..Motors2000.unv
f'/lotors ~ Motors2004.unv
Motors2004 ~ Staff2002, unv
Staf2002
~ eFashion, unv
8 Click OK.
The two universes are now linked.
B!i&~i~lE:[\tJ1jjM
IH'JP N~JD
~:t$~~ttf;~t~t_ r-r;
e.IP..ftIo\if; ENP.HIONfi 0
!SH0W1\OOMJP ~OWRoo!oUV tf:
=~
~GE..MI[i f1.!P.SfiX fMP.S6:';. Ci
HO'iVROOMliAl.m
HOWROOM..J\[)tft
HOW1\OOM.TO';lltf
HOWROO~I
ICOl.fflm-JP
You can choose to use the Include feature instead of linking when you simply
want to copy all the classes, objects and structure from ope universe to
another. You could do this first by linking from universe B to A and then using
Include to sever the link, thus making the classes, objects and structure of the
universe A part of universe B.
In effect, Include is a way of quickly copying every thing in one universe to
another.
To include a universe:
The procedure for including is the same as for linking except that after step 6
(selecting the universe to link) and before step 7 (confirming the selection of
the Universe Parameters, Links tab) of the procedure you:
1 In the Links tab of the Universe Parameters dialog box, click the universe
name in the middle panel.
The Include button becomes active.
I
'-.J
HOWRDOMlfl\i
HO'Jilo'ROOM..Ati
HOWROOH.:rO
HDWROOM..AFI
!:OUl-fTRYJD
When you include, the link to the core universe is broken and the structure,
classes, and objects of the included universe become part of the derived
universe. Note that the structure, classes, and objects of the included universe
are not grayed out. This indicates that they can be edited.
Advantages of linking
The structure is only created once in a core universe and then reused in
derived universes.
Classes and objects are only created once in a core universe and then
reused in derived universes.
Any maintenance only has to be applied to the core universe.
Derived universes are automatically updated when the core universe is
amended.
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.
Objectives
By the end of this activity, you will be able to:
Link and then include universes using the Motors2004 universe you have
built during this course, and the Staff2004 universe.
Business requirement: Prestige Motors management wants to report on
the sales performance of its sales staff and their managers.
Instructions
1 Check that you have saved and exported the Staff2004 universe recently.
2 Make room in the upper left corner of the Structure pane in the
Motors2004 universe.
To do this, click in any white space in the Structure pane, click Select All
from the Edit menu, then drag the tables to the right in the pane.
1 Embed the structure and objects of the Staff2004 universe in the
Motors2004 universe.
Place the Staff2004 structure in the top left-hand corner of the
Motors2004 universe structure and insert a join between the employee
and client tables as follows:
EMPLOYEE.EMP ID=CLIENT.EMPLOYEE_ID
Edit the Sales and Rentals contexts to include the newly created join and
the one between the Employee and Manager tables.
2 Save the Motors2004 universe and close it.
3 Open the Staff2004 universe and make the following changes to the staff
object.
Make sure Name = Sales Person
that the Where = EMPLOYEE.JOB_IO = 3
learners use
4 Save the Staff2004 universe, export it and close it.
the JOB_IO
column, and 5 Open the Motors2004 universe and check that the change in the
not the Staff2004 universe is reflected in it.
EMP _10 6 Change the Link to Include.
column.
7 Save the Motors2004 universe.
Review
Summary
Recap the After completing this lesson, you are now able to:
lesson
Understand what linked uinverses are and why you would choose to use
objectives them
with the
learners to Understand the advantages and limitations of using linking
check that all Link universes
learners have Include one universe within another
acquired the
required Understand the advantages of each method
skills before
moving on to
the next
section.
Duration: 45 minutes
Introduction
One of most important tasks in managing a universe is applying security in
order to restrict the users or groups of users who are authorized to use
universe objects or resources.
After completing this unit, you will be able to:
Explain the levels of security available in BusinessObjects Enterprise to
authorize or restrict access to data with universes
Describe the types of restrictions that can be applied to a universe
Describe how restriction sets are managed by Designer
Create a new restriction set
Apply a restriction set to a user or group of users
Set restriction group priority
View user and group restrictions
You assign a restriction set to a BusinessObjects user or group. This limits the
access to universe objects or resources based on the profile of the user group.
universe
You
You
The can
can bycontrol
universe
Options to
to another
define
apply
replace athe table
aWHERE
columntable
connection
limit size
the SQL toin
level
of theresult
clause
referenced database.
that
security.
the
the data
generated in restricts
theand
source.
set
for You
queries.
Description
access Type
can
access
query
a of
universe.
select restriction
an alternative
to row andtime.
execution
query. connection for the
limits the result set returned by
options
Alternative
Connection
Query
SQL accesstable
Row generation
controls Object access
The Available Restrictions pane in the left-hand side of the Manage Access
Restrictions dialog box lists all the restriction sets currently available to the
universe.
The users and groups defined for each restriction set are listed in the Available
Groups and Users pane, in the right-hand side of the dialog box.
To
To remove
define
To define
modify
Description aWHERE
aan
userrestriction
add aallwhether
view neworrestriction
ausers
security
and
existing
group set to
clause
youoption
want
groups from
that
set.
from the
restricts
combine
defined
restriction
from the list.
selected
set. inrow
list of access
therestric-
users
CMS.
Busines- or
toRestriction
sObjects
query.
rowusing
groups. andusers
Management
tions the option
limits
and
theor
Server
AND groups
result
(CMS).defined
set returned
OR logical in theby
operator.Central
a
Restriction
Delete
Preview
New
Edit
Remove
Add oroptions
user restriction
Priority group set
Creating a restriction
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.
The Reset button in the bottom left-hand corner of the Edit Restriction
dialog box allows you to return to the settings that were defined
previously.
4 In the Restriction Name text box, type My 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.
6 Click the Controls tab.
The Controls tab displays.
/
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.
7 Click the SQL tab.
The SQL tab displays.
In this tab, you can set controls on the types of queries that end users
can formulate for a specific group of users. These are the same settings
that you have used before in the Universe Parameters dialog box.
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.
In this scenario, you will create a new restriction set which will be applied
to the Sales user group. The Sales user group is made up of sales
representatives who are need to access data concerning Prestige Motors
car sales. Because they are not involved in rental transactions, you have
decided that you do not want to authorize them to view data that can be
retrieved by the objects in the Rental class.
2 In the Objects tab of the Edit Restriction dialog box, click Add.
The New Restricted Objects dialog box displays.
Note: If you are sure of the name of the object you want to restrict, you
can type it in the Object Name text box and click OK to continue.
Otherwise, continue to step 3.
3 Click Select.
The Object Browser displays.
Car
Ef.HIDJJ Showroom
1±1!iliiJ Client
1±i!iliiJ Financial Period
[i'h~ Rentals
~ ..~ Rental Details
: ;···m j_;Jj,"~!lla8l11111l\!!1
$Hi\§) Rental Dates
. [B··!iliiJ Rental Figures
$!iliiJ Sales
J¥ ..!iliiJ Dummy Restriction Objects
7 Click OK.
The name of the subclass and object you selected appears in the New
Restricted Object dialog box.
In the Rows tab, you can define a WHERE clause on a table in the
database in order to restrict access to specific rows, and limit the results
that can be returned by queries run by specific users or a group of users.
In this scenario, you want to restrict your sales representatives from
querying data concerning sales in 2003.
2 Click the Add button to create a rows restriction.
The New Row Restriction dialog box displays.
l@f:ig6LF..\.(:;g.~·~~ .
CLIENT
COLOUR
COUNTRY
COUNTRY_MAKER
COUNTRY_REGION
COUNTRY_SHOWROOM
EMPLOYEE
FINANCEYERIOD
FRANCHISE
MAKER
MANAGER
I
'-../
In this tab, you can specify that for a specific user or group of users, any
time a table is referenced by an object in this universe, the table should
be replaced by another table.
2 In the Table Mapping tab, click the Add button.
3 The New Table Mapping dialog box appears.
If you know the exact names of the tables, you can type them in the text
boxes. Otherwise, use the select button to select the original and
replacement tables.
When you have selected the tables, click the Check All button to validate
the status of the mapping settings.
Now you are ready to assign this restriction set to a user or group of users.
Note, however, the list shows that no restriction has been assigned to this
group yet. You will now assign the new restriction to the selected user
group.
In the Manage Access Restrictions dialog box, make sure that both the
My Restriction set and the Sales user group are selected.
Click the »Apply button.
The restriction set now appears in the list next to the name of the user
group.
You can arrange user groups in order. The restriction for the lowest group in
the listed order is used.
Note: This only applies to exclusive restrictions such as connection, table
mapping, or SQL controls. If object restrictions are set on both groups,
they will ALL be applied.
3 Select a user or group, and click the Move Up or Move Down buttons to
change the priority level.
4 Click OK.
The Restriction Preview dialog box displays the settings you defined
when you created the restriction set. In our example, the dialog box
includes two tabs, Objects and Rows, which each correspond to the tabs
in the Edit Restriction dialog box you used to define the restriction
settings.
3 Click each tab to view the settings that you defined.
4 Click Close.
S Click OK to close the Manage Access Restrictions dialog box.
Objectives
By the end of this activity, you will be able to:
Create a new restriction set
Apply the restriction set to a user group
Test the restriction set in Web Intelligence
any Instructions
'--" 431
25 will replace
6 This activity In the Motors2004 universe, create a restriction set called ManagersOnly,
7sets that restricts access to the Manager object.
Apply this restriction set to the Sales and Employees group.
Preview the restriction to check that it is correct.
Save and export the universe.
Log onto InfoView using the Hank HR user account.
Create a new document in Web Intelligence
Verify that:
the Employees class is visible.
the Staff object is available.
the Managers object is not visible.
Review
Summary
Recap the After completing this lesson, you are now able to:
lesson
Explain the levels of security available in BusinessObjects Enterprise to
objectives authorize or restrict access to data with universes
with the
learners to Describe the types of restrictions that can be applied to a universe
check that all Describe how restriction sets are managed by Designer
learners have Create a new restriction set
acquired the
required Apply a restriction set to a user or group of users
skills before Set restriction group priority
moving on to View user and group restrictions
the next
section.
Duration: 45 minutes
Introduction
As you build a universe that reflects the reporting needs of the end users in your
organization, you will probably want to document the progress of the universe
design project. You can use the print function in Designer to document the
universe as it is being built, as well as to communicate the components of the
universe to other universe designers after the project is complete.
After completing this unit, you will be able to:
Print lists of different universe components
Print details concerning each of the universe components
This feature is useful for documenting the details of the different components that
make up the universe.
There are several reasons for documenting a universe:
As universe designer, you can take snapshots of the universe at various
points during its development to chart progress against project plans.
You can create a complete breakdown of the universe components on
paper, or in PDF format, for archiving after the design work is finished.
Other universe designers can use this documentation to quickly familiarize
themselves with the major components of a universe.
Linked Universes Prints the name of any universe to which the active
universe is linked.
Scale Sets the scale for printing the contents of the Structure
window. The scale is expressed as a percentage. By
default it is 100%. Other scale values in the Scale List
Box are 80%, 65% and 50%. Or, you can enter the
exact scale you require.
)
-./ For example, if you choose to print a list of the contexts in this universe, the result
appears like this:
Context List
QUARTER_Ff-1:l;JRES
ANHJ.4i.,;..;:i="IGUR:::'S
RENTALS
M:CO£l.S
fRANCHISE
I
~
Canrexr List
Q;JA~TER FIGuRES
ANNUAL RGUHE&
RENTALS
MOO.E::..a
SALES
FR.t.,t·.jCH"SE
Conte-Xl
CQf!~ "'';:.!W1~:QliRRER FG'-iR:.-:S
M.oDEl.~JDEL PRTC.E~':v..~Ef!:5Jo,LES :?RICE RAW3-2:.FR!,cE RA..'\:Ct Mlti< <!fliis..<U..SS PRIG
E R~J.!GE.PR!C:'@: RANC-.E MAX - - - - -
OO')El.Snt,'E jQ;ST't'lE-:-SIT>_= ;;12.
MCOELM.t..K2.:f ;D=WAKER.~"'.KE~ I~
OOLiNTEY:CC1UNF?f ID=SHOW'RCC,MGO;J~ITRY :[}
M~><E'R.C.0Ut1;TRY ::;j;~ou:\:'TR"{ M,I.;!{ERCOUNiRy ![}
~t:C-D=U",,'\OOEl :JAYRENTbe:!>.>JeenRS'<1rAt.. PR!CE RANGE-RENT ;:AN·!2·:' r1.W-<,~mdRENTA
l P~jCE R~NGEBENT R"'f>.i>:3E~.1.;X - - --
r.i,~.~.,HT£.~ FfaU?£S_.Si-iOW'ROOf.1 ;D=3;-K;-:"l~HCQM.sH0NR.DOM:D
Q!JftRTER=RG'.jRESJ .•~Om=L_;~;~:<~ELMOD3..._::O -
CCf!~sd: ~~"'1=:'REN1,.t1..S
8EGIQN.REGK>,,'\; ID=CU3..:T.REG-:ON ~D
M;XIEL.STilEJD--STYLE.3T{;';=.)} -
M-~:DEU,4AA.ER. K:t=M.l:.>r.:ER.!'..M.KER. I,;)
CQUNTRY REQJOO.:C:-OUNl"RY I'Q.=REGKo:N.CO;J:\:l'RY :'0
OOUNTF.Y f.:OUN1;:;;'{ ID=SHOWRC<DMCOUN"fRY ;{} -
t;:~"·C=:;:;I ,'"':-r':II~-,":"~Y;:~J'}; 1"-::'"j:)V "-U.K;::'::; ~nll$;:w'<' In
J ,
Introduction
After you have completed the universe, it should be rigorously tested by a small
team of expert users before it is distributed to the end-user population.
It is recommended that the universe is tested by a small group of other designers
and expert users independently to ensure that the universe functions correctly
and provides the reports required with accurate results.
When you have completed the design, build, and test phases in creating a new
universe, you are ready to make the universe available to Web Intelligence users
or other report designers. This is known as deploying the universe.
After completing this unit, you will be able to:
Understand how universes are deployed to other users
Understand how universes are secured
Export a universe to the repository
Import a universe from the repository
Understand how version control is managed
~ J
where @<repos ito ry name> is the name of the repository the universe is
I 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
'-../
J 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).
From the Universe page in the CMC, a BusinessObjects Enterprise
~I administrator can change the universe name and description, move its
location, and define user access rights to 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 Web Intelligence 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.
'-.-/}
beach
efashion
Motors
Motors2004
Staf2002
eFashion.unv
Island Resorts Marketing.unv
Motors2000.unv
Motors2004.unv
Staff2002.unv
LOV files are stored in a folder with the same name as the universe file at the
same level as the universe.
The universe is also stored on the CMS, so that other designers can import it,
and users can use it to create Web Intelligence reports.
When you import a universe from the CMS, the .unw file stored in the FRS file
system and the CMS InfoObject is converted to a .unv file and transferred to the
local machine in the same folder shown above.
2 Select a folder from the 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.
Importing a universe
As a Universe Designer user, 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 Universe Designer user in the CMC 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 stored in the FRS file
system and the CMS InfoObject are converted to a .unv file and transferred to
the local machine in the following location:
\\Documents and Settings\<username>\Application
Data\Business Objects\BusinessObjects
11.O\universes\@<repository name>\universe
folder\<universe>.unv
where @<repos ito ry 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.
When you export the universe, the CMS version will always be updated, even if
there are no real changes.
If you try to export a new universe with the same name as an existing universe,
Designer displays a message asking you if you want to:
Update the existing universe with the new universe. Specifically, replace
the contents but keep the ID and all security.
Replace the existing universe, which is equivalent to deleting the
universe and exporting a new one.
Cancel, so that you can rename the universe and export it as a different
universe.
Introduction
After you have completed the universe and then deployed it to the end-user
population in your organization for report creation, you must maintain the
universe to ensure that it continues to function correctly and provide the reports
with accurate results.
Greater
Changingimpact
Renaming/moving
existing column
database
and table names
Minimal Impact
Adding new
Adding new columns
tables Deleting tables and columns
Objects that are affected by changes to the table are highlighted in the
Objects and Classes window.
2 Check the properties of each object and 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.
•
Add tables to the univers e structure
••
•
D e1ete existing c ontfZls
Detect alias es
••
Detect contexts
••
Create na.v objects
I.
Setup hierarchies
See Lesson 8 Resolving SQL Traps for details on how to determine what joins
make up a context.
the exactand
Changing
Deleting
Greater same
an then
impact definition
existing
existing
recreating
column
object and
antable
object
names
with
ent class toMinimal
a differentImpact
class
Renaming
Copying
Redefining an
Moving inanthe
an object
object
same toclass
object'sa SQL
differ-
or Adding new objects
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 will occur.
Objectives
By the end of this activity, you will be able to:
Locate the universe in the repository file server.
View the universe in the Central Management Console.
Instructions
1 In the Motors2004 universe you have been building in this course, set the
print options to print the list of tables referenced in the universe and details
of the columns in each table.
2 Export the universe to a new folder in the universe folder, called Motors.
3 Using Windows Explorer, verify the location of the exported universe.
4 Launch the BusinessObjects Enterprise Administration Launchpad and log
into the Central Management Console, using the user name Administrator,
no password.
5 Verify that the new universe folder has been created and that Motors2004 is
listed in that folder.
6 From the Administration Launchpad, log into InfoView and create a new
Web Intelligence document to verify that the new universe is available to
end users.
Review
Duration: 30 minutes
17-1
Copyright © 2005 Business Objects. All rights reserved.
Creating a universe from an XML metadata file
Introduction
You can use Designer to create a universe from a metadata source. Once the
universe has been created it can be exported to the Central Management
System (CMS) as any other universe, and is then available to Web Intelligence
and Desktop Intelligence users to run queries and create reports.
Note: The Metadata Exchange is also available in stand-alone mode with
BusinessObjects XI release2. You can create a universe from a
metadata source from within Designer, or by starting the Universe
Builder from the Windows Programs Start bar and selecting Universe
Builder in the Business Objects group of products.
After completing this unit, you will be able to:
List the metadata sources you can use to create a universe
Describe the Metadata Exchange panel functions
Create a new universe from an XML metadata file
• I
: Database1
1i t; DB20LAP
;:ii' ~ TIME_PERIOD
[*, ~ PRODUCT .
,£ ~ CHANNEL
This wizard page displays all the tables and columns in this metadata file.
2 Click the + next to the PRODUCT table to view the columns in this table.
~
d t: DB20LAP
tii llii FACT
if!. iliJ TlMCPERlOD
IIi ffij PROMOTION
S iliJ PRODUCT
~PRODUCT
ff1j PRODUCT
lliJ BRAND 2N
PRODUCT
You can select individual tables or columns in the list and use the <
button to move them individually into the list in the right-hand side of the
wizard box.
Or you can use the « button to move all the contents of the file at once.
3 Click the» button.
All the tables are moved into the list on the right-hand side of the wizard
page.
4 Click Next to continue.
The Universe Creation Step 4 wizard page displays.
~
)
In the General tab of the Options dialog box, you can specify the location
where trace files can be stored.
3 Click the File Locations tab.
/
../ '-/
iI,
4
'-/
'--./
'-../
'---"
I
The File Locations tab allows you to specify default locations for storing
the source XML files and the parameter files associated with the
metadata.
The default locations are currently set in the BusinessObjects Enterprise
11.5 installation folder.
Click OK to close the Options dialog box.
The Universe Creation Step 5 wizard page appears.
'-/ I
~\
This page summarizes the connection and file information that will be
used to create the universe.
S Click Finish.
The universe displays with classes, objects and joins automatically
defined:.
Note: You cannot actually check the integrity of this universe, or export
the universe to the CMS, because you have not defined a
connection to the original data source.
6 Save the universe and close Designer.
Practice
'-" I
Activity: Creating universes from metadata
Objectives
At the end of this activity, you will be able to:
J Create a universe from an XML database file.
J
Instructions
1 Locate the sample XML files on the course Resource CD.
2 Copy the XML files to a folder on your workstation.
3 Open the Metadata Exchange panel in Designer.
4 Select the Data Integrator format in the Create a universe from drop-
down list.
5 Specify the sample_dLxml file as the source file.
6 Create a new universe called Dluniv.
'-"'I
'-" I
Review
Summary
Recap the After completing this lesson, you are now able to:
lesson
List the metadata sources you can use to create a universe
objectives
with the Describe the Metadata Exchange panel functions
learners to Create a new universe from an XML metadata file
check that all
learners have
acquired the
required
skills before
moving on to
the next
section.
Department
Job Title
Salary Item (a description)
Financial Year (for Salary analysis only)
Financial Quarter (for Salary analysis only)
Financial Month (for Salary analysis only)
Date of Payment - no LOV, formatted to dd/mm/yyyy
7 Check integrity, save the universe and test it by creating the following
reports. Save each one when it has run successfully.
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.
A list of absences detailing the employee, job title, showroom, date of
absence, duration of absence and reason for absence. Order by the
reason for absence.
A summary of the salary costs and absences per showroom.
S Insert the ANNUAL_SALARY table and apply aggregate awareness.
9 Check integrity, save the universe and re-test it for aggregate awareness
by:
Viewing the inferred SOL for the existing Salary Cost Report
Editing the query by removing the Month object, viewing the SOL
and then running it
10 Once you have completed the workshop show the instructor your results.
."
'"'
I
.;...
J,
_____
I
./
(~'O~ t"I~+h~ q~" (c;) ; lI1. t~ /'VJ C'd'V1
,
(.r i I;: )'l!J f': t "".Ir:~i'1 .•i
('"IIIf v':J ",.,.\
f" I).,> '", 1\1
~'J".,'t' ~'J 1c-\ ;~~
~'" ~'o.)
!
p, ~Jif)( Jl"'-,;j
t, t'\ 'r-"~ ../ ()i-'U
~,AiA\ ~ i- A
'\.-
usl o
Training Evaluation
We continuously strive to provide high quality trainers and training guides. To do this, we rely on your feedback.
We appreciate you taking the time to complete this evaluation.
Position: _
Name: _
Company: _~ _
Email: _
Phone: _
Course Information
Date: _ Course: _
0
Did the course content
0 needs?
meet your 0
""
j
What did you enjoy least about the course? ~
J
~I
/
r"\!
Comment on this training guide's completeness, accuracy, organization, usability, and readability.
~.i
How did you find out about the training class?
")
~\
/
~.
)
~.
What changes, if any, would you like to recommend regarding this session? I
~
/ J
~
i
/".
)
r"\
/
")
)
~/
).