Vous êtes sur la page 1sur 294

Oracle iDS: Discoverer for

Administrators

Volume 1 Student Guide


.......................................................................................

nly
e O
Us
AI
& O
al
ern
Int
47212GC30

e
Production 3.0

cl
February 2001

ra
O
D31669
Author Copyright Oracle Corporation, 2001, 2000. All rights reserved.

Kasturi Shekhar This documentation contains proprietary information of Oracle Corporation. It is


provided under a license agreement containing restrictions on use and disclosure
and is also protected by copyright law. Reverse engineering of the software is
Technical Contributors prohibited. If this documentation is delivered to a U.S. Government Agency of the
and Reviewers Department of Defense, then it is delivered with Restricted Rights and the
Mike Durran following legend is applicable:

Karlene Jensen Restricted Rights Legend


Use, duplication or disclosure by the Government is subject to restrictions for
Christpher H. Barron commercial computer software and shall be deemed to be Restricted Rights
Elaine Powers software under Federal law, as set forth in subparagraph (c) (1) (ii) of DFARS
252.227-7013, Rights in Technical Data and Computer Software (October 1988).
Craig Davis This material or any portion of it may not be copied in any form or by any means
without the express prior written permission of Oracle Corporation. Any other
Kenneth Nicholson copying is a violation of copyright law and may result in civil and/or criminal
Rhonda Bassett penalties.

If this documentation is delivered to a U.S. Government Agency not within the


Anna Atkinson Department of Defense, then it is delivered with Restricted Rights, as defined in
FAR 52.227-14, Rights in Data-General, including Alternate III (June 1987).

The information in this document is subject to change without notice. If you find
Publisher any problems in the documentation, please report them in writing to Education
Products, Oracle Corporation, 500 Oracle Parkway, Box SB-6, Redwood Shores,
Kelly Sargent CA 94065. Oracle Corporation does not warrant that this document is error-free.

Oracle is a registered trademark and Oracle Discoverer, Oracle7, Oracle8, PL/


SQL, and SQL*Plus are trademarks or registered trademarks of Oracle
Corporation.

All other products or company names are used for identification purposes only
and may be trademarks of their respective owners.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O
Contents
.....................................................................................................................................................

Preface
Profile xiii
Typographic Conventions xiv

Lesson 1: Introduction to Discoverer 4.1 Administration


Objectives 1-3
Discoverer in Oracles Internet Platform 1-4
Positioning Discoverer 1-6
Integration of Business Intelligence Tools 1-8
Discoverer 4.1 Components 1-11
Key Terminology 1-14
Role of the Data Administrator 1-16
Training Business Areas 1-22
Human Resources Data Model 1-24
Administrator HR Business Area 1-25
Summary 1-27

Lesson 2: Creating the End User Layer and Business Areas


Objectives 2-3
Overview 2-4
Creating an End User Layer 2-5
Creating the Initial EUL 2-8
Discoverer in Application Mode 2-10
nly
Practice 2-1 Overview 2-13

e O
s
Designing Business Areas 2-15
Creating Business Areas 2-22
I U
Bulk Load Defaults 2-33
Object Property 2-35
OA
l &
a
Exporting and Importing 2-36

rn
Practice 2-2 Overview 2-43

e
Int
Providing Security to Business Areas 2-45
Summary 2-51

cle
Practice 2-3 Overview 2-52

ra Practice 2-3 2-53

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators iii
Contents
.....................................................................................................................................................

Lesson 3: Creating LOVs, Alternative Sorts, and Conditions


Objectives 3-3
Overview 3-4
Using Item Classes 3-5
Creating Lists of Values 3-7
Creating Alternative Sorts 3-12
Using Conditions 3-16
Summary 3-24
Practice 3-1 Overview 3-25
Practice 3-1 3-26

Lesson 4: Creating Calculated Items and Registering PL/SQL Functions


Objectives 4-3
Overview 4-4
Folder and Item Properties 4-5
Item Calculations 4-11
Registering PL/SQL Functions 4-17
Summary 4-21
Practice 4-1 Overview 4-22
Practice 4-1 4-23

Lesson 5: Creating Complex and Custom Folders


Objectives 5-3
nly
Overview 5-4

e O
s
Using Joins 5-5
Using Complex Folders 5-19
I U
Using Custom Folders 5-25
Summary 5-32
OA
l &
a
Practice 5-1 Overview 5-33

ern
Lesson 6: Creating Analytical and Aggregate Items

Int
Objectives 6-3

le
Overview 6-4

c
a
Analytical Functions 6-5

Or

.....................................................................................................................................................
iv Oracle iDS: Discoverer for Administrators
Contents
.....................................................................................................................................................

Creating Aggregate Calculations 6-8


Summary 6-17
Practice 6-1 Overview 6-18
Practice 6-1 6-19

Lesson 7: Creating Drills


Objectives 7-3
Overview 7-4
Using Drills 7-5
Designing and Creating an Item Hierarchy 7-10
Creating a Drill to Detail 7-15
Using Hyperdrill Plug-Ins 7-22
Creating the Date Hierarchy 7-24
Using a Nonstandard Calendar 7-31
BLOB Support 7-36
Summary 7-38
Practice 7-1 Overview 7-39
Practice 7-1 7-40

Lesson 8: Creating and Managing Summary Folders


Objectives 8-3
Overview 8-4
Summary Tables and Folders 8-5
nly
Different Types of Summary Tables 8-6

e O
s
Different Types of Summary Management 8-9
Creating Summary Folders by Using EUL Items 8-13
I U
Creating Summary Folders by Using Query Statistics 8-24
Registering External Summary Tables 8-29
OA
l &
a
Managing Summary Folders 8-34

rn
Summary Combination Strategies 8-39

e
Int
Summary Management in Applications Mode 8-42
Summary 8-43

cle
Practice 8-1 Overview 8-44

ra Practice 8-1 8-45

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators v
Contents
.....................................................................................................................................................

Lesson 9: Automatic Summary Management


Objectives 9-3
Overview 9-4
Summary Management 9-5
Using the Summary Wizard 9-10
Summary 9-20
Practice 9-1 Overview 9-21
Practice 9-1 9-22

Lesson 10: Managing Batch Scheduling


Objectives 10-3
Overview 10-4
Scheduling Workbooks 10-5
Batch Repository Owner 10-8
Setting Scheduled Workbook Privileges 10-12
Managing Scheduled Workbooks in the Administration Edition 10-13
Changes Affecting Batch Reports 10-18
Summary 10-19
Practice 10-1 Overview 10-20
Practice 10-1 10-21

Lesson 11: Maintaining the End User Layer


Objectives 11-3
nly
Overview 11-4

e O
s
Effects of Database Changes 11-5
Managing Folders and Business Areas 11-9
I U
Migrating from Development to Production 11-13
Moving only Workbooks 11-15
OA
l &
a
Analyzing the End User Layer 11-17

r
Summary 11-18

e n
Int
Practice 11-1 Overview 11-19
Practice 11-1 11-20

cle
ra
O

.....................................................................................................................................................
vi Oracle iDS: Discoverer for Administrators
Contents
.....................................................................................................................................................

Lesson 12: Administering Multiple End User Layers and Automating


Tasks
Objectives 12-3
Using the EUL Manager Wizard 12-4
Installing the Tutorial 12-8
Installing the Tutorial: Step 3 12-10
Multiple End User Layers 12-12
Administration Command-Line Interface 12-16
Summary 12-23
Practice 12-1 Overview 12-24
Practice 12-1 12-25

Lesson 13: Configuring Discoverer for the Web


Objectives 13-3
Introducing Discoverer 4i 13-4
Benefits of Discoverer 4i Plus 13-5
Using Discoverer 4i Plus 13-10
Overview of Oracle 9i Architecture 13-14
Three-Tier Architecture in Discoverer 4i Plus 13-15
Discoverer 4i Plus Architecture At-a-Glance 13-20
Opening a Workbook from a URL 13-26

ly
Discoverer 4i Viewer 13-28
Configuring Discoverer 4i Viewer 13-29

On
e
Customization 13-31
Summary 13-32
Us
Practice 13-1 Overview 13-33

AI
O
Practice 13-1 13-34

l
Lesson 14: Case Study
&
na
Overview CS-3
r
te
Entity Relationship Diagram (ERD) for the Summit Sporting Goods

n
I
Company CS-6

cle
Table Design for Database Tables CS-7

ra Practice CS-1 CS-9

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators vii
Contents
.....................................................................................................................................................

Worksheets CS-14

Appendix A: Practice Solutions


Practice 2-1 Solutions A-2
Practice 2-2 Solutions A-3
Practice 2-3 Solutions A-5
Practice 3-1 Solutions A-8
Practice 4-1 Solutions A-11
Practice 5-1 Solutions A-17
Practice 6-1 Solutions A-26
Practice 7-1 Solutions A-29
Practice 8-1 Solutions A-33
Practice 9-1 Solutions A-36
Practice 10-1 Solutions A-38
Practice 11-1 Solutions A-41
Practice 12-1 Solutions A-46
Practice 13-1 Solutions A-48
Practice CS-1 Solutions A-50

Appendix B: Discoverer and Oracle Applications


Architecture B-2
BIS Business Areas for Products B-6

Lesson 15: Accessing External Data Sources


nly
Integration: Data Access C-2
e O
Accessing External Sources C-3
Us
EUL Gateway Architecture C-4
AI
Default Structures Loaded Using the EUL Gateway C-5

& O
l
Additional Structures Loaded Using the EUL Gateway C-6

na
Developing Gateways C-7

r
e
Loading Objects Using the EUL Gateway C-8

Int
Loading Oracle Designer Objects C-9

le
Loading Oracle Designer Objects C-10

c
a
Loading Oracle Designer Objects C-11

Or

.....................................................................................................................................................
viii Oracle iDS: Discoverer for Administrators
Contents
.....................................................................................................................................................

About ODBC Support C-12


ODBC-Supported Features C-13

Appendix C: Frequently Asked Questions

Appendix D: Examples of Analytical Functions


Example of Analytical Functions E-2

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators ix
Contents
.....................................................................................................................................................

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
x Oracle iDS: Discoverer for Administrators
Preface

.................................

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O
nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O
Profile
.....................................................................................................................................................

Profile
Before You Begin This Course
Before you begin this course, you should have working experience with a relational
database or have working experience with the User Edition interface.

Prerequisites
Introduction to Oracle and Discoverer 3.1 for End Users
Introduction to Oracle: SQL and PL/SQL

How This Course Is Organized


Oracle Discoverer for Administrators is an instructor-led course featuring lectures and
hands-on exercises. Online demonstrations and written practice sessions reinforce the
concepts and skills introduced. This course consists of the following lessons:
Lesson 1: Introduction to Discoverer 4.1 Administration
Lesson 2: Creating the End User Layer and Business Areas
Lesson 3: Creating LOVs, Alternative Sorts, and Conditions
Lesson 4: Creating Calculated Items and PL/SQL Functions
Lesson 5: Creating Complex and Custom Folders
Lesson 6: Creating Analytical and Aggregate Items
Lesson 7: Creating Drills
Lesson 8: Creating and Managing Summary Folders
Lesson 9: Automated Summary Management
Lesson 10: Managing Batch Scheduling
nly
Lesson 11: Maintaining the End User Layer

e O
Lesson 12: Administering Multiple End User Layers and Automating Tasks

Us
I
Lesson 13: Configuring Discoverer for the Web
Case Study
OA
l &
rna
nte
e I
cl
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators xiii
Preface
.....................................................................................................................................................

Typographic Conventions
Typographic Conventions in Text
Convention Element Example
Bold italic Glossary term (if The algorithm inserts the new key.
there is a glossary)
Caps and lowercase Buttons, Click the Executable button.
check boxes, Select the Cant Delete Card check box.
triggers,
Assign a When-Validate-Item trigger . . .
windows
Open the Master Schedule window.
Courier new, Code output, Code output: debug.seti(I,300);
case sensitive directory names, Directory: bin (DOS), $FMHOME (UNIX)
(default is filenames,
Filename: Locate the init.ora file.
lowercase) passwords,
pathnames, Password: Use tiger as your password.
URLs, Pathname: Open c:\my_docs\projects
user input, URL: Go to http://www.oracle.com
usernames User input: Enter 300
Username: Log on as scott
Initial cap Graphics labels Customer address (but Oracle Payables)
(unless the term is a
proper noun)
Italic Emphasized words Do not save changes to the database.
and phrases, For further information, see Oracle7 Server

ly
titles of books SQL Language Reference Manual.

n
and courses,
Enter user_id@us.oracle.com, where

O
variables
user_id is the name of the user.
Quotation marks Interface elements
se
Select Include a reusable module
with long names
U
component and click Finish.

I
A
that have only This subject is covered in Unit II, Lesson 3,

O
initial caps; lesson Working with Objects.

&
and chapter titles in

al cross-references

n
COURIER NEW SQL column Use the SELECT command to view

ter names, commands, information stored in the LAST_NAME

n
functions, schemas, column of the EMP table.

e I table names

cl
ra
O

.....................................................................................................................................................
xiv Oracle iDS: Discoverer for Administrators
Typographic Conventions
.....................................................................................................................................................

Convention Element Example


Arrow Menu paths Select File>Save.
Brackets Key names Press [Enter].
Commas Key sequences Press and release these keys one at a time:
[Alt], [F], [D]
Plus signs Key combinations Press and hold these keys simultaneously:
[Ctrl]+[Alt]+[Del]

Typographic Conventions in Code


Convention Element Example
Caps and lowercase Oracle Forms When-Validate-Item
triggers
Lowercase Column names, SELECT last_name
table names FROM s_emp;
Passwords DROP USER scott
IDENTIFIED BY tiger;
PL/SQL objects OG_ACTIVATE_LAYER
(OG_GET_LAYER (prod_pie_layer))
Lowercase italic Syntax variables CREATE ROLE role
Uppercase SQL commands SELECT userid
and functions FROM emp;

Typographic Conventions in Navigation Paths


This course uses simplified navigation paths, such as the following example, to direct

ly
you through Oracle Applications.

On
e
(N) Invoice>Entry>Invoice Batches Summary (M) Query>Find
(B) Approve

Us
AI
O
This simplified path translates to the following:

&
1 (N) From the Navigator window, select Invoice>Entry>Invoice Batches
Summary.
al
rn
2 (M) From the menu bar, select Query>Find.

e
Int
3 (B) Click the Approve button.

cle
N = Navigator, M = Menu, B = Button

ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators xv
Preface
.....................................................................................................................................................

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
xvi Oracle iDS: Discoverer for Administrators
1
.................................

Introduction
to Discoverer 4.1
Administration

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O
Lesson 1: Introduction to Discoverer 4.1 Administration
.....................................................................................................................................................

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
1-2 Oracle iDS: Discoverer for Administrators
Objectives
.....................................................................................................................................................

Objectives

Course Objectives

After completing this course, you should be able to


do the following:
Implement and administer Discoverer
Create the End User Layer
Design the business area
Control user access to the End User Layer
Customize the End User Layer
Optimize query performance
Discuss configuration issues of Discoverer for
the Web

Copyright Oracle Corporation, 2001. All rights reserved.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 1-3
Lesson 1: Introduction to Discoverer 4.1 Administration
.....................................................................................................................................................

Discoverer in Oracles Internet Platform

One Development Suite

APPLICATION
D ATAB ASE
S E RV E R

Copyright Oracle Corporation, 2001. All rights reserved.

Oracle 9i Developer Suite


Oracle provides a simple environment for application development and deployment
with:
Oracle 9i

ly
Oracle 9i Application Server (9i AS)
Oracle 9i Developer Suite (9i DS)
On
e
Oracle 9i Development Suite provides one development suite. It contains leading
Oracle application development tools, business intelligence tools, and enterprise portal
Us
building tools into a single suite.

AI
O
Oracle 9i Developer Suite includes the following:

&
E-Business Portal
Oracle Portal
al
rn
Complete Application Development
e
nt
Oracle Forms Developer

I
e
Oracle Designer

cl
Oracle JDeveloper and Business Components for Java

ra
Business Intelligence
O
Oracle Reports Developer
Oracle Discoverer (Administration Edition)

.....................................................................................................................................................
1-4 Oracle iDS: Discoverer for Administrators
Discoverer in Oracles Internet Platform
.....................................................................................................................................................

Oracle Internet Application Server

Runs All Your Applications

Portals

Oracle
Database Applications
HTTP

Server
Business Intelligence DATABASE

Copyright Oracle Corporation, 2001. All rights reserved.

Oracle 9i Application Server (9iAS)


Oracle 9iAS provides a simple internet platform to run all your applications. Oracle
9iAS services supply middle-tier integrated functions for deploying your applications
along with Oracle HTTP Serverpowered by Apache.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 1-5
Lesson 1: Introduction to Discoverer 4.1 Administration
.....................................................................................................................................................

Positioning Discoverer

Data Warehouse and OLTP Systems


Data warehouse:
Multiple subjectoriented
Integrated across subjects and entire
enterprise
Time-variant
Nonvolatile
Historical
Unpredictable (regarding workload)
Online transaction processing (OLTP) systems:
Process-oriented
Current
Volatile
Predictable (regarding workload)

Copyright Oracle Corporation, 2001. All rights reserved.

Data Warehouse
A data warehouse is an enterprise-structured repository of subject-oriented, time-
variant, historical data used for information retrieval and decision support. A data
mart contains data warehouse data for a business functional area or department. Many
data marts can make up a logical data warehouse. The workload on data warehouse

ly
varies not just on a daily basis, but may even be affected by other forces such as
seasonal variations. The data can be summarized at multiple levels of granularity.
Summarized data is data that has been aggregated or transformed from the detail
On
(atomic) level.
se
I U
A
Online Transaction Processing (OLTP) Systems
OLTP systems contain the day-to-day information needed to maintain and run a
business process. These systems are predictable, because you can assess the workload
& O
al
on a daily basis and thus plan and prepare accordingly. Typically, OLTP systems allow

rn
full read and write access to the users by way of different applications.

e
Int
cle
ra
O

.....................................................................................................................................................
1-6 Oracle iDS: Discoverer for Administrators
Positioning Discoverer
.....................................................................................................................................................

Data Warehousing with Discoverer

Discoverer provides:
Business areas
Date hierarchies
Summarized data

Copyright Oracle Corporation, 2001. All rights reserved.

Data Warehousing with Discoverer


Discoverer 4.1 is a subject-oriented tool. You use Discoverer to build ad hoc queries
using data in a subject area of interest to you. Discoverer also provides drills for
drilling down from summary data to more detailed data.

Open Database Connectivity (ODBC) Support

ly
Discoverer 4.1 supports Open Database Connectivity (ODBC) access to non-Oracle

n
based databases.

e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 1-7
Lesson 1: Introduction to Discoverer 4.1 Administration
.....................................................................................................................................................

Integration of Business Intelligence Tools

Integration of Business Intelligence Tools


Discoverer Express

Ad hoc query Advanced


and analysis analysis
What is driving Given the rapid
the increase in increase in Web
North American sales, what will
sales? total sales be for
the rest of the
year?
Reports

What were sales by


region last quarter? Enterprise
reporting

Copyright Oracle Corporation, 2001. All rights reserved.

Integration of Business Intelligence Tools


Every enterprise has a spectrum of business intelligence requirements. Oracle business
intelligence tools provide support for business intelligence needs, such as ad hoc
query, reporting and charting, forecasting, and what-if analysis.
Oracle offers the following tools, which are interoperable, across the entire analytical
nly
O
spectrum:
Oracle Reports
se
U
Oracle Discoverer
Oracle Express
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
1-8 Oracle iDS: Discoverer for Administrators
Integration of Business Intelligence Tools
.....................................................................................................................................................

An Integrated Environment
for Business Intelligence

Seamless Interoperability/Migration
Operational Reports
data

Warehouse

Legacy Discoverer
data

Other data Express


Copyright Oracle Corporation, 2001. All rights reserved.

An Integrated Environment for Business Intelligence


A business intelligence solution requires access to all kinds of data describing an
enterprise and its customers. This data can be from OLTP systems; enterprise
applications such as finance, human resources, and manufacturing; legacy data; flat
files; and numerous other sources. Oracle provides a consistent, integrated
environment for all business intelligence tasks with easy-to-use yet sophisticated

ly
analytical tools.

On
se
I U
OA
l &
rna
nte
e I
cl
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 1-9
Lesson 1: Introduction to Discoverer 4.1 Administration
.....................................................................................................................................................

Business Intelligence Tools

Oracle Express
An advanced calculation engine and
multidimensional data cache for online analytical
processing (OLAP)
Oracle Discoverer
An ad hoc query, reporting, and analysis tool
Oracle Reports
A sophisticated enterprise production reporting
tool to build and distribute high-quality reports

Copyright Oracle Corporation, 2001. All rights reserved.

Business Intelligence Tools


Oracle Express is optimized for query and analysis of corporate data. The data is
stored in a multidimensional data cube, which is accessed by Express Server.
Oracle Reports provide an easy-to-use, scalable, and manageable solution for database
publishing and reporting across the enterprise. With a Web browser, users can view
reports that are dynamically generated by the application server reporting engine.
nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
1-10 Oracle iDS: Discoverer for Administrators
Discoverer 4.1 Components
.....................................................................................................................................................

Discoverer 4.1 Components

Discoverer 4.1 Components

Discoverer
Discoverer Discoverer
Administration
Plus (User edition) Viewer
Edition

End User Layer

Data warehouse, data mart,


or relational database

Copyright Oracle Corporation, 2001. All rights reserved.

Discoverer 4.1 Components


Administration Edition: Business and IT data administrators use this edition to
create, maintain, and administer data in the End User Layer and to define how
users interact with that data.
Discoverer Plus (formerly User Edition): Use this edition to perform ad hoc
queries and to generate reports and graphs. Reports saved in the database can be
nly
O
accessed through a Web browser.
Viewer Edition: Use this edition to view your data by using a Web browser.
se
U
End User Layer: This component is a server-based metalayer that hides the

I
complexity of the underlying database so that users can interact with the database
A
O
without having to know database commands. This allows the users to use the

&
business language they are familiar with.

al
n
About Databases A database is an organized collection of information. This

er
information can be anything relevant to your particular business requirements.
t
n
Information in a database is stored in a central server and accessed by many users.

e I
l
About Relational Databases The term relational refers to the structure of the
c
a
database. Information is stored in relations, which are also known as tables and have
r
O
columns and rows. Oracle has relational databases.
To access information stored in a relational database, you generally use a
programming language, such as structured query language (SQL). Discoverer 4.1
generates for you the SQL statement, which classifies Discoverer as an end-user tool.
End users are not exposed to SQL.

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 1-11
Lesson 1: Introduction to Discoverer 4.1 Administration
.....................................................................................................................................................

Discoverer 4.1 and Discoverer 4i

Discoverer 4.1 Discoverer 4i Plus and


Discoverer 4i Viewer
No additional
Discoverer Plus Web Client
database
administration
required!

Administration
Application Server
Edition

End User
Layer

Copyright Oracle Corporation, 2001. All rights reserved.

Discoverer 4.1 for Client/Server


Discoverer 4.1 for client/server has Discoverer Plus to create workbooks and
worksheets.

Discoverer 4i for the Web


Discoverer 4i has Discoverer Plus to create workbooks and worksheets and the Viewer
Edition to view workbooks created in Discoverer Plus.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
1-12 Oracle iDS: Discoverer for Administrators
Discoverer 4.1 Components
.....................................................................................................................................................

About the End User Layer

Stores metadata required by Discoverer


Consists of database tables and views owned by a
single user (the EUL owner)
Identifies EUL tables and view with an EUL prefix
Is controlled and accessed by the data
administrator

Copyright Oracle Corporation, 2001. All rights reserved.

End User Layer Database Tables


To insulate end users from the complexity and physical structure of the database,
Oracle Corporation developed the End User Layer (EUL). The EUL provides an
intuitive, business-focused view of the database that can be tailored to suit each user or
user group. This feature enables end users to focus on business issues instead of data
access issues. It helps them in producing queries by generating SQL and providing a

ly
rich set of defaults to aid report building.
The metalayer structure of the EUL preserves the databases data integrity. Whatever
the administrator or the end user does with Discoverer, it affects only the metadata in
On
the EUL and not the database.
se
U
The EUL is a collection of approximately 50 tables in the database. These are the only
I
A
tables that can be modified through the Discoverer Administration Edition. Business

Discoverer provides read-only access to the application database.


& O
areas are defined in the Administration Edition by using the EUL database tables.

al
You can have more than one set of EUL tables in any database by creating an EUL

rn
under different schemas.
e
Int
cle
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 1-13
Lesson 1: Introduction to Discoverer 4.1 Administration
.....................................................................................................................................................

Key Terminology

Key Terminology

Business areas
Folders
Items
Joins
Data types

Copyright Oracle Corporation, 2001. All rights reserved.

Business Areas
A business area is a set of folders containing information related by a common
business purpose. For example, information about sales and revenues might be stored
in one business area, and information about employees might be stored in another.

ly
Folders
Folders are similar to tables. For example, all details about employees of an
On
e
organization might be stored in one folder, and information about customers might be
stored in another. Folders map to database tables or views. Complex folders are like

Us
I
database views and provide a way of grouping items together from multiple folders.

Items
OA
l
Folders consist of items, which map to columns in a database table. Each item has a
&
rna
name and contains a specific type of information. For example, a folder containing
details about employees might include items such as employee name, start date, and

te
department. When you include an item in a query, it is usually displayed as a report
n
I
column. An item can also be calculated or derived, based on a formula using other

e
l
items, functions, or operators.

c
ra
O

.....................................................................................................................................................
1-14 Oracle iDS: Discoverer for Administrators
Key Terminology
.....................................................................................................................................................

Items (continued)

Data Type Description


CHARACTER Letters in uppercase, mixed case, and lowercase; numbers; and
symbols such as %
NUMBER Numbers, decimal point, and signs such as plus (+) and minus (-)
DATE Any valid date between January 1, 4712 B.C., and December 31,
9999 A.D.
LONG Up to 2 GB of text (display only)
BLOB Unstructured binary large objects (BLOBs can store up to 4 GB)

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 1-15
Lesson 1: Introduction to Discoverer 4.1 Administration
.....................................................................................................................................................

Role of the Data Administrator

Role of the Data Administrator

End User Layer

Employees
Hierarchies
Joins

Data dictionary
emp_data
emp_code
view_mgr

Database

Copyright Oracle Corporation, 2001. All rights reserved.

Discoverer Administrator
To be successful, every Discoverer installation requires a data administrator. As
administrator, you are responsible for maintaining the EUL and the conceptual view of
the database. The conceptual view helps the end user navigate through the data more
easily when performing queries. The EUL contains enhanced definitions of folders

ly
and their items, as well as the relationships among the folders and other constructs that
help users explore their data.
On
e
The data administrator should understand and anticipate user requirements, have
knowledge of the application database, and be able to set up the relational structure in
Us
I
the EUL to best display the application data.
The role of the Discoverer administrator includes the following tasks:
OA
&
Identifying user requirements

al
Selecting the database tables that best meet user requirements

rn
Assigning meaningful names for objects in the EUL

e
Int
Controlling user access to the EUL

e
Creating a usable relational structure in the EUL with joins and complex folders

cl
Creating conditions and drills for end-user data analysis

ra
Creating summary tables to improve performance

.....................................................................................................................................................
1-16 Oracle iDS: Discoverer for Administrators
Role of the Data Administrator
.....................................................................................................................................................

Implementing Discoverer

1. Identify user requirements.


2. Design business areas.
3. Select tables to load into the business areas.
4. Define folders and items.
5. Control user access.

Copyright Oracle Corporation, 2001. All rights reserved.

Implementing Discoverer
You can implement the Discoverer application simply by installing the Administration
Edition and loading a default EUL based on the tables that you want to query. The
EUL provides many facilities that you can configure that will increase the value of
using Discoverer. The success of an implementation largely depends on how closely
the structure of the EUL reflects users requirements for accessing information.

How to Perform a Minimal Implementation


nly
The minimum steps for successfully implementing Discoverer are:

e O
s
1 Understand your users requirements.

I U
2 Design business areas based on logical groupings of tables, and assign meaningful

A
names and descriptions to each business area.
3 Load objects into the EUL.

& O
l
4 Provide folder names, item names, and descriptions that are meaningful to your

n
end users.

r a
e
5 For each business area that you create, assign database users or roles to access

Int
them. These steps are discussed in detail in the next lesson.

cle
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 1-17
Lesson 1: Introduction to Discoverer 4.1 Administration
.....................................................................................................................................................

Defining User Requirements

What type of information would


users like to see?
How would they like the
information displayed?
Where can the information be
found?
What folders, items, and joins are
needed to access the information?
What are their performance
requirements?

Copyright Oracle Corporation, 2001. All rights reserved.

Defining End-User Requirements


You implement Discoverer as you would any other IT projectbeginning with
determining your user requirements. Without this step, implementation is a guessing
game and is unlikely to be successful. Answers to questions such as those shown in
this slide can help guide you in developing the EUL.
End-user requirements are dynamic and thus typically change over time. Although you

ly
can modify the business requirements at any time to support new requirements, it is
important to have a good idea of the business requirements of the users on which to
base future changes. Often the biggest changes are requested by users once a system is
On
implemented. When users see what Discoverer can do for them, they soon have
se
suggestions for other areas where it could be useful.
I U
A
Some guidelines for determining your end users requirements are as follows:

O
Interview key users to establish the kinds of queries that they want to perform.

&
l
Be prepared to do some relational design to work out the result sets needed.

na
Help users meet as many of their own requirements as possible by using the
r
e
Discoverer Plus. There may still be some standard reports that you need to create

nt
on their behalf. You can provide these in the form of public queries.
I
le
Remember that to have a successful system, you start with a simple

racimplementation and modify it over time based on user feedback, rather than
attempting to deliver an entire enterprise data warehouse in one single

O implementation.

.....................................................................................................................................................
1-18 Oracle iDS: Discoverer for Administrators
Role of the Data Administrator
.....................................................................................................................................................

Administering Discoverer

Define item classes


Define joins
Define optional and mandatory conditions
Define calculated items
Define complex folders and organize them into
business areas
Define custom folders
Define summaries and hierarchies

Copyright Oracle Corporation, 2001. All rights reserved.

Administering Discoverer

After you implement Discoverer, end users can build queries by using the EUL that
you created. However, the following functions will enhance the value of the EUL:

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 1-19
Lesson 1: Introduction to Discoverer 4.1 Administration
.....................................................................................................................................................

Administering Discoverer (continued)


Function Added Value
Calculations Create useful computations, based on items in folders, to show
more detailed information and relieve users of the task of
creating complex calculations.
Conditions Identify conditions that restrict the number of rows returned in a
folder. Determine whether these conditions should be mandatory
and hidden from users or optional and visible to users.
Item classes Use item classes to define a list of values (LOV), an alternative
sort for an item, or a method to associate items for a drill to detail
(hyperdrill).
New joins Determine what folders need to be combined and then define the
join conditions that are required (in addition to those created
when objects are loaded from the database).
Complex folders Define complex folders to completely hide joins and relational
structure from users. Have items copied from available simple
folders in the EUL.
Custom folders Define custom folders with SQL statements using the Discoverer
interface.
Hierarchies Create hierarchies to add structure to the data.
Summaries Create summaries or let Discoverer automate summary
management process to maximize query performance.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
1-20 Oracle iDS: Discoverer for Administrators
Role of the Data Administrator
.....................................................................................................................................................

Building a Robust Business Area


Create an EUL* Edit formatting properties

Create item classes


Load business area*

Create drills
Refine relational structure

Create conditions
Create summary tables
Create calculated items

Create joins Maintain the EUL


Create complex folders

Grant access*
* Mandatory

Copyright Oracle Corporation, 2001. All rights reserved.

Building Business Areas


The recommended procedures for building a robust business area are the following:
1 Load data into the business area. This step is mandatory and creates the first
folders and items.
2 Design the relational structure so that users can view their data in the most flexible
and understandable way. This will involve creating joins, combining folders into

ly
complex folders, and adding calculations and conditions. It is much like building a
set of views.

On
e
3 Edit names, descriptions, and other formatting information so that data is easily
understood.

Us
4 Create item classes in simple folders.
5 Create hierarchies to simplify drill-down operations.
AI
& O
6 Create summary tables or register existing summary tables so that queries will run
faster.
al
rn
7 Define optional conditions that provide shortcuts for users.

e
Int
8 Grant access to users or roles. This step is mandatory.

cle
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 1-21
Lesson 1: Introduction to Discoverer 4.1 Administration
.....................................................................................................................................................

Training Business Areas

Videocut Data Model


TIMES
TIME KEY
PRODUCTS
TRANSACTION DATE
PRODUCT KEY DAY OF WEEK
DESCRIPTION SALES FACTS HOLIDAY FLAG
FULL DESCRIPTION
TIME KEY
PRODUCT TYPE PRODUCT_KEY
BRAND STORE KEY
PRODUCT CATEGORY
SALES
AGE_CATEGORY UNIT SALES STORES
DEPARTMENT COST STORE KEY
CUSTOMER STORE NAME
COUNT CITY
PROFIT REGION
DAYS FLOOR PLAN TYPE
DAYS OF WEEK STORE SIZE
ALTERNATE SORT REPORTS

Copyright Oracle Corporation, 2001. All rights reserved.

Videocut Training Database


The Videocut training database is owned by the user Videocut and contains Video
Rental sales data by product and store for a large chain of stores in the United States.

Database Tables
The SALES_FACTS table contains numeric data on sales for all products sold.
SALES_FACTS is joined to STORES, which contains detailed information on each
nly
store. SALES_FACTS is also joined to TIMES, which contains the date of each sales
e O
transaction, and to PRODUCTS, which contains detailed information on each of the

Us
I
products sold. The DAYS table is used to order the DAY_OF_WEEK column in the
TIMES table.
Object Type Object Name Rows
OA
Table
l
PRODUCTS 141
&
Table

rna SALES_FACTS 34,297

e
Table STORES 12
Table
Int TIMES 547

e
Table DAYS 7

cl
ra
O

.....................................................................................................................................................
1-22 Oracle iDS: Discoverer for Administrators
Training Business Areas
.....................................................................................................................................................

Video Stores Business Area

Simple folders Complex folders

Sales facts Products


Video Analysis

Dates Stores
Store and Sales
Detail

Days

Copyright Oracle Corporation, 2001. All rights reserved.

Video Stores Business Area


In this course, you will create the Video Stores business area by using the data model
displayed in the preceding slide. Each folder is based on the following information.

Simple Folders
Sales Facts: Simple folder based on the SALES_FACTS table
Times: Simple folder based on the TIMES table
nly
Stores: Simple folder based on the STORES table

e O
s
Products: Simple folder based on the PRODUCTS table
Days: Simple folder based on the DAYS table.
I U
the TIMES folder. The folder will not be visible to users.
OA
This folder is used to define an alternative sort for the Day_of_ Week column in

l &
a
Complex Folders

rn
Video Analysis: Complex folder containing items from the Sales Facts, Times,
e
Int
Stores, and Products folders
Store and Sales Detail: Complex folder containing a predefined or custom

cle
selection of items from the Sales Facts, Times, Stores, and Products folders

ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 1-23
Lesson 1: Introduction to Discoverer 4.1 Administration
.....................................................................................................................................................

Human Resources Data Model

Human Resources Data Model


DEPT
DEPT ID EMP
NAME EMP ID
LOCATION LAST NAME
SEC LEVEL FIRST NAME
EMP HIST JOB
MGR
EMP ID
HIREDATE
LAST NAME
SALARY
FIRST NAME
TITLE COMM
HIREDATE DEPT ID
TERMDATE
SALARY SALGRADE
DEPT ID GRADE
LOSAL
SEC OBJECT
HISAL
SEC USER
SEC LEVEL

Copyright Oracle Corporation, 2001. All rights reserved.

Additional Business Area


In this course, you will create an additional business area from the standard human
resources DEPT-EMP data model. The SALGRADE table contains the range of salaries
by grade. The SEC_OBJECT table contains usernames and their security level.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
1-24 Oracle iDS: Discoverer for Administrators
Administrator HR Business Area
.....................................................................................................................................................

Administrator HR Business Area

Administrator HR Business Area

Salgrade
EUL-defined Emp
Salgrade>Emp join conditions

Emp1
Dept
Emp1>Emp
Sec_Dept (Sec Level)

Employment
Records
Calculated item using
registered PL/SQL function
Corporate
Employees

Copyright Oracle Corporation, 2001. All rights reserved.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 1-25
Lesson 1: Introduction to Discoverer 4.1 Administration
.....................................................................................................................................................

End-User HR Business Area


Corporate Employees Employment Records

Emp Id Emp Id
Last Name Last Name
First Name First Name
Job Job
Name Mgr
Location Hiredate
Manager Id Salary
Manager Comm
Eastern Offices Grade
Western Offices Hiredate YY
Hiredate QQ
Hiredate Mon
Security Condition

Optional conditions Mandatory condition


Copyright Oracle Corporation, 2001. All rights reserved.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
1-26 Oracle iDS: Discoverer for Administrators
Summary
.....................................................................................................................................................

Summary

Summary

In this course, you should have learned how to:


Implement and administer Discoverer
Create the End User Layer
Design the business area
Control user access to the End User Layer
Customize the End User Layer
Optimize query performance
Discuss configuration issues of Discoverer for
the Web

Copyright Oracle Corporation, 2001. All rights reserved.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 1-27
Lesson 1: Introduction to Discoverer 4.1 Administration
.....................................................................................................................................................

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
1-28 Oracle iDS: Discoverer for Administrators
2
.................................

Creating the End User


Layer and Business Areas

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O
Lesson 2: Creating the End User Layer and Business Areas
.....................................................................................................................................................

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
2-2 Oracle iDS: Discoverer for Administrators
Objectives
.....................................................................................................................................................

Objectives

Objectives

After completing this lesson, you should be able to


do the following:
Create the initial End User Layer
Design and create a business area
Select tables to load into a business area
Select bulk load options
Export and import business areas
Control user access to the business area

Copyright Oracle Corporation, 2001. All rights reserved.

Lesson Aim
The End User Layer contains the end-user view of the database. Its contents are used
to create business areas. This lesson outlines the minimal steps necessary to create the
EUL and control user access to it. You will also learn how to export and import
business areas.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 2-3
Lesson 2: Creating the End User Layer and Business Areas
.....................................................................................................................................................

Overview

Overview
Create an EUL* Edit formatting properties

Create item classes


Load business area*

Create drills
Refine relational structure

Create conditions
Create summary tables
Create calculated items

Create joins Maintain the EUL


Create complex folders

Grant access*
* Mandatory

Copyright Oracle Corporation, 2001. All rights reserved.

Overview
Before you can create a business area, you must have access to at least one EUL.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
2-4 Oracle iDS: Discoverer for Administrators
Creating an End User Layer
.....................................................................................................................................................

Creating an End User Layer

Connecting to Discoverer

Copyright Oracle Corporation, 2001. All rights reserved.

Connecting to Discoverer
Select the Administration Edition from Oracle Discoverer 4 Program Group in the
Start menu to start Discoverer Administration Edition.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 2-5
Lesson 2: Creating the End User Layer and Business Areas
.....................................................................................................................................................

Public and Private End User Layers

New
user

Adams

Blake Scott

EUL1 EUL2
(private) (public)

Database

Copyright Oracle Corporation, 2001. All rights reserved.

Public EULs
Each database can have one or more public EULs to which all users have access. Most
systems need only one public EUL. A single public EUL requires little database
administration or additional setup, and new users automatically have access to it.

Private EULs

ly
Each database can have one or more private EULs. Users can access a private EUL

n
only if they have been granted authority by the owner of the private EUL.
EULs can switch between private and public through privileges. You can change a
e O
s
private EUL to a public EUL by changing the privileges.

I U
OA
l &
rna
nte
e I
cl
ra
O

.....................................................................................................................................................
2-6 Oracle iDS: Discoverer for Administrators
Creating an End User Layer
.....................................................................................................................................................

Security in an EUL

An EUL is a collection of approximately 50


database tables.
An EUL is owned by a database user.
A user can be the owner of only one EUL at a time.

Copyright Oracle Corporation, 2001. All rights reserved.

Security in an EUL
The EUL owner maintains his or her EUL. The owner of the EUL can grant access to
other users so that they can either use or make changes to the EUL.
You can create an EUL for an existing user or a new user in the database. The owner
of the EUL must have the following database privileges:
Create Session
Create Table
nly
O
Create View
Create Sequence
se
Create Procedure
I U
A
Note: Additional privileges are required to set up summary management and batch
scheduling.

& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 2-7
Lesson 2: Creating the End User Layer and Business Areas
.....................................................................................................................................................

Creating the Initial EUL

Creating the Initial EUL

Copyright Oracle Corporation, 2001. All rights reserved.

Creating the Initial EUL


The first time you connect to the Administration Edition, Discoverer prompts you to
create an EUL. The steps for creating the initial EUL are as follows:
1 When prompted to create an EUL, click Yes. The EUL Manager dialog box is
displayed with the Create an EUL option selected.
2 Select Create an EUL in the EUL Manager dialog box. The Create EUL Manager
nly
O
dialog box is displayed.
.
se
I U
OA
l &
rna
nte
e I
cl
ra
O

.....................................................................................................................................................
2-8 Oracle iDS: Discoverer for Administrators
Creating the Initial EUL
.....................................................................................................................................................

Creating the Initial EUL

4
3

5
6

Copyright Oracle Corporation, 2001. All rights reserved.

Creating the Initial EUL (continued)


3 Click Finish in the Create EUL dialog box. If you select a different existing user,
then the password box will be enabled to enter the password associated with that
user.
4 Discoverer displays a message when the EUL is created. Click OK to dismiss the
message.

ly
5 After creating the EUL, Discoverer prompts you to install the tutorial data. You
can choose to install the tutorial now or at a later time.
On
e
6 As a final step, Discoverer prompts you to connect to the EUL that you just
created. You can click Yes to reconnect as the new EUL owner or you can click No
Us
I
to continue working in the current database connection.

OA
l &
rna
nte
e I
cl
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 2-9
Lesson 2: Creating the End User Layer and Business Areas
.....................................................................................................................................................

Discoverer in Application Mode

Connections in Application Mode

Copyright Oracle Corporation, 2001. All rights reserved.

Discoverer in Application Mode


Discoverer provides more tighter supports for Oracle Applications database. It
supports Applications security. Discoverer Applications users can build queries and
perform analysis against Applications data.
Discoverer in an Applications mode requires:
Creating and using an Applications mode EUL. This EUL has special features that
nly
O
provide support for Applications.
Running the Administration and Discoverer Plus in Applications mode. This can
se
U
be done either through command-line or Connect dialog box. You will need to
customize the Connect dialog box for Application users as follows:
AI
1 Select Tool>Options. The Option dialog box opens with the Connection tab
selected.
& O
al
2 Select any one of the following options:

rn
Connect to standard EULs: The Oracle Applications User check box is not
e
Int
displayed in the Connect dialog.

e
Connect to applications EULs: The Oracle Applications User check box is

cl
displayed in the Connect dialog box, and you will need to login using your

ra
Applications username/password and Oracle Applications database connect

O
string.
Connect to both standard and application EULs: The Oracle Applications User
check box is displayed in the Connect dialog box, and you can login both as
standard and Oracle Applications user.

.....................................................................................................................................................
2-10 Oracle iDS: Discoverer for Administrators
Discoverer in Application Mode
.....................................................................................................................................................

Discoverer in Application Mode (continued)


If you select Connect to applications EULs or Connect to both standard and
applications EULs, you need to enter details in
Gateway User ID (GWYUID)/Password: This records your Gateway User ID
and Password
Foundation Name (FNDNAM): This records your Foundation Name.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 2-11
Lesson 2: Creating the End User Layer and Business Areas
.....................................................................................................................................................

Creating an Applications Mode EUL

Need Applications mode EUL for:


Applications users cannot connect to standard
EULs.
Data access is controlled through Oracle
Applications security

Copyright Oracle Corporation, 2001. All rights reserved.

Creating an Applications Mode EUL


Applications users need to create an Applications mode EUL because:
Applications users cannot connect to standard EULs.
Data access is controlled through Oracle Applications responsibilities.
To create an Applications Mode EUL, follow the same steps as for a standard user,
except in the Create EUL Wizard dialog box select the New EUL is for use by Oracle
Applications users ONLY option.
nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
2-12 Oracle iDS: Discoverer for Administrators
Practice 2-1 Overview
.....................................................................................................................................................

Practice 2-1 Overview

Practice 2-1 Overview

This practice covers creating the initial EUL.

Copyright Oracle Corporation, 2001. All rights reserved.

Practice 2-1 Overview


In this practice, you create a private End User Layer.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 2-13
Lesson 2: Creating the End User Layer and Business Areas
.....................................................................................................................................................

Practice 2-1
1 Launch the Administration Edition by using the username and password and
database connect string provided by your instructor.
2 Create a new private EUL for user oraxxa (where xx is provided by the
instructor) on the database instance provided by your instructor.
Note: When prompted to create the tutorial, be sure to click No.
a The first time that you connect to Discoverer, you are prompted to create an
EUL. When prompted, click Yes to display the EUL Manager dialog box.
b Click Create an EUL to create a new EUL. The Create EUL dialog box is
displayed.
c Clear the Grant access to PUBLIC check box to create a private EUL.
d Clear the New EUL is for use by Oracle Applications users ONLY check
box, because you are creating a standard EUL.
e Click Finish.
f If prompted to install the tutorial, click No.
g When prompted to connect as the owner of the new EUL, click Yes.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
2-14 Oracle iDS: Discoverer for Administrators
Designing Business Areas
.....................................................................................................................................................

Designing Business Areas

Business Areas

A logical group of folders that share a common


business theme
Can contain folders that are unrelated
Can contain folders that represent the same table
or view (one with a different name)
Can be assigned to either a user or a role

Copyright Oracle Corporation, 2001. All rights reserved.

Business Areas
A business area is a logical set of folders. Business areas are used to group information
about a common subject togetherfor example, Sales Analysis, Human Resources, or
Stock Control. They are important from the point of view of the end user because they
are visible and provide the starting point for building a query.
Business areas are the unit of access control in Discoverer, although users can see
nly
O
folders in a business area only if they have database access to the tables referenced in

e
the folders. This database access check can actually be overridden by setting the
following registry entry:
Us
\\HKEY_CURRENT_USER\Software\Oracle\Discoverer\Database\

AI
O
ObjectsAlwaysAccessible

&
If set to 0, then the accessibility check is not done, which makes the display of the

l
folders in the Discoverer Plus faster. This is useful on systems where granting access
a
n
changes rarely. If a user selects a folder for which there is no database access, then an

er
error message is displayed when the query is run.
t
In
You should consider assigning a folder to a business area as temporary and

le
changeable. Folders are not owned by business areas and can appear in more than one

rac
business area. With multiple folders, there is one definition of the folder, which is
simply assigned to multiple business areas.

O
Folders can also be removed from business areas so that they are not associated with
any business area. However, these orphan folders are not accessible to anyone using
the Discoverer Plus.

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 2-15
Lesson 2: Creating the End User Layer and Business Areas
.....................................................................................................................................................

Folders

Simple folders Complex folders


Created from the Created in the work area
bulk Load Wizard Based on one or more
Represent a single existing folders
table or view Items map to items in
Items map to table source folders
columns

Copyright Oracle Corporation, 2001. All rights reserved.

Folders
Folders represent a result set of data, much like a database view. It is useful to think of
a folder as an SQL statement that returns the result set. In fact, the SQL is actually
stored in the EUL and is used in SQL generation. When designing folders, consider
what you want the result set to be.
Simple folders are created by loading a folder from the database and mapping it

ly
directly to a table or view. Items in simple folders represent columns or calculations on
other items in the folder.
Complex folders are folders that contain items from other folders (simple or complex).
On
Folders can be nested to any depth. Items in complex folders have formulas that
se
reference the items in the source folders. Because these items may themselves be
I U
A
calculations, there is a dependency hierarchy in the EUL, so that changing the formula
on one item may affect other items that use the formula.

& O
l
If complex folders combine multiple folders, the folders must be joined. Complex

rna
folders can represent several joined folders.

e
Whether a folder is complex or simple makes no visible difference to the end user.

nt
Even in the Administration Edition, there is very little difference in the behavior of the

I
two types of folders. In fact, they can both use calculations, joins, conditions,

le
summaries, and hierarchies.
c
ra
O

.....................................................................................................................................................
2-16 Oracle iDS: Discoverer for Administrators
Designing Business Areas
.....................................................................................................................................................

Loading Metadata into the EUL

Metadata in End User Layer


Tables Folders Business Areas
SCOTT.EMP EMP
EMPNO Empno
ENAME Ename
JOB Job
SAL Sal
DEPTNO Deptno

SCOTT.DEPT DEPT
DEPTNO Deptno
DNAME Dname
LOC Loc

Copyright Oracle Corporation, 2001. All rights reserved.

Loading Data into the EUL


When you load data into the EUL, it is automatically populated with some basic
information. Depending on the options that you have selected, it will contain at least
one business area, folders, items, and joins. At this stage, the EUL does not contain
any more useful information than was in the server dictionary, but this is a starting
point from which definitions can be customized.

ly
The process that Discoverer uses to define metadata is an incremental bottom-up

easy to use and reflects the end-user requirements. Metadata should be modified as
On
approach, starting with the table definitions and then refining the metadata so that it is

user feedback is received.


se
Note: The EUL contains metadata and not actual data. There are no copies of tables,
I U
A
only copies of the definitions of tables.

& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 2-17
Lesson 2: Creating the End User Layer and Business Areas
.....................................................................................................................................................

Designing a Business Area

Tables Folders Business Areas

EMP EMP Human Resources


EMPNO Empno Employee
ENAME Ename Department
JOB Job Benefits
SAL Sal Profit sharing
DEPTNO Deptno Vacation

DEPT DEPT Finance


DEPTNO Deptno Budget
DNAME Dname Department
LOC Loc Resources
Legal

Copyright Oracle Corporation, 2001. All rights reserved.

Designing a Business Area


A business area is a logical grouping of folders, representing tables or views or both.
The structure of the objects in a business area is hidden from the end user. As
administrator, you are responsible for selecting the tables and views to include in the
business area and for deciding how these tables and views are best presented in folders

ly
that have meaning for the end user.

Identifying the Tables Required


On
To create a new business area, you start by identifying the set of tables that you want
se
your end users to have access to in the Discoverer Plus. There are a variety of ways of
I U
A
doing this in the Load Wizard.
As administrator, you should know the application database well enough to be able to

& O
identify which tables are required. It is probably wise not to select all the tables,

al
because this might confuse end users by presenting them with too many choices.

rn
Instead, you should select the set of tables that satisfies the requirements of most users.

e
Int
By sharing folders among business areas, administrators can set up multiple business
areas at different levels of detail. For example:

cle
Sales Analysis: 1 folder

ra
Sales Details: 6 folders

O
Sales Transaction: 30 folders

.....................................................................................................................................................
2-18 Oracle iDS: Discoverer for Administrators
Designing Business Areas
.....................................................................................................................................................

Assigning Folders to a Business Area

Metadata in End User Layer


Tables Folders Business Areas
SCOTT.EMP EMP Human Resources
EMPNO Empno EMP
ENAME Ename DEPT
JOB Job Benefits
SAL Sal Profit sharing
DEPTNO Deptno Vacation

SCOTT.DEPT DEPT
DEPTNO Deptno
DNAME Dname
LOC Loc

Copyright Oracle Corporation, 2001. All rights reserved.

Assigning Folders to Business Areas


Because a folder cannot be used unless it has been assigned to a business area,
Discoverer adds all newly loaded folders into the business area being created, and the
administrative user who is performing the load is automatically granted access to that
newly created business area.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 2-19
Lesson 2: Creating the End User Layer and Business Areas
.....................................................................................................................................................

Customizing a Business Area

Metadata in End User Layer


Folders Business Areas
Tables Employees
SCOTT.EMP EmpNo Human Resources
EMPNO Emp Name Employees
ENAME Job Departments
JOB Salary Benefits
SAL DeptNo Profit sharing
DEPTNO Vacation

SCOTT.DEPT Departments
DEPTNO DeptId
DNAME Dept Name
LOC Location

Copyright Oracle Corporation, 2001. All rights reserved.

Renaming Folders and Items


Database tables and column names that are meaningful to the database developer are
often confusing to the end user. For example, although a database developer may use
column prefixes or technical terms to uniquely identify columns, these names can be
confusing to users.

ly
As administrator, one of your main tasks is to provide meaningful names for folders
and items in a business area. You can do this at any time based on user feedback, but it
is better to present the data in the most meaningful way as early as possible so that end
On
users do not have to deal with changing terminology.
se
I
Folders and items are identified in the EUL by unique identifiers, so that changing the
U
name of an item in Discoverer has no effect on any other aspect of the item. The

O
customization is maintained even if you migrate the buisness area to a different EUL.A
l &
rna
nte
e I
cl
ra
O

.....................................................................................................................................................
2-20 Oracle iDS: Discoverer for Administrators
Designing Business Areas
.....................................................................................................................................................

Adding Folders to Other Business Areas

Metadata in End User Layer


Folders Business Areas

Employees
Human Resources
EmpNo
Emp Name Employees
Job Departments
Salary Benefits
DeptNo Profit sharing
Vacation

Finance
Departments Budget
DeptId Departments
Dept Name Resources
Location Legal

Copyright Oracle Corporation, 2001. All rights reserved.

Adding Folders to Other Business Areas


After a folder has been loaded into a business area, it can be:
Assigned to a new business area
Removed from a business area
Assigned to multiple business areas

nly
Often organizations identify core data, such as a list of employees or products, that is
commonly used in many applications and therefore appears in more than one business
area.
e O
Us
Note: Only one copy of the folder definition exists in the EUL and it is shared by all

AI
the business areas in which it appears. When you modify the folder definition, those

O
changes are automatically reflected in all the business areas in which that folder exists.

l &
rna
nte
e I
cl
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 2-21
Lesson 2: Creating the End User Layer and Business Areas
.....................................................................................................................................................

Creating Business Areas

Creating a New Business Area


by Using the Load Wizard

Copyright Oracle Corporation, 2001. All rights reserved.

Creating a New Business Area by Using the Load Wizard


After you log in to the Administration Edition and create the initial EUL, Discoverer
automatically launches the Load Wizard. You use the Load Wizard to open an existing
business area or to create a new business area.

ly
Invoking the Load Wizard
You can invoke the Load Wizard to create a new business area in several ways:
On
e
Click Create Business Areas on the Administration Tasklist dialog box.
Select File>New from the menu bar if no business areas are currently loaded.
Us
Select the New Business Area icon on the toolbar.
AI
Select Insert>Business Area>From Database. To use this menu option, you
must have a business area already opened.
& O
al
Select New Business Area from Database from the right mouse menu in the
Data tab.
ern
nt
Select Insert>Business Area>New from the menu bar.

I
e
Select New Business Area from the right mouse menu in the Data tab.

cl
ra
Opening an Existing Business Area

O
To open an existing business area, select File>Open from the menu bar.

.....................................................................................................................................................
2-22 Oracle iDS: Discoverer for Administrators
Creating Business Areas
.....................................................................................................................................................

Creating a Business Area


by Using the Load Wizard: Step 1

Copyright Oracle Corporation, 2001. All rights reserved.

Creating a Business Area by Using the Load Wizard: Step 1


When you choose to create a new business area, the Load Wizard prompts you to load
tables and views from either the online dictionary or the gateway.

Loading from the Online Dictionary This option allows you to load tables and
views from the standard Oracle dictionary to which the owner has SELECT privileges.
A business area can contain tables from more than one schema.

nly
O
Loading from the EUL Gateway Lists the gateways for other metadata registered

e
with the EUL. The gateway provides a mechanism for populating the EUL with
metadata from the Designer Repository or from other metadata sources. You can use
Us
I
the gateway to access data from other sources:
Data warehouse, and extraction, transformation, and transfer (ETT) tools
OA
&
Conversion kits for query tools such as Business Objects

al
ern
Int
cle
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 2-23
Lesson 2: Creating the End User Layer and Business Areas
.....................................................................................................................................................

Creating a Business Area


by Using the Load Wizard: Step 2

Copyright Oracle Corporation, 2001. All rights reserved.

Creating a Business Area by Using the Load Wizard: Step 2

Selecting the Database Link The database name in the text box is the default
database for the current username. You can change the database link by selecting
another from the drop-down list, which lists the databases that apply to the current
connection.
You can have access to multiple databases through DBLink. DBLink sets up a
connection from one database to another. If you have access to other databases
nly
O
through DBLink, the name will appear in the list. DBlinks in case of Oracle databases,
are created by your database administrator.
se
Selecting Users to Load The next step in loading the metadata into the EUL is to
I U
select the owners of the tables and views that you want to load. You can click Select
All to select all the users or click Clear All to select users individually.
OA
l &
rna
Selecting the Type of Tables and Views to Load
To select the type of tables and views that you want to load, click Options to display

te
the On-Line Dictionary Options dialog box. The dialog box options are described as
n
follows:
e I
cl
Tables owned by user: Loads all or a subset of database objects belonging to the

ra
selected user.

O
Tables accessible by user: Loads all or a subset of database objects to which the
selected user has been granted SELECT access.
Public tables: Selects tables and views in the selected users schema to which the
user has been granted public access.

.....................................................................................................................................................
2-24 Oracle iDS: Discoverer for Administrators
Creating Business Areas
.....................................................................................................................................................

Selecting the Type of Tables and Views to Load (continued)


Partially restricted tables: Selects tables and views in the selected users schema to
which the user has been granted some access by another user. It displays a list of
partial access objects that are either owned by the selected user or to which the
selected user has been given explicit SELECT access.
Private tables: Selects tables and views in the selected users schema that are not
accessible by any other user. This option produces the same list for tables owned
(or accessible) by a user.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 2-25
Lesson 2: Creating the End User Layer and Business Areas
.....................................................................................................................................................

Identifying Objects to Load

Bobs schema Bettys schema

Table A
Private Table F
Table B
Table G
Public Table C
Table H

Table D Table I
Partial
Table E Table J Database

Betty has SELECT Bob has SELECT


privilege privilege

Copyright Oracle Corporation, 2001. All rights reserved.

Example of Private, Public, and Partial Access Tables


In this example, Bob owns tables A through E. He has granted access to table C to
PUBLIC, access to table D to Betty, and access to table E to another user. Betty owns
tables F through J and has granted access to table I to PUBLIC and access to table J to
Bob. The tables that will be imported using each type of filter are described below:
Tables owned by user: Bob Tables owned by user: Betty

ly
Public tables: C Public tables: I
Partially restricted tables: D, E Partially restricted tables: J
On
Private tables: A, B Private tables: F, G, H
se
U
Tables accessible by user: Bob Tables accessible by user: Betty
Public tables: C, I Public tables: C, I
AI
Partially restricted tables: J, D, E Partially restricted tables: D,E, J

& O
l
Private tables: A, B Private tables: F, G, H

rna
nte
e I
cl
ra
O

.....................................................................................................................................................
2-26 Oracle iDS: Discoverer for Administrators
Creating Business Areas
.....................................................................................................................................................

Creating a Business Area


by Using the Load Wizard: Step 3

Copyright Oracle Corporation, 2001. All rights reserved.

Creating a Business Area by Using the Load Wizard: Step 3

Selecting the Tables and Views to Load After you select the users and search
criteria, a list of available database tables and views is displayed in the third step of the
Load Wizard. There are several methods for selecting tables and views for loading:
Select the objects to be loaded in the Available box and click the move (>) button
to move the objects to the Selected box.
Drag an object from the Available box to the Selected box.
nly
Double-click an object in the Available box to move it automatically to the
e O
s
Selected box.

I U
Note: For tables and views to appear in the list of tables and views, you must have one

A
of the following:
SELECT access on the tables and views in the underlying database

& O
l
DBA privileges

na
SELECT ANY TABLE privilege
r
.

nte
e I
cl
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 2-27
Lesson 2: Creating the End User Layer and Business Areas
.....................................................................................................................................................

Creating a Business Area


by Using the Load Wizard: Step 4

Copyright Oracle Corporation, 2001. All rights reserved.

Creating a Business Area by Using the Load Wizard: Step 4


In the fourth step of the Load Wizard, you can select additional parameters to
customize the data load. These load parameters are described below:
Parameter Added Value
Naming folders and items Specifies options for renaming folders and items before they
are loaded into the business area from the database. Options

ly
include capitalizing names, replacing underscore characters

n
O
with spaces, and removing all column prefixes.

e
Creating joins Provides options for creating joins. Selecting the Primary/

s
foreign key constraints option retains the data model from the

U
I
database. Selecting the Matching column names option

A
creates joins between two tables with identical column names.
Generating summaries
O
Provides option to let Discoverer generate summaries after the

&
load process. Selecting this option will slow down the Bulk

al Load process, but improve the performance of the queries.


Generating date

ern Provides options to generate date hierarchies by using the

t
hierarchies, default default date hierarchy, to generate lists of values for selected

In
aggregate on data point, types of items (except data points and dates), and to specify the

le
and list of values for default aggregate type for data points. LOVs are created from

c
items of type the values in the associated database column and are generated

ra at run time.

.....................................................................................................................................................
2-28 Oracle iDS: Discoverer for Administrators
Creating Business Areas
.....................................................................................................................................................

Creating a Business Area


by Using the Load Wizard: Step 5

Copyright Oracle Corporation, 2001. All rights reserved.

Creating a Business Area by Using the Load Wizard: Step 5

Naming the Business Area In the fifth step of the Load Wizard, you provide a
meaningful name for the business area and optionally add a description of it. This
name is used throughout Discoverer Plus to identify the business area to the end user.
Click Finish to begin loading the metadata into the business area
Note: Character items are loaded as axis items; integers (numbers with no precision)
are loaded as axis items; number items with precision are loaded as data points or
nly
O
measures and have a default aggregate applied according to the selection made by the
administrator.
se
I U
OA
l &
rna
nte
e I
cl
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 2-29
Lesson 2: Creating the End User Layer and Business Areas
.....................................................................................................................................................

Using the Work Area

Work area tabs

Business area

Folder

Axis item

Data point
item

Join

Copyright Oracle Corporation, 2001. All rights reserved.

Using the Work Area


The final step of the Load Wizard creates the business area and displays it in the work
area. This area is your view into the EUL. You use the work area to view, edit, and
maintain each business area in the EUL.

Work Area Tabs The work area contains four tabs, which are described as follows:

ly
Data: Defines the relational structure, including business areas, folders, items,

n
conditions, calculations, and joins
Hierarchies: Defines items and date hierarchies for items in the current business
e O
s
areas
Item Classes: Defines lists of values, alternative sorts, and drill-to-detail links
I U
Summaries: Lists the summary folders and summary tables used in the current
business areas
OA
l &
rna
nte
e I
cl
ra
O

.....................................................................................................................................................
2-30 Oracle iDS: Discoverer for Administrators
Creating Business Areas
.....................................................................................................................................................

Navigating the Work Area

Copyright Oracle Corporation, 2001. All rights reserved.

Navigating the Work Area


You can open more than one business area at the same time. This feature is useful
for viewing information across multiple business areas and for moving folders
between business areas.
You can open multiple work area windows and operate on them at the same time.
This feature is useful for copying items between business areas. To open multiple

ly
windows, select Windows>New Window.
You can select multiple items and make the same change on them in one operation.
For example, you can select all the primary key items and set the Visible property
On
to No to make them invisible to the end user. You can select multiple items using
se
the [Ctrl] key.
I U
OA
l &
rna
nte
e I
cl
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 2-31
Lesson 2: Creating the End User Layer and Business Areas
.....................................................................................................................................................

Administration Tasklist

Copyright Oracle Corporation, 2001. All rights reserved.

Administration Tasklist
You can use the Administration Tasklist as a checklist for performing administrative
tasks. Double-click an icon in the tasklist to invoke the appropriate wizard or to open
the appropriate window.

Invoking the Administration Tasklist When you first start the Administration
Edition, Discoverer automatically displays the Administration Tasklist dialog box. To
close the Administration Tasklist window, click Close. To reopen the tasklist after it
nly
O
has been closed, select Tasklist from the View menu.

Controlling the Display of the Administration Tasklist If you want the


se
Administration Tasklist to appear every time you start the Administration Edition,
I U
do not want the tasklist to appear, clear the check box.
OA
select the Show this tasklist at startup check box at the bottom of the window. If you

l &
rna
nte
e I
cl
ra
O

.....................................................................................................................................................
2-32 Oracle iDS: Discoverer for Administrators
Bulk Load Defaults
.....................................................................................................................................................

Bulk Load Defaults

Bulk Load Defaults

Items created as axis items


Character, date, and integer
columns
Items created as data points
Numbers with nonzero
precision
Default aggregate of SUM
Joins loaded from constraints,
if selected or matching columns

Copyright Oracle Corporation, 2001. All rights reserved.

Bulk Load Defaults


By default, items that have a NUMBER data type and a nonzero precision are created as
data points. Integer, key, and other data types are loaded as axis items, with a default
position of Top. Axis items and data points have the following characteristics:
Data points are created with a default aggregate of SUM, unless otherwise
specified.
nly
O
Data points are displayed with easy-to-select aggregate functions. This enables
you to create a calculation if you want to aggregate an axis item.
se
U
Axis items can have lists of values, which are visible in Discoverer Plus. Data
points do not have visible lists of values.
AI
the item is an axis item or a data point.
& O
The default placement of an item on cross-tab reports varies depending on whether

al
ern
Int
cle
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 2-33
Lesson 2: Creating the End User Layer and Business Areas
.....................................................................................................................................................

Bulk Load Defaults

Number formats are based in


scale and precision.
Additional items are created
in the folder when a date
hierarchy is selected.
LOVs are created on all axis
items, except items longer than
240 characters.

Copyright Oracle Corporation, 2001. All rights reserved.

Generating LOVs Automatically


In the Load Wizard, you can select the option to generate lists of values automatically.
LOVs are derived from the values in the associated database column. Discoverer will
create LOVs for each axis item in the folder that is less than 240 characters. This 240-
character limit is defined in the following registry setting, which you can change:
HKEY_CURRENT_USER\Software\Oracle\Discoverer4\Database\

ly
DefaultDomainMaxColLength

Specifying a Date Hierarchy


On
In the Load Wizard, you can select the option to create hierarchies for date items. You
se
can select the default date hierarchy or select an alternative date hierarchy, if one is
I U
A
defined. This hierarchy is applied to all date items. The default date hierarchy is

O
supplied with Discoverer and enables users to drill through date items from years to

&
quarters, to months, to days.

al
The effect of selecting the date hierarchies option when doing a bulk load is:

rn
Additional (calculated) items are inserted into the folder. An extra item is added
e
Int
for every date item, for every node in the date hierarchy. For example, a date
hierarchy of Year, Quarter, Month, and Day applied to a table with three date

le
columns generates 12 extra items in the folder.

c
a
An date hierarchy is created that allows the end user to easily drill through the
r
O
hierarchy
Note: Date and item hierarchies are discussed in detail later.

.....................................................................................................................................................
2-34 Oracle iDS: Discoverer for Administrators
Object Property
.....................................................................................................................................................

Object Property

Object Property

Copyright Oracle Corporation, 2001. All rights reserved.

Object Property
Every item in the EUL has a set of properties associated with it. Item properties can be
viewed by clicking the item icon. Some of the properties can be updated in the
property dialog box. Items can be uniquely identified by unique identifiers.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 2-35
Lesson 2: Creating the End User Layer and Business Areas
.....................................................................................................................................................

Exporting and Importing

Exporting and Importing

Fine granular export


Import as refresh
Import from multiple files

Copyright Oracle Corporation, 2001. All rights reserved.

Exporting and Importing

Fine Granular Export Exporting and importing has been greatly enhanced in
Discoverer 4.1. In earlier versions you could only export a business area, but now you
can export the following items individually or together, using the command line

ly
syntax:
Business areas

On
e
Folders
Items
Us
Items classes
AI
O
Hierarchies
PL/SQL function definition
l &
Summaries

rna
e
Workbooks
ASM policies
Int
cle
Import as Refresh In this case EUL items are updated or created based on the

ra
imported files.

O
Import Multiple Files
business areas.
You can import multiple files to create or update your

.....................................................................................................................................................
2-36 Oracle iDS: Discoverer for Administrators
Exporting and Importing
.....................................................................................................................................................

Exporting a Business Area

Exported metadata Not exported


Folder and item Database
properties EUL tables
Hierarchies and item Database objects
classes referenced by the
Summary definitions business area
Access privileges definitions
Workbooks Scheduled workbook
result tables

Copyright Oracle Corporation, 2001. All rights reserved.

Exporting a Business Area


When you export a business area, Discoverer exports the definitions for the business
area but not the database, EUL tables, or database objects referenced by the business
area definitions.
Use the Export feature to back up definitions of a business area before making large-
scale changes or before moving a business area to another machine.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 2-37
Lesson 2: Creating the End User Layer and Business Areas
.....................................................................................................................................................

Exporting a Business Area

3 4

Copyright Oracle Corporation, 2001. All rights reserved.

Exporting a Business Area


To export a business area, follow these steps:
1 Select the business area to be exported.
2 Select Export from the right mouse menu or select File>Export from the menu
bar. The Save As dialog box is displayed.
3 Enter a name for the export file and select a location of the business area.
4 Click Save to proceed with the export.
nly
Business area export files are created with the extension .eex (End User Layer
Export). These are XML files that can be edited.
e O
Us
Exporting Multiple Business Areas

AI
O
To export multiple business areas to a single file, select the business areas that you

&
want to export while holding down the [Ctrl] key, and then select File>Export from
the menu bar.
al
ern
Int
cle
ra
O

.....................................................................................................................................................
2-38 Oracle iDS: Discoverer for Administrators
Exporting and Importing
.....................................................................................................................................................

Importing a Business Area: Step 1

2
4

Copyright Oracle Corporation, 2001. All rights reserved.

Importing a Business Area: Step 1


Following are the steps to select the file to import:
1 Select File>Import from the menu bar, or select Import from the right-mouse
menu. The Import Wizard: Step 1 dialog box is displayed.
2 Click the Add button. The Open dialog box is displayed.

ly
3 Select the file to import.
4 Click Next and select the desired import option.

On
e
Note: When you import a business area file, Discoverer imports only the business

s
definitions; it does not import the database, EUL tables, or database objects referenced
U
I
by the business area definitions.

OA
l &
rna
nte
e I
cl
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 2-39
Lesson 2: Creating the End User Layer and Business Areas
.....................................................................................................................................................

Importing a Business Area: Step 2

Copyright Oracle Corporation, 2001. All rights reserved.

Importing a Business Area: Step 2

Selecting an Import Option You can select one of the following import options:
Rename the imported object (default): If the incoming object names conflict with
existing names, a suffix is added to the incoming object.
Rename the existing object: If the incoming object names conflict, a suffix is
added to the existing object.
nly
O
Do not import the matching object: If the incoming objects already exist in the
EUL, Discoverer does not import the incoming object.
se
U
Refresh the object: The incoming object avoids the creation of a new item. You can
update or create an EUL object based on the contents of an .eex file. It is similar
AI
O
to Refresh from the database, except that the source for the refresh is an .eex file

&
and not the data dictionary. While refreshing you can choose to maintain any

l
customization done on the item.
a
ern
Matching Objects During an import it is important to match the incoming object

nt
with the correct target EUL object. Objects can be matched by their Identifier or
I
e
Display Name. By default they are matched by Identifiers.

cl
ra
O

.....................................................................................................................................................
2-40 Oracle iDS: Discoverer for Administrators
Exporting and Importing
.....................................................................................................................................................

Importing a Business Area: Step 3

Copyright Oracle Corporation, 2001. All rights reserved.

Importing a Business Area: Step 3


To start the actual import process do the following:
1 Click Start. Additional information about the import is displayed in the Log dialog
area.
2 View the log for any import errors. When satisfied, click Finish.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 2-41
Lesson 2: Creating the End User Layer and Business Areas
.....................................................................................................................................................

Adding Multiple Files

Copyright Oracle Corporation, 2001. All rights reserved.

Importing Multiple Files


You can now import EUL objects from multiple files. This is to support the granular
export, where you can export different objects in the EUL as separate files. This is
especially important when EUL objects are used across different business areas. You
can also import workbooks.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
2-42 Oracle iDS: Discoverer for Administrators
Practice 2-2 Overview
.....................................................................................................................................................

Practice 2-2 Overview

Practice 2-2 Overview

This practice covers the following topics:


Creating new business areas
Loading data into the business areas
Exporting and importing business areas

Copyright Oracle Corporation, 2001. All rights reserved.

Practice 2-2 Overview


In this practice, you will create two business areas and load data into the business
areas. Additionally, you will export a business area and import from multiple files.
Note:

ly
To import the solution file, you should do the following:

n
1 Select File>Import.
2 Click Add.

e O
3 Select the relevant practice .eex file from the Open dialog box and click Open.

Us
4 Click Next.
5 Select Refresh the object option.
AI
6 Click Next.
& O
al
7 Click Start. If no error, click Finish.

rn
8 Select Tools>Security and grant access to your oraxxb. Revoke access to any

e
Int
other users.
9 Check registered PL/SQL functions. Select Tools>Register PL/SQL functions

cle
and delete any unwanted functions.

ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 2-43
Lesson 2: Creating the End User Layer and Business Areas
.....................................................................................................................................................

Practice 2-2
1 Use the Load Wizard to create a new business area with data from the online
dictionary.
a Select Insert>Business Area>from Database to invoke the Load Wizard.
b Load the SALES_FACTS, TIMES, STORES, PRODUCTS, and DAYS tables
owned by the VIDEOCUT user.
c Accept the default renaming options, use the primary and foreign key
definitions to create join definitions, accept the default date hierarchy, and
accept SUM as the default aggregate type. Create LOVs automatically for items
of all types, except Decimal and Integer. Make sure you do not check
Automatically generate: Summaries based on folders that are created.
d Specify Video Stores as the name of the business area and add a description, if
desired.
2 Create a second business area with data from the online dictionary.
a Select Insert>Business Area>from Database to invoke the Load Wizard.
b Load the EMP, EMP_HIST, and SEC_OBJECT tables owned by the
VIDEOCUT user.
c Accept the default renaming options, use the primary and foreign key
definitions for join definitions, accept the default date hierarchy, and accept
SUM as the default aggregate type. Make sure you do not check
Automatically generate: Summaries based on folders that are created
and do not create LOVs automatically.
d Specify Human Resources as the name of the business area and add a

ly
description, if desired.
3 Expand the Video Stores business area in the work area and view the default item
On
e
names and lists of values.
4 Collapse the Video Stores business area in the work area and expand the Human
Us
Resources business area. View the default item names. How many folders are
there in Human Resources?
AI
5 In the Administration Edition, export the Human Resources business area as
& O
HR.EEX.
al
rn
6 Import the Human Resources business area from HR.EEX file and the Salgrade

e
t
folder from SALGRADE.EEX. Do not load objects that already match from

In
HR.EEX file. Place the Salgrade folder under the Human Resources business area.

le
How many folders are there now under Human Recourses?

c
ra
O

.....................................................................................................................................................
2-44 Oracle iDS: Discoverer for Administrators
Providing Security to Business Areas
.....................................................................................................................................................

Providing Security to Business Areas

Providing Security to Business Areas

Copyright Oracle Corporation, 2001. All rights reserved.

Access To Business Areas


To enable the end user to access information in a folder, you must grant access to the
business area containing the folder by using the Security dialog box. To access the
Security dialog box, click the Security toolbar icon, select Tools>Security, or select
Security from the Administration Tasklist.
As Discoverer administrator, you can select a business area and then grant access to
nly
O
one or more users or roles, or you can select a user or role and then grant access to one

e
or more business areas.
Note: Users cannot view a folder unless they have been granted SELECT access on
Us
PL/SQL functions used in the folder.
AI
the underlying tables used in the folder and have been granted EXECUTE access to any

& O
You can grant a business area to all users who have access to the EUL in a single step

l
by granting access to the user PUBLIC (PUBLIC is not a database user ID).
a
ern
Int
cle
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 2-45
Lesson 2: Creating the End User Layer and Business Areas
.....................................................................................................................................................

EUL Administration Privileges

Manage business
areas:
Create
Edit
Format
Set privileges
Manage scheduled
workbooks

Copyright Oracle Corporation, 2001. All rights reserved.

Administration Edition EUL Privileges


The Administration Edition privileges are the following:
Administration: Launch the Administration Edition. Other administrative
functions that users can perform will depend on what privileges they have been
granted. If no other privileges are granted, a user can perform only limited
functions, such as registering PL/SQL functions.

ly
Format Business Area: Customize the business area, its folders, items, joins, and
so on.
On
e
Create/Edit Business Area: Create and edit new business areas, folders, joins,
calculations, conditions, hierarchies, and item classes. Users can also import
Us
I
business areas.
Create Summaries: Create summaries. Without this privilege, the Summary
Wizard and edit dialogs are unavailable. Users must also have resource privileges
OA
l
in the database in order to create summary tables.
&
na
Set Privilege: Grant or revoke EUL privileges. Granting this privilege to a user
r
e
gives that user full access to the Administration Edition. Any user granted this

nt
privilege can, in turn, grant administration privileges on a business area to another
I
e
user, so that administration can be shared. Although a business area can be

cl
administered by multiple users, you should have one administrator for each

ra
business area to make control easier.

O
Manage Scheduled Workbooks: Maintain scheduled workbooks.
The owner of an EUL is automatically granted every privilege. These privileges
cannot be revoked. The EUL owner is a superuser.

.....................................................................................................................................................
2-46 Oracle iDS: Discoverer for Administrators
Providing Security to Business Areas
.....................................................................................................................................................

EUL User Privileges

Queries
Create and edit
Collect statistics
Workbooks
Create
Grant access
Schedule
Save to database
Use item drills
Drill out

Copyright Oracle Corporation, 2001. All rights reserved.

Discoverer Plus EUL Privileges


You can grant specific EUL privileges to individual users or roles. To display the
Privileges dialog box, select Tools>Privileges. The Discoverer Plus privileges are
the following:
Discoverer Plus: Launch Discoverer Plus and run saved queries.
Create/Edit Query: Create queries, edit saved queries, and import queries. Without

ly
this privilege, users can run only prebuilt workbooks.
Collect Query Statistics: Collect query statistics to determine which summary
On
e
tables will improve performance.

Us
Item Drill: Drill up or down or drill to an associated item. Without this privilege,
all drill options except Drill Out are disabled.

AI
O
Drill Out: Drill out to another application.

&
Grant Workbook: Share workbooks saved to the database in the Discoverer Plus.

al
Schedule Workbooks: Create and edit scheduled workbooks.

rn
Save Workbooks to Database: Save workbooks to the database. Otherwise, users
e
Int
can save workbooks only in their file system.

cle
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 2-47
Lesson 2: Creating the End User Layer and Business Areas
.....................................................................................................................................................

Governing Queries

Copyright Oracle Corporation, 2001. All rights reserved.

Governing Queries
The Query Governor tab in the Privileges dialog box enables you to set limits on the
queries performed by end users. You can set limits for a particular user or for a
particular role.

Query Governor Tab Components

ly
The Query Governor tab components are described as follows:
Show query limits for: Indicates whether the limits are for a user or for a role or
both.
On
Warn user if predicted time exceeds: Displays a warning message to the end user if
se
the predicted query time exceeds the time specified in minutes and seconds. This
I U
A
limit cannot be superseded by the end user.
Prevent queries from running longer than: Cancels queries if they run longer than

& O
l
the time specified in minutes and seconds. This limit cannot be superseded by the
end user.

rna
e
Limit retrieved data to: Indicates the maximum number of rows that can be

nt
retrieved by a query. This limit cannot be overridden by the end user.
I
e
Note: Managing scheduled workbooks will be covered in detail later in Lesson 9,

cl
Managing Batch Scheduling.

ra
O

.....................................................................................................................................................
2-48 Oracle iDS: Discoverer for Administrators
Providing Security to Business Areas
.....................................................................................................................................................

Data-Access Requirements
for Administrators

SELECT privilege on all tables that will be included


in the business area
CREATE PROCEDURE, TABLE, VIEW, and SESSION
privileges and enough QUOTA in tablespace to
create summary tables and manage batch
scheduling

Copyright Oracle Corporation, 2001. All rights reserved.

Data-Access Requirements for Administrators


In addition to the requirements listed in the slide, a number of areas of Discoverer
functionality work only if certain database privileges are set correctly.
These areas are:
Enabling query performance prediction
Creating summary tables
Importing PL/SQL functions
nly
Loading from Oracle Designer

e O
s
ANALYZE ANY privilege to analyze tables for summaries
CREATE MATERIALIZED VIEW privilege for creating, dropping, and altering
I U
A
Materialized Views in Oracle 8.1.6 or higher database.

O
Global query rewrite enabled on the database to redirect queries to Materialized

&
l
Views for better query performance.

na
For detailed information on setting up these features and troubleshooting, see the

r
e
Release Notes.

Int
cle
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 2-49
Lesson 2: Creating the End User Layer and Business Areas
.....................................................................................................................................................

Data-Access Requirements
for End Users

Access to the EUL


Access to at least one business area
SELECT status on base tables
CONNECT role
CREATE TABLE, VIEW, and PROCEDURE
required to schedule workbooks

Copyright Oracle Corporation, 2001. All rights reserved.

Data-Access Requirements for End Users


Discoverer users, whether administrators or end users, must never compromise the
security of the underlying database server. Users cannot see information in Discoverer
to which they do not have access in the server. All Discoverer security and privileges
are additional to those already provided in the database.
Note: End users do not require CREATE TABLE, VIEW, and PROCEDURE privileges

ly
to schedule workbooks if they are using the batch repository owner. Batch repository
owners will be discussed in Lesson 9.

On
se
I U
OA
l &
rna
nte
e I
cl
ra
O

.....................................................................................................................................................
2-50 Oracle iDS: Discoverer for Administrators
Summary
.....................................................................................................................................................

Summary

Summary

In this lesson, you should have learned how to:


Create the initial EUL
Design and create a business area
Load metadata into a business area by using the
Load Wizard
Export and import business areas
Grant user access to a business area
Control user properties and privileges

Copyright Oracle Corporation, 2001. All rights reserved.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 2-51
Lesson 2: Creating the End User Layer and Business Areas
.....................................................................................................................................................

Practice 2-3 Overview

Practice 2-3 Overview

This practice covers the following topics:


Providing access to the business area
Specifying privileges for a user
Creating and running queries in the EUL by using
the new business areas

Copyright Oracle Corporation, 2001. All rights reserved.

Practice 2-3 Overview


In this practice, you will grant user access to the business areas and control user access
through privileges. You also create and modify queries in Discoverer Plus by using the
new business areas.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
2-52 Oracle iDS: Discoverer for Administrators
Practice 2-3
.....................................................................................................................................................

Practice 2-3
1 Grant the end user oraxxb (where xx is provided by the instructor) access to the
new business areas.
Hint: Use Tools>Security.
2 Grant oraxxb all the privileges to the Discoverer Plus (including the User
Edition).
Note: You may experience a slight delay in response when privileges are applied.
3 Launch the Discoverer Plus as oraxxb and create a new workbook.
4 Create and edit a table query as follows:
a Select Sales SUM and Unit Sales SUM from the Sales Facts folder, Region from
the Stores folder, and Transaction Date Year from the Times folder.
b Drill down from Transaction Date Year to Quarter in Year without replacing
Transaction Date Year. Why does this drill hierarchy exist? Are the default
positions of the axis items meaningful?
c Duplicate the query so that the table layout is a page-detail crosstab.
d Check Show Page Item. Pivot the items so that Region is on the side axis,
Transaction Date Year is on the page axis, and the remaining items are on the
top axis.
e Click a cell in the worksheet and open the Drill dialog box. What other drills
are available?
5 Save the workbook on your computer as workbook1.dis and exit Discoverer
Plus.

ly
6 In the Administration Edition, restrict oraxxb so that the only function that can
be performed is to run saved queries and collect query statistics.
On
e
7 Reconnect to Discoverer Plus as oraxxb and verify the restriction. What options
are available?
Us
8

AI
In the Administration Edition, allow oraxxb the privilege of editing queries.

O
9 Reconnect to Discoverer Plus as oraxxb. What options are available now? Open

&
the first worksheet of the saved workbook. What functions are not available?
10
al
Restore all Discoverer Plus privileges except for Schedule Workbooks to oraxxb.
11
rn
In the Administration Edition, restrict oraxxb from running queries when the

e
t
predicted time exceeds 10 seconds.

In
cle
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 2-53
Lesson 2: Creating the End User Layer and Business Areas
.....................................................................................................................................................

Practice 2-3 (continued)


12 Reconnect to Discoverer Plus, create a new workbook, and create a table query
that includes all items from the Sales Facts, Products, Times, and Stores folders.
What happens?
13 In the Administration Edition, for oraxxb, increase the time for running queries
to 45 seconds.
14 Load the DEPT table from the online dictionary owned by VIDEOCUT into the
Human Resources business area. Accept the optional defaults. Do not create
LOVs.
15 Discussion topics:
a What can be created for you automatically when you load tables from the
online dictionary?
b What are the steps for adding an additional table from the online dictionary to
an existing business area?
16 Launch Discoverer Plus, open Workbook1, and create a page-detail table query
that returns your choice of items from Dept and Emp.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
2-54 Oracle iDS: Discoverer for Administrators
3
.................................

Creating LOVs, Alternative


Sorts, and Conditions

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O
Lesson 3: Creating LOVs, Alternative Sorts, and Conditions
.....................................................................................................................................................

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
3-2 Oracle iDS: Discoverer for Administrators
Objectives
.....................................................................................................................................................

Objectives

Objectives

After completing this lesson, you should be able to


do the following:
Use Item classes
Create an LOV by using an item class
Specify an alternative sort by using an item class
Create optional and mandatory conditions

Copyright Oracle Corporation, 2001. All rights reserved.

Lesson Aim
As the Discoverer administrator, one of your primary tasks is to enhance the
capabilities of the user in accessing the data and creating queries.
In this lesson, you use item classes to create lists of values for axis items and
alternative sorts. You also create optional and mandatory conditions.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 3-3
Lesson 3: Creating LOVs, Alternative Sorts, and Conditions
.....................................................................................................................................................

Overview

Overview
Load business area*

Create item classes


Refine relational structure

Create joins
Create drills
Create calculated items
Create conditions
Create summary tables
Create complex folders

Maintain the EUL


Edit formatting properties

Grant access*
* Mandatory

Copyright Oracle Corporation, 2001. All rights reserved.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
3-4 Oracle iDS: Discoverer for Administrators
Using Item Classes
.....................................................................................................................................................

Using Item Classes

Item Classes

Do not belong to a folder or to a business area


Can be used by one or more items
Create LOVs for an item
Define an alternative sort sequence
Define drill-to-detail item groups

Copyright Oracle Corporation, 2001. All rights reserved.

Item Classes
An item class enables you to define properties once for a specified item and then
assign the item class to other items that share similar properties. You create an item
class to enable the following features:
Lists of values (LOVs)
Alternative sorts
nly
Drill-to-detail links (hyperdrills)

e O
s
Item classes do not belong to a folder or business area but are associated with an item

U
that provides the list of values. You can associate other items with a specific item
I
A
class.

O
Note: Drill-to-detail item classes are covered in detail in Lesson 7, Creating Drills.

&
al
ern
Int
cle
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 3-5
Lesson 3: Creating LOVs, Alternative Sorts, and Conditions
.....................................................................................................................................................

Creating Item Classes

List of values
Alternative sort
Drill to detail

Copyright Oracle Corporation, 2001. All rights reserved.

About Item Class Attributes


The item class attributes that you can define are described as follows:
List of values: In Discoverer Plus, LOVs appear as a plus (+) sign next to an item.
Clicking the plus sign generates a query and displays a list of values for the
selected item. You can also generate LOVs in step 3 of the Load Wizard during the
creation of the business area.

ly
Alternative sort: An alternative sort enables you to sort values of an item in a
nonalphanumeric sequence. An example of this is financial periods: M1, M2, M3,
. . . M10, M11, M12. If these values were sorted alphabetically, they would appear
On
as M1, M10, M11, M12, M2, M3, and so on.
se
Drill to detail: Drill-to-detail links help users to navigate through detail and
I U
summary-level data and to drill to other related data.

OA
Invoking the Item Class Wizard
l &
rna
These are several ways to display the Item Class Wizard:

e
Select Insert>Item Class from the menu bar.

Int
Click the New Item class icon on the toolbar.

le
Select Create item classes from the Administration Tasklist.

c
a
Select the Item Class tab in the work area and New Item Class from the right-

r
mouse menu.
O

.....................................................................................................................................................
3-6 Oracle iDS: Discoverer for Administrators
Creating Lists of Values
.....................................................................................................................................................

Creating Lists of Values

LOVs

Can be created automatically during bulk load


Can be created manually using a wizard
Used by end users to:
Apply conditions
Define parameter
values
Input values for
parameterized
reports

Copyright Oracle Corporation, 2001. All rights reserved.

LOVs
Typically, you generate lists of values when you first create the business area and then
optimize them later for performance or share them with other items using the Item
Class Wizard.
Providing end users with lists of values enables them to easily set conditions and
parameter values without having to type values manually or remember what values are
nly
O
contained in the database.

se
I U
OA
l &
rna
nte
e I
cl
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 3-7
Lesson 3: Creating LOVs, Alternative Sorts, and Conditions
.....................................................................................................................................................

Creating an LOV by Using


the Item Class Wizard

Copyright Oracle Corporation, 2001. All rights reserved.

Creating an LOV by Using the Wizard: Step 1


After you launch the Item Class Wizard, your first step is to select the List of values
option in the first screen of the wizard. Click Next to go to the next step.

Creating an LOV by Using the Wizard: Step 2


The second step is to select the item that generates the list of values. Add the item and

ly
click Next to go to the next step.

On
se
I U
OA
l &
rna
nte
e I
cl
ra
O

.....................................................................................................................................................
3-8 Oracle iDS: Discoverer for Administrators
Creating Lists of Values
.....................................................................................................................................................

Creating an LOV by Using


the Item Class Wizard

Copyright Oracle Corporation, 2001. All rights reserved.

Creating an LOV by Using the Wizard: Step 3


The third step is to select the item or items that will use the item class attribute. Add
the desired items and click Next to go to the next step.

Creating an LOV by Using the Wizard: Step 4


In the fourth step, assign a name and useful description for the end user. Click Finish

ly
to complete the creation of the new item class attribute.

On
se
I U
OA
l &
rna
nte
e I
cl
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 3-9
Lesson 3: Creating LOVs, Alternative Sorts, and Conditions
.....................................................................................................................................................

Managing LOVs

Copyright Oracle Corporation, 2001. All rights reserved.

Displaying a List of Item Classes


Click the Item Classes tab in the work area to display a list of all item classes in the
selected business area. Use the Show pull-down list to display all the system-defined
item classes, user-defined item classes, or both.
You can also elect to display only LOVs, alternative sorts, or drill-to-detail item
classes. To create a new item class or to edit or remove an existing item class, select

ly
the appropriate right-mouse menu option.

Editing an Item Class Attribute


On
To edit an item class, select Edit Item Class from the right-mouse menu option. The
se
Edit Item Class dialog box is displayed. Click the appropriate tab. For example, to
I U
A
associate another item with an LOV item class, click the List of Values tab and select

O
the item that you want to edit. Next, click the Select Items tab and select the desired

&
items that you want to use with the item class.

al
ern
Int
cle
ra
O

.....................................................................................................................................................
3-10 Oracle iDS: Discoverer for Administrators
Creating Lists of Values
.....................................................................................................................................................

LOV Hints and Tips

Retrieve all LOVs after defining them to avoid the


List of values may take a long time message.
Set the timeout period in seconds for all LOVs.
Retrieve LOVs from small dimension tables rather
than large transaction tables, if possible.
Set the maximum length of the character column
to create an LOV on loading.
HKEY_CURRENT_USER\Software\Oracle\Discovere
r4\Database\DefaultDomainMaxColLength

Copyright Oracle Corporation, 2001. All rights reserved.

Warning Message and Timeout Period


When you request a list of values for an item, a query is submitted to the database,
which selects the distinct set of values for the item. If the folder that contains the item
represents a large complex result set, then retrieving the list of values can take
considerable time. The EUL records how long the list takes to be fetched from the
database the first time the list is used. After that, if the predicted time is greater than 15

ly
seconds, the user is warned that the list may take some time to retrieve. The warning

n
message is always displayed the first time a list is created, so it is a good idea to open
all newly created LOVs in the Administration Edition, so that end users never see this
message.
e O
Us
Speeding Up List Retrieval

AI
O
The query used to fetch the list of values is a SELECT DISTINCT type query. If the

&
list is defined against an item in a folder with a large number of rows compared with

l
the number of distinct values, then such a query can be inefficient. It is much better to
a
n
drive the list from a small dimension table attached to the FACT table, rather than

er
using the FACT table itself. If such tables do not exist, you may want to consider
t
n
creating them to speed up the LOV retrieval.

e I
cl
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 3-11
Lesson 3: Creating LOVs, Alternative Sorts, and Conditions
.....................................................................................................................................................

Creating Alternative Sorts

Alternative Sorts

Allow items to be sorted by a nonalphanumeric


sort sequence
Affect only the sort sequence of items
Are invisible to users
Are required for many financial reports
Require a folder containing the sequence and LOV
items

Copyright Oracle Corporation, 2001. All rights reserved.

Alternative Sorts
You use alternative sorts when you want the values of an item to sort in a
nonalphanumeric sort sequence. An alternative sort affects queries only when sorting.
It does not affect the original values in the database.

ly
Example of an Alternative Sort
An example of this is financial periods, with values such as M1, M2, M3, and M10.
On
e
When these values are sorted alphabetically, they appear as follows:
M1, M10, M11, M12, M2, M3 . . .
Us
When an alternative sort is used, these values appear in a more natural sequence:
AI
O
M1, M2, M3, M4, . . . M10, M11 . . .
Using an alternative sort involves at least two items:
l &
rna
The item that you want sortedfor example, Financial Period

e
The item that contains the correct sort sequencefor example, Sort Date

Int
cle
ra
O

.....................................................................................................................................................
3-12 Oracle iDS: Discoverer for Administrators
Creating Alternative Sorts
.....................................................................................................................................................

Alternative Sorts
Default sort order

Alternative sort order

Copyright Oracle Corporation, 2001. All rights reserved.

Alternative Sorts (continued)


Alternative sorts enable end users to display values in a nonstandard sequence.
Consider the example shown in the slide. By default, the values of the Description
item are sorted alphabetically: ABC Learning, Aladdin, Alien3, and so on. To sort the
Description values according to the values of the Product Key item: 9, 10, 14, 16,
21, and so on,you must create an alternative sort item and link the two items

ly
together. One item defines the sort order and the other defines the item to be sorted.
Alternative sorts require no action by the end user. In fact, end users are unaware that
the sorts exist.
On
se
When a user chooses to sort on an item, it is sorted by the alternative sort, if available.

U
The SQL that is generated always fetches the alternative sort item when you select the
I
A
item, even if you do not choose to sort. This behavior means that a local sort can be

& O
performed later, if required, without accessing the database a second time. The SQL
that is generated creates a join (or a self-join) and can affect performance of large

al
result sets. You should always index columns specified in alternative sorts.

ern
Int
cle
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 3-13
Lesson 3: Creating LOVs, Alternative Sorts, and Conditions
.....................................................................................................................................................

Creating an Alternative Sort


by Using the Item Class Wizard

Copyright Oracle Corporation, 2001. All rights reserved.

Creating an Alternative Sort by Using the Item Class Wizard


You use the Item Class Wizard to create an alternative sort. The two methods for
creating an alternative sort are as follows:
Create a new item class and select the List of values option and the Alternative
sort options in the first step of the wizard.
Edit an existing item class and add the alternative sort.

Creating an Alternative Sort by Using the Wizard: Step 1 After the Item Class
nly
Wizard is launched, the first step is to select the Alternative sort option in the first
e O
s
screen of the wizard. Click Next to go to the next step.

Creating an Alternative Sort by Using the Wizard: Step 2 The second step is to
I U
select the item that generates the list of values (for example, Monday, Tuesday,
OA
&
Wednesday, Thursday, Friday, Saturday, and Sunday). Select the item and click Next

l
to go to the next step.
a
ern
Int
cle
ra
O

.....................................................................................................................................................
3-14 Oracle iDS: Discoverer for Administrators
Creating Alternative Sorts
.....................................................................................................................................................

Creating an Alternative Sort


by Using the Item Class Wizard

Copyright Oracle Corporation, 2001. All rights reserved.

Creating an Alternative Sort by Using the Item Class Wizard (continued)

Creating an Alternative Sort by Using the Wizard: Step 3 The third step is to
select the item that contains the alternative sort (for example, 1, 2, 3, 4, 5, 6, and 7).
Select the desired item and click Next to go to the next step.

Creating an Alternative Sort by Using the Wizard: Step 4 The fourth step is to
nly
O
select the item or items that will use the item class. Select the desired items and click

e
Next to go to the next step.

Us
I
Creating an Alternative Sort by Using the Wizard: Step 5 The final step is to

A
give the alternative sort a name and description that is meaningful. Click Finish to
create the item and exit the Item Class Wizard.

& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 3-15
Lesson 3: Creating LOVs, Alternative Sorts, and Conditions
.....................................................................................................................................................

Using Conditions

Conditions

Conditions:
Reduce amount of information retrieved in a
query
Can be placed on one or more items
Are associated with a folder
Can be optional (visible) or mandatory
(hidden)
Items in the condition:
Must exist in the folder
Can be hidden

Copyright Oracle Corporation, 2001. All rights reserved.

About Conditions
A condition is a filter that you place on a folder to restrict the number of rows returned
from a query. For example, an end user may want to view sales information for all
states in the North region. To do this, you create a condition that returns information
for all states in the North region.

Types of Conditions As administrator, you can define two types of item conditions:
nly
mandatory and optional.
e O
Mandatory condition: A condition that is automatically applied to every query that

Us
I
the user creates based on items in the folder that contains the condition. It is
transparent in Discoverer Plus.
Optional condition: A condition that is applied only when the user selects it. An
OA
l
optional condition appears in the item selector as a filter icon.
&
rna
nte
e I
cl
ra
O

.....................................................................................................................................................
3-16 Oracle iDS: Discoverer for Administrators
Using Conditions
.....................................................................................................................................................

About Conditions (continued)

Creating Conditions in Discoverer Plus Conditions are not limited to the


Discoverer Administration Edition; they can also be created in Discoverer Plus.
However, conditions created in Discoverer Plus apply only to the workbook in which
they are created. Conditions created in the Administration Edition are stored in the
End User Layer, where they are available to all users.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 3-17
Lesson 3: Creating LOVs, Alternative Sorts, and Conditions
.....................................................................................................................................................

Optional Conditions

Act as a shortcut for selecting data


Are applied only when selected in Discoverer Plus
Are visible in Discoverer Plus
Can use only items in the current folder (but can
include hidden items)
Are not applied to complex folders built on the
current folder
Do not affect the result set of the folder, if not
selected

Copyright Oracle Corporation, 2001. All rights reserved.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
3-18 Oracle iDS: Discoverer for Administrators
Using Conditions
.....................................................................................................................................................

Mandatory Conditions

Are analogous to the WHERE condition


Are always applied whenever the folder is used
Do not appear in Discoverer Plus
Can use items in the source folder
Apply to complex folders built on the source folder
Always affect the result set of the folder

Copyright Oracle Corporation, 2001. All rights reserved.

Note
Complex folders and how conditions work in them will be discussed in Lesson 5,
Creating Complex and Custom Folders.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 3-19
Lesson 3: Creating LOVs, Alternative Sorts, and Conditions
.....................................................................................................................................................

Conditional Operators

Operator Example Retrieves


Equality List Price = 55 List prices equal to 55
Inequality List Price > 60 List prices greater than 60
Like State LIKE C% States that start with the
letter C
Between Dept BETWEEN Departments 10, 20, 30,
10 AND 40 and 40
IN IN(CA,OR) Items that are in a specified
list
NOT State NOT States that do not start with
LIKE C% the letter C

Copyright Oracle Corporation, 2001. All rights reserved.

Conditional Operators
Conditions are a way of reducing the information contained in a particular row set. For
example, you may select videos as an item in a query, though in fact you want to see
only science fiction videos:
Video = Science Fiction
A conditional operator shows how an item is to be compared. The following table

ly
describes the different available operators:
Operator Description
On
e
= Equality test
<,>,<=,>=,!=, ^= Inequality test
Us
IN Value is equal to any member of the test set

AI
O
NOT IN Value is not equal to any member of the test set

&
IS NULL Value is null
IS NOT NULL

al Value is not null

n
BETWEEN Value is between two values
NOT BETWEEN
ter Value is not between two values
LIKE
In Value matches a case-sensitive pattern
NOT LIKE

cle Value does not match a pattern

ra
O

.....................................................................................................................................................
3-20 Oracle iDS: Discoverer for Administrators
Using Conditions
.....................................................................................................................................................

Creating a New Condition

Copyright Oracle Corporation, 2001. All rights reserved.

Invoking the New Condition Dialog Box


You can display the New Condition dialog box in several ways:
Select Insert>Condition from the menu bar.
Select Create Conditions from the Administration Tasklist.
Click the New Condition icon on the toolbar.
If you have not already selected the item or folder to which the condition will apply, an
additional dialog box named New Condition appears. Use this dialog box to select the
nly
O
business area and folder containing the item, and then select the desired item from the
appropriate folder.
se
I U
OA
l &
rna
nte
e I
cl
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 3-21
Lesson 3: Creating LOVs, Alternative Sorts, and Conditions
.....................................................................................................................................................

Creating a Simple Condition

Copyright Oracle Corporation, 2001. All rights reserved.

Creating a Simple Condition


1 (Optional) Give the condition a meaningful name. If the Generate name
automatically check box is selected, the Discoverer will automatically name the
condition formula.
2 (Optional) Give the condition a description that is meaningful to end users.
3 Specify the type of condition (optional or mandatory) in the Type pull-down menu.
4 (Optional) Change the currently selected item by selecting another item (or create

nly
O
a calculation) from the pull-down menu in the Item field.
5 Select the appropriate operator from the Condition pull-down menu.

se
U
6 Select the Values pull-down menu. Your choices depend on what item class you
have selected. Valid choices include the following:
AI
O
Select Item
Select Multiple Values
l &
rna
Create Calculation

e
The List of values belonging to the item class

Int
7 Click OK. The condition and an icon are added to the folder in the business area.

le
Note: If you select the Match case check box, then the search is case sensitive. If

c
the check box is not selected, then the UPPER function is applied to both the item

ra
and the value.

.....................................................................................................................................................
3-22 Oracle iDS: Discoverer for Administrators
Using Conditions
.....................................................................................................................................................

Creating an Advanced Condition

Copyright Oracle Corporation, 2001. All rights reserved.

Adding Conditions
When you select Advanced, the New Condition window is modified to include the
original condition and buttons that enable you to add, delete, or group conditions. To
add a condition, follow these steps:
1 Click Add. A blank condition field is added.
2 Enter the new condition.
3 Click OK to validate the condition.

nly
Changing Operators
e O
By default, Discoverer combines conditions using the AND operator. Clicking inside
Us
I
the Group field toggles among the AND, OR, and NOT operators.

Copying Conditions
OA
l &
To copy or edit an existing condition, choose Select Condition from the drop-down list

rna
in the Item field, select a condition in the specified folder, and click Advanced to copy
it into the Advanced New Condition dialog.

nte
I
Nesting Conditions

e
l
You can build complex conditions from simpler ones by nesting them. To do this,
c
a
select two or more conditions and then select the appropriate group operator. There is
r
O
no limit to the depth that conditions can be nested.
You can also create complex conditions or change the status of an existing condition
by using the Select Condition command from the drop-down list in the Item field.

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 3-23
Lesson 3: Creating LOVs, Alternative Sorts, and Conditions
.....................................................................................................................................................

Summary

Summary

In this lesson, you should have learned how to:


Use an item class to create a list of values
Use an item class to specify an alternative sort
Create optional and mandatory conditions

Copyright Oracle Corporation, 2001. All rights reserved.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
3-24 Oracle iDS: Discoverer for Administrators
Practice 3-1 Overview
.....................................................................................................................................................

Practice 3-1 Overview

Practice 3-1 Overview

This practice covers the following topics:


Creating an optional condition
Creating a mandatory condition
Creating an LOV
Specifying an alternative sort

Copyright Oracle Corporation, 2001. All rights reserved.

Practice 3-1 Overview


In this practice, you refine the relational structure of the Video Stores and Human
Resources business areas by creating optional and mandatory conditions. You also use
the Item Class Wizard to create an LOV and specify an alternative sort.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 3-25
Lesson 3: Creating LOVs, Alternative Sorts, and Conditions
.....................................................................................................................................................

Practice 3-1
1 In the Administration Edition, open the Video Stores and Human Resources
business areas, if they are not already opened.
2 The Dept folder was loaded without specifying that LOVs be automatically
created. Create two item classes to generate LOVs for the Name and Location
items in the Dept folder.
3 View the values of the Name and Location items in the Data tab.
4 Create the following conditions in the Video Stores business area:
a Create an optional condition on the Age category in the Products folder that
includes all ages and over 12. Name the condition Family Films.
b Create a mandatory condition on Region in the Stores folder that restricts
Region to only the East region. Name the condition Eastern Region.
5 Create the following conditions in the Human Resources business area:
a Create an optional condition on Location in the Dept folder that restricts
locations to Boston or New York. Name the condition Eastern Offices.
b Create an optional condition on Location in the Dept folder that restricts the
location to San Jose. Name the condition Western Office.
6 The days of the week are currently sorted in alphabetical order. Create an item
class that specifies an alternative sort (Monday, Tuesday, Wednesday, Thursday,
Friday, Saturday, Sunday) for the days of the week:
a Create an alternative sort for the Days of Week item in the Days folder.
b Apply the item class to the Day of Week item in the Times folder.

ly
c Name the item class Sorted days of week.
d In the Item Classes tab, show the user-defined alternative sort.
On
e Expand the list of values to view the values sorted by the alternative sort key.

se
U
f Expand the list of items by using the Sorted days of week item class.
7
AI
Show all the user-defined item classes in the Item Classes tab for the Video Stores

O
and Human Resources business areas.
8 Launch Discoverer Plus as oraxxb, open a new workbook, and create new
l &
a
queries that use the conditions and alternative sort. Save the queries as

rn
workbook3-1.dis.

e
Int
cle
ra
O

.....................................................................................................................................................
3-26 Oracle iDS: Discoverer for Administrators
4
.................................

Creating Calculated Items


and Registering PL/SQL
Functions

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O
Lesson 4: Creating Calculated Items and Registering PL/SQL Functions
.....................................................................................................................................................

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
4-2 Oracle iDS: Discoverer for Administrators
Objectives
.....................................................................................................................................................

Objectives

Objectives

After completing this lesson, you should be able to


do the following:
Customize folders and items by modifying
properties
Create a calculated item
Register PL/SQL functions

Copyright Oracle Corporation, 2001. All rights reserved.

Lesson Aim
In this lesson, you learn how to edit properties to provide more meaningful names for
business areas, folders, and items. You also learn how to create calculated items and
how to make user-defined PL/SQL functions available to Discoverer users.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 4-3
Lesson 4: Creating Calculated Items and Registering PL/SQL Functions
.....................................................................................................................................................

Overview

Overview
Load business area*

Create item classes


Refine relational structure

Create joins
Create drills
Create calculated items

Create conditions Create summary tables


Create complex folders

Maintain the EUL


Edit formatting properties

Grant access*
* Mandatory
Copyright Oracle Corporation, 2001. All rights reserved.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
4-4 Oracle iDS: Discoverer for Administrators
Folder and Item Properties
.....................................................................................................................................................

Folder and Item Properties

Viewing Default Folder


and Item Properties

Folder properties Item properties

Copyright Oracle Corporation, 2001. All rights reserved.

Displaying the Properties Dialog Box


To view the properties of an EUL element, you first select the folder or item in the
work area, and then use one of the following methods to display the Properties dialog
box:
Select properties from the right-mouse menu.
Double-click the element in the work area.
nly
Select Properties from the Edit menu.

e O
s
Select Edit Item Properties from the Administration Tasklist dialog box.

I U
A
About Identifiers Sometime Discoverer needs to know which elements in EULs

O
refer to the same EUL objects, (known as Conceptually Identical Objects). To do this,

&
Discoverer compares either the elements Display Name or the elements Identifier.

l
Identifiers are unique names that are used by Discoverer to identify EUL elements and
a
ern
workbooks uniquely. This is useful when the display names of folders and items are

t
customized, because it allows Discoverer to continue to open workbooks or perform

In
import operations even when the display names have been changed. These operations

e
use the identifier to locate the right elements and therefore are unaffected by changes

cl
in the display names.

ra
For example, if you have a folder named Sales in a production EUL with its

O
component items, add a new calculated item Projected Cost to the Sales folder in the
development EUL, and then export this folder. When you import the folder using the
Refresh option to the production EUL, the Projected Cost item will be added to the
existing Sales folder.

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 4-5
Lesson 4: Creating Calculated Items and Registering PL/SQL Functions
.....................................................................................................................................................

Formatting Folders and Items

Helps end users


recognize their data
Saves time in building
reports
Is useful with drill-to-
detail applications
Is an ongoing process

Copyright Oracle Corporation, 2001. All rights reserved.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
4-6 Oracle iDS: Discoverer for Administrators
Folder and Item Properties
.....................................................................................................................................................

Folder Properties

Name
Description
User visibility
Database
Table owner
Table name
Optimizer hint
Identifier

Copyright Oracle Corporation, 2001. All rights reserved.

Folder Properties
You use the Folder Properties dialog box to customize the properties of a folder.
Commonly modified attributes are described in the following table:
Attribute Name Description
Name Specifies the name of the folder as it appears in the work area

ly
Description Specifies the description of the folder as it appears in the

n
description line of Query Wizard in Discoverer Plus

O
Visible to user Specifies whether the folder is visible in Discoverer Plus
Database
e
Specifies the name of the source database that stores the table

s
U
corresponding to the folder
Owner
I
Specifies the table or view owner corresponding to the folder

A
O
Object Specifies the name of the database object that corresponds to the
folder

l
Optimizer hint
&
Places a specific optimizer hint against the folder (The hint is

rna invisible in Discoverer Plus.)

e
Identifiers Identifies folder uniquely across the EUL, a property that is static

Int across EUL instances. The property is not visible to the users.

cle
Note: The Optimizer hint property is not available with ODBC data sources.

ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 4-7
Lesson 4: Creating Calculated Items and Registering PL/SQL Functions
.....................................................................................................................................................

Customizing Folder Properties

Copyright Oracle Corporation, 2001. All rights reserved.

Customizing Folder Properties


You can customize the properties of a folder by using the Folder Properties dialog box.
This dialog box contains two tabs: General and Dependents.

General Tab The General tab lists the attributes of the underlining table (or view),
including the name and description that will be used in Discoverer Plus. Attributes that
cannot be changed by the Discoverer administrator are dimmed to indicate that their
values cannot be modified.
nly
Dependents Tab The Dependents tab shows the relevant types of information on
e O
which the object depends. In this slide example, Sales Fact is joined to three other
Us
I
folders: Product, Store, and Time.

Renaming and Adding Descriptions to Folders You should give each folder in a
OA
business area a meaningful name. Folders are the basic elements with end users work
l &
rna
in Discoverer Plus. To modify a folder name, select the Name attribute and enter the
new name. To modify a folder description, select the Description attribute and enter a
new description

nte
e I
cl
ra
O

.....................................................................................................................................................
4-8 Oracle iDS: Discoverer for Administrators
Folder and Item Properties
.....................................................................................................................................................

Customizing Item Properties

Name
Description
Data type
Formula
Visibility to user
Default position
Default aggregate
Format mask

Copyright Oracle Corporation, 2001. All rights reserved.

Customizing Item Properties


You use the Item Properties dialog box to customize the properties of an item. Some
attributes that are commonly modified are described in the following table:
Attribute Name Description
Name Specifies the name of the item as it appears in the work area
Description Specifies the description of the item as it appears in the work area

ly
Formula Displays the formula for the selected item; can be modified if the

Visible to user
selected item is derived

On
Specifies whether the item is visible in Discoverer Plus; dimmed

se
in Administration Edition if value is set to No
Item class
I U
Specifies the name of the item class used by the selected item

A
Date hierarchy Specifies the date hierarchy used by the selected item
Default position
O
Specifies the default axis on which the item will be displayed

&
l
Default aggregate Sets the aggregate type if no aggregate type is specified for a data

Heading
rna point
Specifies the name of the item as it appears in the results set

te
Format mask

n
Specifies the default display format for the selected item

e I
l
Demonstration

c
a
Show participants how you can view and modify the intersecting properties of more
r
O
than one item by using the [Shift] key. Explain the use of the Automatically save
changes after each edit option.

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 4-9
Lesson 4: Creating Calculated Items and Registering PL/SQL Functions
.....................................................................................................................................................

More Item Formatting Properties

Alignment
Word wrap
Case storage*
Display case
Default width
Replace NULL with*
Content type
Max char fetched (longs)
Identifier
* Affects SQL generation
Copyright Oracle Corporation, 2001. All rights reserved.

More Item Formatting Properties


More item attributes that are commonly modified are described in the following table:
Attribute Name Description
Alignment Specifies the alignment of data displayed in User Edition; right-
aligns numeric data and left-aligns date and text data by default
Word wrap Specifies whether text data wraps in Discoverer Plus; if accessing

ly
large amounts of data, a Yes setting may slow down performance

Case storage
in Discoverer Plus

On
Indicates how the text data is stored in the database, independent
of how it is displayed
se
Display case
U
Provides choices for displaying text or character data as

I
A
uppercase, lowercase, or initial capitals in end-user workbooks

O
Default width Specifies the default width of an item in Discoverer Plus

&
worksheets, as expressed in the number of characters
Content type
al Identifies whether data can be used to launch an external

n
application

ter
Replace NULL with Specifies the string to display for a cell with a null value

In
Max char fetched Specifies the maximum amount of characters retrieved in a SQL

le
call to the database; use for LONG data types

rac
Identifier Identifies the item uniquely across the EUL, and is static across
EUL instances.

.....................................................................................................................................................
4-10 Oracle iDS: Discoverer for Administrators
Item Calculations
.....................................................................................................................................................

Item Calculations

Item Calculations

List Price Net Price. .


. . . . . . . . . . . . (Q1 + Q3)/2. . . . . . . .
. . . 12*Salary + NVL(Bonus,0)

RowSecurity(dept_id)

Copyright Oracle Corporation, 2001. All rights reserved.

Item Calculations
An item calculation is used to create a new item when there is no underlying database
column that contains the data required. Calculations can be simple, such as Sal*12,
or they can be complex mathematical or statistical or analytical expressions.

Using Parentheses to Change Operator Precedence


nly
O
The following arithmetic operators can be used in a calculation:
Multiply (*)
se
Divide (/)
I U
A
Add (+)
Subtract (-)

& O
l
When you use arithmetic expressions in a calculation, the multiply and divide

na
operators are executed first, regardless of their position in the calculation. If you have

r
e
more than one operator of the same precedence, they are evaluated from left to right.

Int
For example, the calculation Price - Discount * Quantity will be evaluated as Discount

e
multiplied by Quantity and then subtracted from Price. If you place parentheses

cl
around the subtraction expression, (Price - Discount), then Price is subtracted from

ra
Discount first, and the result is then multiplied by Quantity.

O
Calculations can also use CHAR and DATE items, SQL and PL/SQL functions, and
literals, as well as the concatenation operator ||.

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 4-11
Lesson 4: Creating Calculated Items and Registering PL/SQL Functions
.....................................................................................................................................................

Creating a Simple Calculation

Copyright Oracle Corporation, 2001. All rights reserved.

Creating a Simple Calculation

Invoking the New Item Dialog Box You can invoke the New Item dialog box in
several ways:
Select Insert>Item from the menu bar, which displays a dialog box for selecting
the folder.

ly
Click the New Item icon on the toolbar, which displays a dialog box for selecting
the folder.

On
e
Select New Item from the Administration Tasklist dialog box, which displays a
dialog box for selecting the folder.

Us
Select an item or folder in the work area and select New Item from the right mouse
menu.
AI
& O
l
Creating a Calculated Item

na
1 Enter the calculation in one of the following ways:

r
e
If you know the calculation syntax, enter it directly in the Calculation box.

Int
Build the calculation by pasting items from the Items list box and functions

le
from the Functions list box into the Calculation box. (Select the Functions

rac
option to display a list of available functions.)
Use a combination of pasting items and entering text.
O
2 Enter a name in the Name field for the calculation that is meaningful to end users.
3 Click OK to create the calculated item. If the calculation contains an error, the
calculation is not created and a message is displayed informing you of the error in
the formula. Note that default aggregate function for a calculated item is Detail.
Usually, you will want to change this property value to SUM.
.....................................................................................................................................................
4-12 Oracle iDS: Discoverer for Administrators
Item Calculations
.....................................................................................................................................................

Common SQL Functions


Function Example
MOD MOD(7,5)
ROUND ROUND(List Price,2)
TRUNC TRUNC(List Price,2)
ADD_MONTHS ADD_MONTHS(Date Work Started, -6)
LAST_DAY LAST_DAY(Date Work Started)
SUBSTR SUBSTR(Job Title,1,5)
GREATEST GREATEST(Monthly Salary, Commission)
NVL NVL(Commission,0)
|| Order Number|| ||Order Date
DECODE DECODE(Department,10,Salary*1.05,
20,Salary*1.08,Salary*1.04)

Copyright Oracle Corporation, 2001. All rights reserved.

Common SQL Functions


A number of SQL functions perform particular operations on the values in an item
for example, to round a value to a number of decimal places or to calculate the number
of months between two dates. The functions that are displayed for a selected item
depend on the data type (VARCHAR2, NUMBER, DATE) of the item. For example, if
the data type of the selected item is DATE, then string functions such as SUBSTR will

ly
not appear in the list of available functions.
Note: For details on SQL functions see the Oracle SQL Reference Manual or visit the
Oracle OTN Web site: technet.oracle.com.
On
se
I U
OA
l &
rna
nte
e I
cl
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 4-13
Lesson 4: Creating Calculated Items and Registering PL/SQL Functions
.....................................................................................................................................................

Complex Calculation Example

Derive an item that calculates a sales discount of 10%


on game rentals, 15% on video rentals, and 5% on
video sales.

A.

Copyright Oracle Corporation, 2001. All rights reserved.

Building Complex Calculations


You can create complex calculations by using a combination of SQL functions and
folder items. These calculations can be simple, like the examples in the previous
lesson, or complex, as shown here.

Organization of Functions Selecting the Functions option displays a set of folders


that organize the various functions by type as follows:
Analytic: Analytical functions provide basic business intelligence calculations for
nly
analytic tasks.

e O
s
Conversion: Single-row functions that convert one data type to the same or another
data type.
I U
A
Database: Contains user-defined PL/SQL functions. These functions are registered
by the administrator and are discussed later in this lesson.

& O
l
Date: Calculates arithmetic operations on dates.

na
Group: Calculates the reporting functions.

r
e
Numeric: Single-row numeric functions that return numeric values. For example,

Int
ABS calculates the absolute value of a number.

le
Other: Single-row functions that do not apply to any other grouping. For example,

c
DECODE compares an expression to a search criterion and returns a value. You

ra
can include multiple search criteria and return expressions.

O
String: Single-row character functions that return character values.
Note: Aggregate calculations are discussed in detail in Lesson 5, Creating
Complex and Custom Folders.

.....................................................................................................................................................
4-14 Oracle iDS: Discoverer for Administrators
Item Calculations
.....................................................................................................................................................

Calculations Using Banded Ranges


Number of people in a salary range: 0-999,
1000-1999, >2000

Calculation returns 0-999, 1000-1999, or > 2000


depending on the value of Emp.Sal.
You can use this calculation as an axis item.
Copyright Oracle Corporation, 2001. All rights reserved.

Calculations Using Banded Ranges


Calculations can use any combination of SQL functions. In this example, the
DECODE, LEAST, and GREATEST functions are used together to create an item that
shows what range any given data point is in. You can then use this new item as an axis
item to show the number of people whose salary falls into this range.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 4-15
Lesson 4: Creating Calculated Items and Registering PL/SQL Functions
.....................................................................................................................................................

Analytical Functions

Copyright Oracle Corporation, 2001. All rights reserved.

Analytical Functions
Oracle 8.1.6 and higher versions provide analytical functions that enable rankings,
moving window calculations, lead/lag, and statistical functions. Using Discoverer you
can use these functions in calculations. You can also create calculated items based on
these functions.
Ranking functions are very useful to answer questions such as, Who are my absolute
best and worst customers?
nly
Windowing functions are useful for calculating cumulative and moving averages.

e O
s
Reporting functions help to calculate shares, for example market share for a product.
Lead/lag functions are useful for comparing values in different time periods, for
I U
A
example sales for March 1999 to March 2000.
You can use statistical functions to compute covariance, correlation, and linear

& O
l
regression statistics.

rna
nte
e I
cl
ra
O

.....................................................................................................................................................
4-16 Oracle iDS: Discoverer for Administrators
Registering PL/SQL Functions
.....................................................................................................................................................

Registering PL/SQL Functions

Registering PL/SQL Functions

Enable use of custom functions in calculations


Extend the standard set of functions
Can be used in conditions, derived items,
and so on
Are executed for every row returned
Can include SQL SELECT statements

Copyright Oracle Corporation, 2001. All rights reserved.

User-Defined Functions
In addition to the PL/SQL functions supported by Oracle, you can create custom PL/
SQL functions to meet the requirements of your users. For a user-defined PL/SQL
function to be accessible in Discoverer, you must register it in the End User Layer.
After you register a user-defined function, it appears in the list of functions that is

ly
displayed when you expand the Database folder in the New Item function list box.
User-defined functions can be used for creating or editing calculation items in the
same way as the standard functions.
On
Note: You cannot create user-defined PL/SQL functions directly in the Administration
se
Edition. To create PL/SQL functions, use SQL*Plus or a procedural editor (for
I U
example, Procedure Builder).

OA
l &
rna
nte
e I
cl
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 4-17
Lesson 4: Creating Calculated Items and Registering PL/SQL Functions
.....................................................................................................................................................

Registering PL/SQL Functions

Registration methods:
Import (version 7.3 requires SELECT on
ALL_ARGUMENTS)
Manual (must use uppercase)
EXECUTE privilege on the function required

Copyright Oracle Corporation, 2001. All rights reserved.

User-Defined Functions (continued)


Users must be granted the database EXECUTE privilege on a user-defined function to
use that function. The general syntax for granting this privilege is:
GRANT EXECUTE ON functionname TO username
If you do not grant users the EXECUTE privilege on a user-defined function, then any
folder (including complex folders) that uses the function will be inaccessible and will
not appear in Discoverer Plus.
nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
4-18 Oracle iDS: Discoverer for Administrators
Registering PL/SQL Functions
.....................................................................................................................................................

Registering PL/SQL Functions


by Using Import

2
3

Copyright Oracle Corporation, 2001. All rights reserved.

Registering PL/SQL Functions Using Import


Registering PL/SQL functions by importing them is easier than manual registration,
especially if you are registering many functions.

Importing a PL/SQL Function To import a PL/SQL function, follow these steps:


1 Select Tools>Register PL/SQL Functions. The PL/SQL Functions window
appears. Oracle-supplied PL/SQL functions and user-defined PL/SQL functions
that have already been registered are displayed in the Functions list box in the
nly
Functions tab.
e O
2 Click Import. The Import PL/SQL Functions window appears, where you can
Us
select one or more PL/SQL functions to register.

AI
O
3 Select the functions to import and click OK.

&
4 (Optional) Select the Available in User Edition check box to enable users to create

al
calculated items using the function.

ern
What Is Imported When you import a function, all the relevant information about

nt
each function is imported, such as the name of the function, the owner of the function,
I
e
the name of the package containing the function, the name of the database containing

cl
the function, the data type of the return value, a list of arguments, and a description of

ra
the function.

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 4-19
Lesson 4: Creating Calculated Items and Registering PL/SQL Functions
.....................................................................................................................................................

Registering PL/SQL Functions Manually

Copyright Oracle Corporation, 2001. All rights reserved.

Registering PL/SQL Functions Manually


To register a new function manually, follow these steps:
1 Click New in the PL/SQL Functions dialog box in the Functions tab.
2 Complete the appropriate information about the function as described on the
previous page.
3 Click the Arguments tab and enter values (in uppercase) for any arguments
associated with the function.
nly
O
4 Click the Functions tab and click Validate. If the function is valid, a message
appears stating that the function is valid.
se
U
5 Click OK to register the function and close the window.

Using the Arguments Tab Components The following components can be used to
AI
reorder arguments when registering a function:
& O
l
New/Delete: Create new arguments or delete an incorrectly entered argument.
a
rn
Move Up/Move Down: Move the selected argument up or down the argument list.

e
t
This is useful when you want to reorder an argument or when the function is

In
modified and you want to update the function registration.

le
Description: Enter text describing the argument.

c
ra
O

.....................................................................................................................................................
4-20 Oracle iDS: Discoverer for Administrators
Summary
.....................................................................................................................................................

Summary

Summary

In this lesson, you should have learned how to:


Customize folders and items
Create simple calculated items
Register PL/SQL functions manually and use the
Import feature

Copyright Oracle Corporation, 2001. All rights reserved.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 4-21
Lesson 4: Creating Calculated Items and Registering PL/SQL Functions
.....................................................................................................................................................

Practice 4-1 Overview

Practice 4-1 Overview

This practice covers the following topics:


Customizing folder and item properties
Creating a calculated item
Registering and importing a PL/SQL function

Copyright Oracle Corporation, 2001. All rights reserved.

Practice 4-1 Overview


In this practice, you edit folder and item properties to provide meaningful names for
users. You also create a calculated item and register a PL/SQL function.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
4-22 Oracle iDS: Discoverer for Administrators
Practice 4-1
.....................................................................................................................................................

Practice 4-1
1 In the Administration Edition, open the Human Resources and Video Stores
business areas, if they are not already opened.
2 Using the appropriate property sheet, make the following formatting changes:
a Make all primary and foreign key items invisible to end users.
Hint: Examples of primary keys are: Time Key, Product Key, Store Key, Emp Id,
and so on. All primary keys are in bold and foreign keys are in italics.
b Make the Days folder invisible to end users.
c In the Dates folder, change the name and heading of Transaction Date Year to
Year, Transaction Date Quarter to Quarter, Transaction Date Month to Month,
and Transaction Date Day to Day.
d In the Stores folder, change the default position of the Region item to the side
axis and specify that the values be displayed in initial capital letters.
3 Create a new calculated item in the Emp folder called Full Name that concatenates
the First Name item and the Last name item.
Hint: To create a space between two concatenated items, enclose a blank space in
single quotes.
4 Create an LOV for the Full Name item in the Emp folder. View the values of Full
Name in the Data tab.
5 Create the previously defined SEC_DEPT function by running the
SEC_DEPT.SQL script. The SEC_DEPT function compares the security level
value passed to it against the security level of the username in the SEC_LEVEL

ly
column of the SEC_OBJECT table. It returns 0 if the users security level is less

n
than the passed value; otherwise, it returns the value that was passed to it.
a Connect to SQL*Plus as the EUL owner, oraxxa, using the same password

e O
s
and database connect string that you use to connect to the Administration
Edition.
I U
A
b Compile the SEC_DEPT.SQL function (your instructor will provide the
location of the SEC_DEPT.SQL file).

& O
l
c Return to the Administration Edition and register the SEC_DEPT function in

rna
the EUL.

e
6 The SEC_OBJECT table in the VIDEOCUT schema contains usernames and their

nt
security level. The DEPT table has a SEC_LEVEL column that indicates the

I
security level of a department. Create a new item in the Dept folder by using the

cleformula Sec_Dept(Sec Level). Specify the formula as the name of the item.

r
7
a Change the default aggregate for the Sec_Dept(Sec Level) item to Sum.

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 4-23
Lesson 4: Creating Calculated Items and Registering PL/SQL Functions
.....................................................................................................................................................

Practice 4-1 (continued)


8 In the Dept folder, make the item Dept Id visible to users.
9 Reconnect to Discoverer Plus as oraxxa, and create a table query that includes
all the items from the Sec Object folder in the Human Resources business area.
What is the security level of the EUL owner? What is the security level of
oraxxb?

10 In Discoverer Plus, create a new table query that includes all items from the Dept
folder except the Western and Eastern Offices optional conditions.
a Compare the results of the item Sec Level to the results of item
Sec_Dept(Sec Level).
b Based on your comparison of these two items, which departments have a value
of zero for item Sec_Dept(Sec Level)?
c Which departments would be returned if you restrict the rows returned from
the query when Sec_Dept(Sec Level) equals Sec Level?
d Does the EUL owner have the highest security level? What is the security
level?
11 Reconnect to Discoverer Plus as oraxxb. Why does the Dept folder not appear in
the Human Resources business area?
12 Enable the oraxxb user to view the Dept folder.
a Log into SQL*Plus as the EUL owner.
b Grant oraxxb the EXECUTE privilege on the SEC_DEPT function by issuing
the following statement:

ly
GRANT EXECUTE ON SEC_DEPT TO oraxxb;
13 Reconnect to Discoverer Plus as oraxxb. Create a table query that includes all
On
e
items from the Dept folder except the Eastern and Western Offices optional
conditions.
Us
a Compare the results of item Sec Level to the results of item
Sec_Dept(Sec Level).
AI
b Based on your comparison of these two items, which departments have a value
& O
l
of zero for item Sec_Dept(Sec Level)?
a
rn
c Which departments would be returned if you restrict the rows returned from

e
t
the query when Sec_Dept(Sec Level) equals Sec Level?

In
d Does oraxxb have the highest security level?

cle
ra
O

.....................................................................................................................................................
4-24 Oracle iDS: Discoverer for Administrators
5
.................................

Creating Complex
and Custom Folders

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O
Lesson 5: Creating Complex and Custom Folders
.....................................................................................................................................................

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
5-2 Oracle iDS: Discoverer for Administrators
Objectives
.....................................................................................................................................................

Objectives

Objectives

After completing this lesson, you should be able to


do the following:
Create joins
Create and manage complex folders
Create and manage custom folders

Copyright Oracle Corporation, 2001. All rights reserved.

Lesson Aim
In this lesson, you learn how to create joins, how to create and manage complex and
custom folders.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 5-3
Lesson 5: Creating Complex and Custom Folders
.....................................................................................................................................................

Overview

Overview
Load business area*
Create item classes

Refine relational structure


Create drills
Create joins

Create calculated items


Create summary tables
Create conditions

Create complex folders


Maintain the EUL

Edit formatting properties


Grant access*
* Mandatory
Copyright Oracle Corporation, 2001. All rights reserved.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
5-4 Oracle iDS: Discoverer for Administrators
Using Joins
.....................................................................................................................................................

Using Joins

Joins

Joins are used to link two folders.


Joins help identify available folders in Discoverer
Plus.
EMP_HIST
DEPT Emp Id
Dept Id Last Name
Name Job
Location Salary
Sec Level Dept Id

A department can have more than one employee.


An employee can belong to only one department.

Copyright Oracle Corporation, 2001. All rights reserved.

Joins
Joins are a basic relational construct for combining information from two tables. In the
End User Layer, joins are created between folders and are specified by an expression
that uses items in both folders. The most common type of join is a many-to-one join,
where one row in the master folder is joined to multiple rows in the detail folder.

ly
Another type of join is a one-to-one join, which is created occasionally. The last type
of join is a many-to-many join, which is not directly supported in Discoverer (or in any
relational system), although this type of join can usually be broken down into pairs of
On
many-to-one joins.
se
I U
A
Importance of the Master-Detail Structure It is important to make sure that you

& O
define the correct folders at the master and detail end of the join. The master end of the
join is the folder that has one row (Department) for which there are several detail
(Emp) rows.
al
rn
If the join relationship is not set up correctly, what folders a user can combine in a

e
Int
single query is affected, which in cases of queries with three or more folders can
sometimes result in misleading or incorrect results being returned. In some

le
circumstances, it will also affect whether summary tables are used to speed up queries.

c
a
To view the master-detail relationship of a join, look at its properties. If the master-

Or
detail ends are wrong, then edit the join and swap the items.

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 5-5
Lesson 5: Creating Complex and Custom Folders
.....................................................................................................................................................

Join Expressions

Equijoins: Emp.deptno = Dept.deptno


Nonequijoins: salary >= losal and salary<=
hisal
Expressions use items, not calculations or literals.
Tip: Joins on most calculated items do not use
indexes.

Copyright Oracle Corporation, 2001. All rights reserved.

Join Expressions
To allow a greater variety of ways to join folders, Discoverer uses join expressions
rather than simple primary or foreign key constraints. You can use the greater than (>)
and less than (<) operators, as well as the equal (=) sign, to combine columns.
Tips
You can hide items in joins so that end users do not see them but can still make use

ly
of joined folders.
You can create a join only between items; functions or literals cannot be used in
On
e
joins. The way around this is to create calculated items that include the functions
or literals that you want, and then specify these items in the join.
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
5-6 Oracle iDS: Discoverer for Administrators
Using Joins
.....................................................................................................................................................

Creating a New Join

Copyright Oracle Corporation, 2001. All rights reserved.

Creating a New Join


There are several ways to create a new join:
Select Insert>Join from the menu bar. The New Join dialog box is displayed.
Click the New Join icon on the toolbar. The New Join dialog box is displayed.
Select the primary key item in the master folder and select New Join from the right
mouse menu. The New Join dialog box is displayed.

New Join Dialog Box Components The New Join dialog box components are
nly
described as follows:
e O
Master Folder: Select the master folder from the pull-down list of items.
Us
Operator: Select an equijoin operator or nonequijoin operator.

AI
O
Detail Folder: Select the detail item (foreign key) by selecting the folder and then

&
selecting the detail item.

al
Multi-Item: Used to create a join condition where more than one item needs to be

rn
joined to satisfy the criteria.

e
Int
Options: Displays a dialog box that you can use to specify different types of joins.
Note: End users cannot create joins. However, if more than one join exists between

le
two folders, end users can select the particular join that they want to use.
c
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 5-7
Lesson 5: Creating Complex and Custom Folders
.....................................................................................................................................................

Creating a Multi-Item Join

Copyright Oracle Corporation, 2001. All rights reserved.

Creating a Multi-Item Join


To create a multiple-item join, follow these steps:
1 Click Add to add another join criteria in the New Multi-Item Join dialog box.
2 Select the master item, detail item, and operator for the new join row.
3 (Optional) Click Options to apply an outer join condition.
4 When you finish, click OK to create the join. The new join appears in the list of
items in each folder.
nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
5-8 Oracle iDS: Discoverer for Administrators
Using Joins
.....................................................................................................................................................

Join Options

Copyright Oracle Corporation, 2001. All rights reserved.

Join Options
Use the Join Options dialog box to define outer join conditions. To access the dialog
box, click Options in the New Join dialog box. These options are discussed on the
following pages.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 5-9
Lesson 5: Creating Complex and Custom Folders
.....................................................................................................................................................

Join Options: Outer Join on Detail

Allow master rows with no detail:

EMP_HIST
DEPT Emp Id
Dept Id Last Name
Name Title
Location Salary
Sec Level Dept Id

Departments exist that do not have employees.


Classic outer join on EMP_HIST
Affects the number of rows returned

Dept.Dept
Dept.Dept Id
Id == Emp_Hist.Dept_Id
Emp_Hist.Dept_Id (+)
(+)
Copyright Oracle Corporation, 2001. All rights reserved.

Join Options: Outer Join on Detail


Selecting the Outer join on detail option creates an outer join. It returns all master
rows that have no corresponding detail items, plus all matching master and detail
rows.

Demonstration
Using SQL*Plus, create a query joining Dept and Emp_Hist, without an outer join
on Emp_Hist.
nly
SELECT dept.dept_id, name, emp_id, last_name
e O
FROM Dept, Emp_hist

Us
WHERE dept.dept_id=emp_hist.dept_id

AI
O
Next, show the same query with an outer join on Emp_Hist.

&
SELECT dept.dept_id, name, emp_id, last_name
FROM

al
Dept, Emp_hist
WHERE

ern dept.dept_id =emp_hist.dept_id (+)

Int
cle
ra
O

.....................................................................................................................................................
5-10 Oracle iDS: Discoverer for Administrators
Using Joins
.....................................................................................................................................................

Join Options: Outer Join on Master

Allow detail rows with no master (requires that


detail foreign key can have Null values):
EMP_HIST
DEPT Emp Id
Dept Id Last Name
Name Title
Location Salary
Sec Level Dept Id

Employees exist that are not in a department.


Outer join on DEPT
Affects the number of rows returned
Dept.Dept_Id (+) = Emp_Hist.Dept_Id
Copyright Oracle Corporation, 2001. All rights reserved.

Join Options: Outer Join on Master


Selecting the Outer join on master option creates an outer join that returns all detail
rows that have no corresponding master, plus all matching detail and master rows.
This construct is fairly rare in schemas.
Note: To enable the Outer join on master option, you must first select the Detail

ly
foreign key can have null values option. Selecting this option populates the Detail

n
item values attribute in the Join Properties dialog box with Might not exist in Master

O
folder.

Demonstration
se
Using SQL*Plus, create a query joining Dept and Emp_Hist without an outer join
I U
on Dept.
OA
&
SELECT dept.dept_id, name, emp_id, last_name
FROM

al Dept, Emp_hist
WHERE

ern dept.dept_id=emp_hist.dept_id

t
Next, show the same query with an outer join on Dept.

In
SELECT dept.dept_id, name, emp_id, last_name

cleFROM Dept, Emp_hist

a
WHERE dept.dept_id (+)=emp_hist.dept_id

Or

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 5-11
Lesson 5: Creating Complex and Custom Folders
.....................................................................................................................................................

Join Options: Detail Foreign Key


Can Have Null Values
Detail foreign key can have Null values:

EMP_HIST
DEPT Emp Id
Dept Id Last Name
Name Title
Location Salary
Sec Level Dept Id

Employees exist that are not in a department.


Queries ignore employees with no DEPT (no
outer join)
Does not affect the number of rows returned
Affects summary redirection
Copyright Oracle Corporation, 2001. All rights reserved.

Join Options: Detail Foreign Key Can Have Null Values


The Detail foreign key can have Null values option should be used only on rare
occasions. Usually foreign keys have values and are mandatory columns in the
database. Note that this option will have no effect unless summary folders exist that
also use the join.
Note
You must select this option to enable the Outer join on master option, because
nly
O
choosing the Detail foreign key can have Null values option implies that the
foreign key column contains some null values, or contains values that do not match
se
U
a primary key value.
Selecting this option has no effect on SQL generation, but it is required in some
AI
O
special circumstances (described later) to determine when Discoverer can use

&
summary tables.

al
ern
Int
cle
ra
O

.....................................................................................................................................................
5-12 Oracle iDS: Discoverer for Administrators
Using Joins
.....................................................................................................................................................

Join Options: Detail Foreign Key


Can Have Null Values
Detail foreign key can have Null values:

EMP_HIST
DEPT Emp Id EmpSummary
Dept Id Last Name Name
Name Title Title
Location Salary SUM(Salary)
Sec Level Dept Id

Query on Title, SUM(Salary) will not use summary.


Query on Name, Title, SUM(Salary) will use
summary.
Copyright Oracle Corporation, 2001. All rights reserved.

Join Options: Detail Foreign Key Can Have Null Values (continued)
Selecting the Detail foreign key can have Null values option has an effect only when
all of the following conditions are satisfied:
You have created a summary folder that contains items from both Emp and Dept.
and
Emp and Dept are joined with the Detail foreign key can have Null values option
and
nly
A user issues a query that requires items only from the Emp folder.

e O
s
In this scenario, the summary table will not be used to satisfy the query because there
is no guarantee that the row set is the same in both cases.
I U
OA
l &
rna
nte
e I
cl
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 5-13
Lesson 5: Creating Complex and Custom Folders
.....................................................................................................................................................

Join Options: One-to-One

One-to-one join relationship:

EMP_HIST
DEPT Emp Id
Dept Id Last Name
Name Title
Location Salary
Sec Level Dept Id

An employee can belong to only one department.


A department has only one employee.
Affects Invalid Join Configuration detection
Does not affect SQL generation

Copyright Oracle Corporation, 2001. All rights reserved.

One-to-One Join Relationship Between Master and Detail


Selecting the One-to-one join relationship between master and detail option creates
a one-to-one relationship instead of a one-to-many relationship between the master
and detail table. There is no real master and detail in this case, because there is only
one row in each table.
This type of join is unusual, but it does occur in schemas occasionally. This option has

ly
no effect on the SQL that Discoverer generates, because SQL does not know about the
cardinality of joins. It affects only the fan-trap detection (discussed later), because true
one-to-one joins do not result in Cartesian products. It does allow you to query a
On
master with multiple detail folders, provided all but one of the detail folders are joined
se
with one-to-one joins.
I U
OA
l &
rna
nte
e I
cl
ra
O

.....................................................................................................................................................
5-14 Oracle iDS: Discoverer for Administrators
Using Joins
.....................................................................................................................................................

Managing Join Relationships


Double-click for properties
Right-click for edit

Copyright Oracle Corporation, 2001. All rights reserved.

Managing Join Relationships


During the load process, you can choose to create joins automatically. You can view
and modify these relationships, as desired. Master folder items used in joins are
identified in the Data tab as bold, and detail folder items are italicized. The join
relationship is displayed in both the master folder and the detail folder.
1 Open the folder containing the join relationship. By default, the name of the master

ly
table in a join relationship is listed first. For example, in the join Products>Sales
Facts, Products is the master folder and Sales Facts is the detail folder.
2 Double-click the join icon to display its properties.
On
se
Modifying a Join Relationship
I U
A
To edit an existing join relationship, click the General tab in the Join Properties dialog
box, and double-click the Formula property value. The Edit Join dialog box is
displayed. You can use this dialog box to make any changes.
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 5-15
Lesson 5: Creating Complex and Custom Folders
.....................................................................................................................................................

Joins: Fan Traps


department

employees locations

A fan trap is an invalid join configuration


in which a master folder has two separately joined
detail folders.
By default, Discoverer prevents users from querying a
Cartesian product.
End users can disable fan-trap detection.

Copyright Oracle Corporation, 2001. All rights reserved.

Joins: Fan Traps


If a user tries to query a schema such as the one shown here may have unexpected
result sets.
Every query generated by Discoverer is interrogated. Discoverer will detect a fan-trap
and rewrite the query to ensure that the correct result set is generated.
Discoverers solution requires no data model changes or semantic layer modifications

ly
to implement. Once installed, users queries will automatically be rewritten.

On
se
I U
OA
l &
rna
nte
e I
cl
ra
O

.....................................................................................................................................................
5-16 Oracle iDS: Discoverer for Administrators
Using Joins
.....................................................................................................................................................

Example of a Fan Trap

EMP DEPT LOCATION

Ename Dept Id Salary Dept Id Name Location Dept Id


CLARK 10 2450 10 Accounting London 10
KING 10 5000 20 Research San Francisco 10
MILLER 10 1300 Paris 20
SCOTT 20 3000 Munich 20

emp.dept_id = dept.dept_id department

location.dept_id = dept.dept_id employees locations

Copyright Oracle Corporation, 2001. All rights reserved.

Example of a Fan Trap


The schema shown here has a master table (DEPT) and two detail tables (EMP and
LOCATION). A department can have multiple employees and can be base in multiple
locations. EMP and LOCATION are not directly related.
Consider the following SQL query (in SQL*Plus), which includes all three tables:

ly
select L.location, D.dept_id, count (E.ename), sum (E.sal)

n
from emp E, dept D, location L
where D.dept_id = E.dept_id AND D.dept_id = L.dept_id

e O
s
group by L.location, D.dept.id;
This query would return the following rows:
I U
A
LOCATION DEPT ID COUNT (E. NAME) SUM (E. SAL)
London 10 3

& O 8750

l
San Francisco 10 3 8750
Paris

rna
Munich
20
20
1
1
3000
3000

nte
I
Notice that the total number of employees returned is eight even though there are only

e
l
four employees. This occurs because the query resulted in a Cartesian product, which
c
a
is not the result that you want. To prevent querying a Cartesian product, Discoverer

Or
disallows this sort of query.
As administrator, you can avoid this situation by setting up one-to-one joins or by
creating complex folders. However, users can turn off fan-trap detection in Discoverer
Plus.

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 5-17
Lesson 5: Creating Complex and Custom Folders
.....................................................................................................................................................

Detection of Fan Traps and


Multiple Join Paths in Discoverer Plus

Copyright Oracle Corporation, 2001. All rights reserved.

Detection of Fan Traps and Multiple Join Paths in Discoverer Plus

Disable Fan-Trap Detection By default, fan-trap detection and prevention is


enabled in Discoverer Plus. End users can disable fan-trap detection through the
Advanced tab in the Options dialog box in Discoverer Plus.

Disable Multiple Join Path Detection By default, if more than one join definition

ly
exists between two folders, end users can choose to always use the default join or
select from a list of joins created by the administrator. To disable this feature, end
users can select the Disable multiple join path detection check box in the Advanced
On
tab in the Options dialog box in Discoverer Plus.
se
I U
OA
l &
rna
nte
e I
cl
ra
O

.....................................................................................................................................................
5-18 Oracle iDS: Discoverer for Administrators
Using Complex Folders
.....................................................................................................................................................

Using Complex Folders

Complex Folders

Are result sets like queries or views


Can be built from one or more existing folders or
from a custom folder
Are often used to join multiple tables
Contain items that map to items in source folders
Can be nested to any depth
Allow nested aggregates
Inherit item formulas

Copyright Oracle Corporation, 2001. All rights reserved.

Complex Folders
A complex folder is like a viewit is based on one or more folders, which in turn may
be simple, complex, or custom folders. Often complex folders are used to provide
joined views of data from two or more simple folders.

ly
For two items from different folders to belong to a complex folder, a join condition

n
must exist between the two folders.

Why Create Complex Folders?


e O
Complex folders simplify the users view of the data model by combining data without
Us
the administrators having to create physical views in the database. For example,
AI
O
creating a folder called Dept-Emp, which combines columns from the DEPT and EMP

&
tables, enables a user to select from one folder rather than two and hides the actual

l
relational joins from the user.
a
ern
Why Nest Complex Folders?

Int
Complex folders are primarily used to prejoin multiple folders. However, all new

e
folders that you create in Discoverer automatically become complex folders, even if

cl
they are based on a single folder. The exception is when a folder is copied.

ra
There are some situations where this is really useful, for example, to create aggregate

O
derived items (calculations created in a complex folder that aggregate items in one or
more folders) and nested aggregates. In fact, this is the only way to create these
constructs, and they can be very powerful in data analysis.

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 5-19
Lesson 5: Creating Complex and Custom Folders
.....................................................................................................................................................

Complex Folders from Source Folders

Video Stores schema containing multiple folders

Products Stores Time


Product Id Store Day
Description City Month
Type Region Quarter
Category Year
Department

Sales Fact
Dollar Sales
Dollar Profit
Customer Count

Copyright Oracle Corporation, 2001. All rights reserved.

Complex Folders from Source Folders


In this Video Stores sample schema, a user has to select items from multiple folders.
Most users prefer to select items from a single folder that contains all the items
needed. You can create a complex folder that combines all the items within a single
schema. After creating the complex folder, you can hide the original folder so that
your users can select only from the complex folder.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
5-20 Oracle iDS: Discoverer for Administrators
Using Complex Folders
.....................................................................................................................................................

More About Complex Folders

Sales Analysis Advantages:


Product Id
Product Description
Hide joins
Product Type Simplify structure
Product Category for the user
Department
Store Requirements:
City
Always force the
Region
Day join between
Month source folders
Quarter Require more
Year
Sales
summary space to
Profit hold axis items
Customer Count
Copyright Oracle Corporation, 2001. All rights reserved.

More About Complex Folders


The complex folder shown here contains all the items in the Video Stores schema. All
the rows are prejoined so that the users query always returns the correct result set.
It is important to consider what the result set of the complex folder represents. In this
case, there will be one row in the complex folder for every single sale in the FACT
table, and each row will show all the information about that particular sale from all the

ly
dimension tables. Users can then query and analyze by any item.
There are advantages and disadvantages to using complex folders. Whether a complex
O
folder is useful in any given case depends on the requirements of your users. If ease ofn
use is important, consider using complex folders.
se
I U
OA
l &
rna
nte
e I
cl
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 5-21
Lesson 5: Creating Complex and Custom Folders
.....................................................................................................................................................

More Reasons for Using Complex Folders

Easier than using database views


No need to know SQL
No need to modify the database schema, grants,
and so on
Provide data security and restrictions in addition
to the underlying database security

Copyright Oracle Corporation, 2001. All rights reserved.

Complex Folders Versus Views


The result set of any complex folder could also be produced by a database view. There
are many advantages to using complex folders rather than views, the main one being
that often the Discoverer administrator does not have database privileges to create
views in the schema of the application system.
Creating complex folders has no effect on the physical schema, so they are very safe to

ly
use. Views are also complicated to maintain, requiring grants, synonyms, and so on.
Complex folders are managed entirely within Discoverer and thus do not require any
SQL expertise.
On
se
I U
OA
l &
rna
nte
e I
cl
ra
O

.....................................................................................................................................................
5-22 Oracle iDS: Discoverer for Administrators
Using Complex Folders
.....................................................................................................................................................

Creating a Complex Folder


1. Create a new folder.
2. Drag desired items from existing folders into the
new folder.
3. Give the new folder a unique name.

Copyright Oracle Corporation, 2001. All rights reserved.

Creating the Complex Folder


You create a complex folder by first making a new folder and then placing items from
other folders into it.
Select a business area and then select Insert>Folder>New from the menu bar.
A new folder named NewFolder1 is displayed.
Drag the desired items to the new folder.
Double-click the new folder and enter a new name in the Name field.
nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 5-23
Lesson 5: Creating Complex and Custom Folders
.....................................................................................................................................................

Assigning Items to Complex Folders

Copyright Oracle Corporation, 2001. All rights reserved.

Assigning Items to Complex Folders


The easiest way to add items to a complex folder is to open two work area windows
and then drag the desired items from the folder in one window to the folder in the
second window.
Discoverer displays an alert when an item from a new source folder is assigned to a
complex folder and a join relationship does not exist between existing items already

ly
assigned in the complex folder.
Note: Folders represent row sets. If you apply a mandatory condition to a folder, then
its row set is changed and any complex folder built using this folder works from the
On
se
restricted row set of the source folder. If you later remove the condition, the change is
reflected in the complex folder.
I U
Copying Items Versus Assigning Items When you drag an item to a complex
OA
&
folder, the formula of the source item is inherited by the new item. The new item is

al
treated in all respects as a completely separate item, except that its formula references

rn
the item in the original folder. Any changes made to the formula in the source item are

e
t
reflected in the referenced item.

In
cle
ra
O

.....................................................................................................................................................
5-24 Oracle iDS: Discoverer for Administrators
Using Custom Folders
.....................................................................................................................................................

Using Custom Folders

Custom Folders

Are based on arbitrary SQL


statements entered directly
Are represented by a different
icon
Can be used as source folders
for creating complex folders

Copyright Oracle Corporation, 2001. All rights reserved.

Custom Folders
Folders represent a result set of data, much like a database view. Simple and complex
folders refer to SQL statements that are stored in the End User Layer.
You can use the Discoverer custom folder feature to create a folder based on arbitrary
SQL statements that are manually entered directly against the underlying database.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 5-25
Lesson 5: Creating Complex and Custom Folders
.....................................................................................................................................................

SQL Objects Supported


in Custom Folders

Set operators (UNION, MINUS, INTERSECT)


CONNECT BY clause
Synonyms
Subqueries
Optimizer hints
Conditions and derived items

Copyright Oracle Corporation, 2001. All rights reserved.

SQL Objects Supported in Custom Folders


The following elements are not supported in custom folders:
Parameterized folder definitions
Set operators for Open Database Connectivity (ODBC) data sources
Aggregates and DISTINCT keywords for ODBC data sources

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
5-26 Oracle iDS: Discoverer for Administrators
Using Custom Folders
.....................................................................................................................................................

Creating a Custom Folder

4
3 5

Copyright Oracle Corporation, 2001. All rights reserved.

Creating a Custom Folder

Invoking the Custom Folder Window There are two ways to display the Custom
Folder window:
Select Insert>Folder>Custom from the menu bar.
Select the business area in the Data tab. Select New Custom Folder from the right

ly
mouse menu.

How to Create a Custom Folder To create a custom folder, follow these steps:
On
1 Open the Custom Folder window.
se
2 Enter the desired SQL statements in the window.

I U
OA
3 Click Validate SQL. A message window is displayed. If the statement is invalid,
click OK to close the prompt, correct the statement, and click Validate SQL again.
If the statement is valid, then click OK to continue.
l &
rna
4 Enter a meaningful name for the folder in the Name field.

e
5 Click OK.

Int
cle
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 5-27
Lesson 5: Creating Complex and Custom Folders
.....................................................................................................................................................

Similarities in Simple and


Custom Folders
Delete and hide items
Delete and hide the folder
Format items
Are source for complex folders
Apply item classes
Apply hierarchies
Define joins between other folders

Copyright Oracle Corporation, 2001. All rights reserved.

Similarities in Simple and Custom Folders


Simple folders are based on a single table (or view), whereas custom folders are based
on a SQL statement created by the administrator.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
5-28 Oracle iDS: Discoverer for Administrators
Using Custom Folders
.....................................................................................................................................................

Custom Folder Differences

A custom folder validates the SQL statement when


properties are changed.
Invalid SQL statements can be saved and
validated later.
A custom folder does not have the following
properties:
Database
Owner
Optimizer hints
Database column item property

Copyright Oracle Corporation, 2001. All rights reserved.

Custom Folder Differences


There are situations where the administrator may want to create a custom folder
containing an invalid SQL statement. Custom folders that are invalid are not available
to end users. The administrator can choose to validate the folder at any time by
selecting View>Validate Folders from the menu bar. If the folder remains invalid, a
database error is displayed beside the custom folder name in the Data tab.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 5-29
Lesson 5: Creating Complex and Custom Folders
.....................................................................................................................................................

Editing a Custom Folder

Copyright Oracle Corporation, 2001. All rights reserved.

Editing a Custom Folder


The Edit Custom Folder window is a multiline text editor that supports the following
elements:
Standard cut, copy, and paste tools
Character formatting
Comments in the form /*. . .*/

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
5-30 Oracle iDS: Discoverer for Administrators
Using Custom Folders
.....................................................................................................................................................

Custom LOVs

Can be created using custom folders


Do not require a lookup table
Can contain a custom list of values

Example

SELECT M gender FROM dual


UNION
SELECT F gender FROM dual;

Copyright Oracle Corporation, 2001. All rights reserved.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 5-31
Lesson 5: Creating Complex and Custom Folders
.....................................................................................................................................................

Summary

Summary

In this lesson, you should have learned how to:


Create and manage join relationships
Create and manage complex folders
Create and manage custom folders

Copyright Oracle Corporation, 2001. All rights reserved.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
5-32 Oracle iDS: Discoverer for Administrators
Practice 5-1 Overview
.....................................................................................................................................................

Practice 5-1 Overview

Practice 5-1 Overview

This practice covers the following topics:


Creating a multi-item nonequijoin
Creating an equijoin
Creating complex folders
Creating custom folders
Creating a custom LOV

Copyright Oracle Corporation, 2001. All rights reserved.

Practice 5-1 Overview


In this practice, you create new complex folders in the Video Stores and Human
Resources business areas by copying from the simple folders into the complex folders.
You will create a multi-item join and an equijoin You will also create a custom folder
and custom LOV.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 5-33
Lesson 5: Creating Complex and Custom Folders
.....................................................................................................................................................

Practice 5-1
1 Launch the Administration Edition and open the Video Stores business area and
the Human Resources business area, if they are not already opened.
2 In the Human Resources business area, create a multiple item nonequijoin named
Multi-join Salgrade>Emp that joins the Losal and Hisal items in the Salgrade
folder to the Salary item in the Emp folder. Create the join so that Salary is greater
than or equal to Losal and less than or equal to Hisal and give it a meaningful
description, such as Emp.Salary <= Salgrade.Hisal.
3 In the Human Resources business area, create a complex folder named
Employment Records, and give it the description Employee records with row-
level security.
Hints: Use the Property dialog box to enter a description.
4 Add the following items to the Employment Records folder:

Folder Source Items


Emp Emp ID
Last Name
First Name
Job
Mgr
Hiredate
Salary
Comm

5 In the Video Stores business area, create a complex folder named Video Analysis
nly
O
and give it the description Video Analysis Information.
6 Add the following items to the Video Analysis folder:

se
Folder Source Items
I U
Sales Facts Sales, Unit Sales, Cost, Profit
OA
&
Products Department
Stores
al Region, City, Store Name
Times

ern Transaction Date, Year

nt
7 Create a complex folder named Store and Sales Details and give it the description
I
e
Detail information on each sale and store.

cl
8 Add the following items to the Store and Sales Details folder:

ra
O

.....................................................................................................................................................
5-34 Oracle iDS: Discoverer for Administrators
Practice 5-1 Overview
.....................................................................................................................................................

Practice 5-1 (continued)


Folder Source Items
Sales Facts Profit
Products Department, Product Category, Description, Full Description
Stores Region, City, Store Name, Reports, Floor Plan Type, Store Size
Times Transaction Date

9 In the Human Resources business area, duplicate the Emp folder and keep the
default folder name of Emp1. Change the name and heading of the Emp Id item to
Manager Id, and the name and heading of the Mgr item to Manager.
10 Create a complex folder in the Human Resources area using the following
parameters:
a Name the folder Corporate Employees.
b Give it the description Employment information available to all employees.
c Add the Emp Id, Last Name, First Name, Job, and Mgr items from the Emp
folder to the new folder.
d Add the Manager Id and Manager items from the Emp1 folder to the new
folder. Why did the copy fail?
11 Create a new equijoin between the Manager Id item in the Emp1 folder and the
Mgr item in the Emp folder. Name the join Emp1>Emp and accept the default
description. Allow null values in the detail row.
12 Add the Manager Id and Manager items from the Emp1 folder and the Name and
Location items from the Dept folder to the Corporate Employees folder.

ly
13 Change the Visible to User property to No for all simple folders in the Human
Resources business area and to Yes for Emp Id, Mgr and Manager Id items of
On
e
Corporate Employees folder.
14 Delete the mandatory Eastern Region condition from the Stores folder.
Us
15 Launch Discoverer Plus as oraxxb and do the following:

AI
O
a Verify that only the complex folders are visible in the Human Resources

&
business area.

al
b Create a table query that includes all items in the Corporate Employees folder.

rn
Are the Mgr and Manager Id items the same? Who is the president of the

e
t
company?

In
c Using the Video Stores business area, create a page-detail crosstab that

le
includes the Region, Department, Year, Profit SUM, and Sales SUM items from

c
a
the Video Analysis folder. Display Department as the page item and Region as

Or the side axis item.

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 5-35
Lesson 5: Creating Complex and Custom Folders
.....................................................................................................................................................

Practice 5-1 (continued)


d Save the workbook on your computer as workbook5-1.dis.
16 In the Administration Edition, make the following changes in the Human
Resources business area:
a Make the Mgr item in the Corporate Employees folder invisible to end users.
b Add to the Employment Records folder the Grade item from the Salgrade
folder and the Sec Level and Sec Dept(Sec Level) items from the Dept
folder.
c Create a row security condition in the Employment Records folder that
restricts the number of rows that can be seen in Discoverer Plus based on the
security level of the username. To do this, compare the results of
Sec_Dept(Sec Level) to Sec Level. Recall that Sec_Dept(Sec
Level) returns either zero or the value of Sec Level. Make the condition
mandatory and name it Security Condition.
Hint: Set Sec_Dept(Sec Level) = Sec Level.
d Make the Sec Level and Sec_Dept(Sec Level) items invisible to
end users.
17 Reconnect to Discoverer Plus as the EUL owner (oraxxa) and open a new
workbook. Create a new query that includes all the items in the Employment
Records folder. How many rows are returned? Why? Save the workbook on your
computer as Employee.dis.
18 Reconnect to Discoverer Plus as oraxxb. Create a new query that includes all the
items in the Employment Records folder. How many rows are returned? Why?

ly
19 In the Human Resources business area, create a custom folder named Pensioned
Employees as the UNION of the following common items in the Emp and
On
e
Emp_Hist folders. Note that JOB and TITLE are similar items.
Hint: Use SELECT col_name FROM table_name UNION.
Us
AI
O
VIDEOCUT.EMP VIDEOCUT.EMP_HIST

&
last_name last_name
first_name
al first_name
job

ern title

t
salary salary
dept_id
In dept_id

cle
ra
O

.....................................................................................................................................................
5-36 Oracle iDS: Discoverer for Administrators
Practice 5-1 Overview
.....................................................................................................................................................

Practice 5-1 (continued)


20 In the Human Resources business area, create a custom folder named Restricted
LOV and an item class by using the following parameters:
a Create a custom folder that contains a column named Titles with the following
four values: MANAGER, PRESIDENT, FACILITIES MANAGER, and
REGIONAL MANAGER. Name the folder Restricted LOV.
Hint: Use SELECT col_val col_name FROM DUAL UNION. Enter the job
titles in uppercase.
b Create an LOV item class on the Titles item and apply it to the Job item in the
Pensioned Employees folder. Name the item class Job Restriction.
c Retrieve the list of values for the Titles item in the Restricted LOV folder.
21 Create an optional condition on the Pensioned Employees folder that restricts Job
to the same list of values created in the Restricted LOV custom folder. Name the
condition Managers.
22 Reconnect to Discoverer Plus as oraxxb and test the Managers condition.
a Create a table query on the Pensioned Employees folder, selecting all items
except the Managers condition. How many job types are there? How many
employees are there?
Hint: Use Group Sort.
b Create a second query selecting all the items in the Pensioned Employees
folder, including the Managers condition.
c How many employees are managers?

ly
d Save the worksheet to a file, naming it Workbook5-2.dis.
23 Return to the Administration Edition and make the Managers condition mandatory.
24 Reconnect to Discoverer Plus as oraxxb, open the Workbook5-2.dis
On
workbook, and create a new query on all the items in the Pensioned Employees
se
folder. Notice that the Managers condition has been applied automatically.
I U
OA
l &
rna
nte
e I
cl
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 5-37
Lesson 5: Creating Complex and Custom Folders
.....................................................................................................................................................

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
5-38 Oracle iDS: Discoverer for Administrators
6
.................................

Creating Analytical
and Aggregate Items

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O
Lesson 6: Creating Analytical and Aggregate Items
.....................................................................................................................................................

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
6-2 Oracle iDS: Discoverer for Administrators
Objectives
.....................................................................................................................................................

Objectives

Objectives

After completing this lesson, you should be able to


do the following:
Create analytical items
Create aggregate items

Copyright Oracle Corporation, 2001. All rights reserved.

Lesson Aim
In this lesson, you learn how to create analytical and aggregate items.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 6-3
Lesson 6: Creating Analytical and Aggregate Items
.....................................................................................................................................................

Overview

Overview
Load business area*
Create item classes

Refine relational structure


Create drills
Create joins

Create calculated items


Create summary tables
Create conditions

Create complex folders


Maintain the EUL

Edit formatting properties


Grant access*
* Mandatory
Copyright Oracle Corporation, 2001. All rights reserved.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
6-4 Oracle iDS: Discoverer for Administrators
Analytical Functions
.....................................................................................................................................................

Analytical Functions

Requirement for Analytical Functions

Who are the top 10 sales reps in each region?


What is the 200-day moving average of stock
price?
What is the percentage growth of Jan-2000 sales
compared to Jan-1999?
What are Januarys sales as a percentage of the
entire years?
Show revenue as percentage of first years
revenue.

Copyright Oracle Corporation, 2001. All rights reserved.

Analytical Functions
Advanced analysis require high-end OLAP tools. SQL databases until now did not
provide such tools. High-end tools traditionally require data in their own proprietary
format such as Multi Dimensional Cubes.
Oracles Enhance SQL language provide greater analytical power from Oracle 8.1.6
and higher database. Discoverer provides support for these analytical functions.
nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 6-5
Lesson 6: Creating Analytical and Aggregate Items
.....................................................................................................................................................

Category of Analytical Functions

Ranking
Window aggregate
Lag and lead
Reporting aggregate
Statistical aggregate

Copyright Oracle Corporation, 2001. All rights reserved.

Categories of Analytical Functions

Ranking Functions A ranking function computes the rank of a record with respect
to other records in the dataset based on the values of a set of measures. Ranking
functions help to answer questions such as, Who are my top 10 customers?

Window Aggregate Functions Windowing functions compute cumulative, moving,


and centered aggregates. They return a value for each row in the table, which depends
nly
O
on other rows in the corresponding window. These functions are useful for getting

e
cumulative totals such as year -to-date sales figures or comparing sales over two years.

Us
I
Lag and Lead Functions The Lag and Lead functions are useful for comparing
values in different time periodsfor example March 1999 to March 2000.

OA
Reporting Aggregate Functions Reporting aggregate functions return the same
l &
a
aggregate value for every row in a partition. These functions include SUM, AVG,

rn
MIN, MAX, COUNT, STDEV, and VARIANCE. Reporting functions help to calculate

e
t
shares, such as market share for a product.

In
le
Statistical Aggregate Functions These functions compute covariance, correlation,

c
and linear regression. They can also be used as windowing and reporting functions.

ra
O

.....................................................................................................................................................
6-6 Oracle iDS: Discoverer for Administrators
Analytical Functions
.....................................................................................................................................................

Examples of Analytical Items

Copyright Oracle Corporation, 2001. All rights reserved.

Examples of Analytical Functions Items


These items are created just like any other calculated items. The functions are
available in the Analytic function group in Functions option. Items created using
analytical functions can be used by users in their workbooks, just like any other items.
Certain restriction apply to the items created using these functions:
Must be data points.
Must have Default Aggregation set to Detail.
nly
O
Must reference items in the current folder.
Cannot be used in a join.
se
Cannot be used in a mandatory condition.
I U
A
Cannot be used in a hierarchy.
Cannot have an item class.

& O
l
Cannot be dragged into a complex folder.

na
Cannot have further aggregation functions applied to them in Discoverer Plus.
r
nte
e I
cl
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 6-7
Lesson 6: Creating Analytical and Aggregate Items
.....................................................................................................................................................

Creating Aggregate Calculations

Administration Calculations

SUM(Sales)/SUM(Units). .
. . . . . . . . . . . . SUM(Sales/Units). . . . . . . .
. . . Monthly Sales Per Store
AVG(Monthly Sales per Store)

Copyright Oracle Corporation, 2001. All rights reserved.

Administration Calculations
When an end user creates a calculation that includes aggregate functions, such as SUM
or AVG, it is aggregated based on the axis items in the query.
However, when you create an aggregate calculation in the Administration Edition, you
do not know what axis items will be included in the end users query. Thus, you may
want to create calculations that allow users to select the number of rows to aggregate
nly
O
and calculations that are computed independently of the axis items selected by end

e
users.

Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
6-8 Oracle iDS: Discoverer for Administrators
Creating Aggregate Calculations
.....................................................................................................................................................

Using Aggregates in Calculations

Derived items
Aggregate calculations
Derived aggregates
Nested aggregates

Copyright Oracle Corporation, 2001. All rights reserved.

Using Aggregates in Calculations

Derived Items A derived item is a nonaggregate calculation that appears and acts
exactly like any other item in the folder. An example of a nonaggregate calculation is
Profit*Units Sold.

Aggregate Calculations If the formula of a new calculated item contains an

ly
aggregate or group function such as SUM, AVG, MAX, MIN, or COUNT, and the items it

example of an aggregate calculation is SUM(Profit). Note that the icon of the new
On
aggregates are in the current folder, the item is created as an aggregate calculation. An

item is displayed as a calculator.


se
I U
A
Derived Aggregates A derived aggregate is a calculation created in a complex

regardless of which complex folder items are selected by the user.


& O
folder that aggregates items in one or more of the source folders. It value is static,

al
ern
Nested Aggregates A nested aggregate is a combination of a derived item and an

t
aggregate item, combining static and dynamic aggregation into a single item. It

In
contains an inner static aggregation and an outer dynamic aggregation. Consider the

e
computation Average Monthly Sales per Store. The inner (static) calculation is the

cl
sum of sales, which is aggregated over Month, Store, and Department. The outer

ra
(dynamic) calculation is the Average. Its value is based on the axis items selected in

O
the complex folder, such as Region, Year, and so on.

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 6-9
Lesson 6: Creating Analytical and Aggregate Items
.....................................................................................................................................................

Derived Item Example

Total Salary = Sal*12+NVL(Comm, 0)

Copyright Oracle Corporation, 2001. All rights reserved.

Derived Item Example


Derived items can be axis items or data points and can be used anywhere that you
would use an ordinary item. They are static, in that their value depends only on the
value of the other items in the same row. When computed, the derived items will be
the same regardless of what other items are selected in the users query.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
6-10 Oracle iDS: Discoverer for Administrators
Creating Aggregate Calculations
.....................................................................................................................................................

Aggregate Calculation Example

Yearly Salary = SUM(Sal * 12)

Copyright Oracle Corporation, 2001. All rights reserved.

Aggregate Calculations

User-Defined Aggregate Calculations If an end user defines an aggregate


calculation, it is considered to be dynamicthat is, its value not only depends on the
value of the other items in the same row, but will change depending on what items are
selected in the users query.

ly
Administrator-Defined Aggregate Calculations Aggregate calculations defined in
the Administration Edition can be either static or dynamic, depending on the source
O
folder of the calculation. End users can define calculations based only on source foldern
items in a query.
se
I U
A
Aggregate Calculation Restrictions Unlike derived items, aggregate calculations
are restricted as follows:
Aggregate calculations must reference items in the current folder.
& O
al
Aggregate calculations cannot be used in a join, mandatory condition, or

rn
hierarchy, or have an item class.
e
nt
Aggregate calculations cannot be dragged into a complex folder.
I
e
The end user cannot apply further aggregation functions to aggregate calculations

cl
in the User Edition.

ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 6-11
Lesson 6: Creating Analytical and Aggregate Items
.....................................................................................................................................................

Derived Aggregate Example

Total Sales per Store = SUM(Video Analysis.Sales)

Copyright Oracle Corporation, 2001. All rights reserved.

Derived Aggregate Example


Derived aggregate items are calculations that are created in a complex folder that
aggregates items in the source folders. Derived aggregate items always affect the row
set of the source folder, because they cause the whole folder to be aggregated by all the
other axis items in the folder, even if the axis items are not used in a sheet.
Derived aggregate items behave like ordinary derived items and are used where there

ly
is a requirement to nest aggregate functions.
Note: When you create a calculation in a complex folder using an item from a
component folder, Discoverer displays a warning that a GROUP BY will be created for
On
the complex folder. Queries using any item in the complex folder will return results
se
using the GROUP BY. If this is your desired result, click Yes to create the calculation.
I U
If you want to create the calculation without affecting the other items in the folder,
copy the item from the source folder into the complex folder. Then use the new item to
OA
l
create the calculation.
&
rna
nte
e I
cl
ra
O

.....................................................................................................................................................
6-12 Oracle iDS: Discoverer for Administrators
Creating Aggregate Calculations
.....................................................................................................................................................

Nested Aggregate Example


Derived aggregate

Nested aggregate

Average Sales per Store = AVG(Sales in Store.Total Sales per


Store)
Copyright Oracle Corporation, 2001. All rights reserved.

Nested Aggregate Example


The complex folder Sales in Store contains a row for every store, for every year. The
derived aggregate Total Sales per Store shows the total sales for a given store in a
given year. The nested aggregate, Average Sales per Store item, is based on the
derived aggregate Total Sales per Store. The Average Sales per Store item shows the
average yearly sales and is calculated based on the axis items included in the users

ly
query.
Note: The Total Sales per Store item can be aggregated by the end user in a query. If
the user applies the AVG aggregate to Total Sales per Store, the computation is exactly
On
the same as selecting the Average Sales per Store item.
se
I U
OA
l &
rna
nte
e I
cl
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 6-13
Lesson 6: Creating Analytical and Aggregate Items
.....................................................................................................................................................

Nested Aggregates

AVG(SUM(x)
Dynamic Calculation
Fixed

Calculation can be a table column or a derived


item
Fixed aggregate defined by administrator
Outer aggregation level based on items chosen by
end users

Copyright Oracle Corporation, 2001. All rights reserved.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
6-14 Oracle iDS: Discoverer for Administrators
Creating Aggregate Calculations
.....................................................................................................................................................

Defining Aggregate Calculations


in the User Edition

Copyright Oracle Corporation, 2001. All rights reserved.

Defining Aggregate Calculations in the User Edition


Consider the calculation Profit Margin = SUM(Profit)/SUM(Sales). If an end user
defines this calculation, then it is considered to be a dynamic calculationthat is, the
return value not only depends on the value of the other items in the same row, but
changes depending on what items are selected in the users query.

Example 1 A query is created using the Video Analysis Information folder in the
Video Stores Tutorial that displays the Regional Profit Margin by year. The end user
nly
O
creates a query that includes the Region, Year, Profit, and Sales items and defines the
calculation Profit Margin = Profit SUM/Sales SUM.
se
Example 2 A query is created that displays the monthly profit margin by
I U
OA
department. The end user creates a query that includes the Department, Month, Profit,
and Sales items and defines the calculation Profit Margin = Profit SUM/Sales SUM.

l
The result is seen in the slide.
&
na
Profit Margin is computed differently because the number of rows specified for the

r
e
aggregation differ between Example 1 and Example 2. How do you define this type of

nt
calculation in the Administration Edition?
I
cle
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 6-15
Lesson 6: Creating Analytical and Aggregate Items
.....................................................................................................................................................

Defining Aggregate Calculations


in the Administration Edition

Copyright Oracle Corporation, 2001. All rights reserved.

Administrator-Defined Aggregate Calculations


Aggregate calculations, such as Profit Margin = SUM(Profit)/SUM(Sales), are
dynamic in that you do not know which additional items your end users want to
include in their query. As administrator, you may not want this calculation to be
dynamic. You can choose to define dynamic aggregate calculations or static derived-
aggregate calculations.

Calculated Items in the Work Area When an administrator defines an aggregate


nly
O
calculation based on items from the same folder as the aggregate item, the calculations
appear in the work area of the Data tab with a different symbol (icon) than the derived-
se
U
aggregate calculations. Items with an icon that display a calculator indicate that
additional aggregate functions cannot be applied by users in the User Edition.

AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
6-16 Oracle iDS: Discoverer for Administrators
Summary
.....................................................................................................................................................

Summary

Summary

In this lesson, you should have learned how to:


Create analytical function items
Create aggregate function items

Copyright Oracle Corporation, 2001. All rights reserved.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 6-17
Lesson 6: Creating Analytical and Aggregate Items
.....................................................................................................................................................

Practice 6-1 Overview

Practice 6-1 Overview

This practice covers the following topics:


Creating analytical function items
Creating aggregate calculations

Copyright Oracle Corporation, 2001. All rights reserved.

Practice 6-1 Overview


In this practice, you will create items with analytical functions and use them to create
workbooks. You will also create aggregate items.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
6-18 Oracle iDS: Discoverer for Administrators
Practice 6-1
.....................................................................................................................................................

Practice 6-1
1 In the Video Stores business area, create an analytical function item Rank Sales by
Year, Region that will rank cities in each Region for each Year based on the Sales
amount.
a Create the item in Video Analysis folder as:
RANK() OVER(PARTITION BY Video Analysis."Year",Video
Analysis.Region ORDER BY SUM(Video Analysis.Sales)
DESC )
2 Launch Discoverer Plus and connect as oraxxb and create the following reports:
a Create a Page-detail tabular workbook with the Year, Region, City, Sales
SUM, and Rank Sales by Year, Region from the Video Analysis folder.
MakeYear a Page item. Make a group sort on Region and sort Sales SUM in
descending order. Format Rank Sales by Year, Region item.
b Edit the above report and include Department.
c Save the workbook as Workbook6-1.dis.
3 In the Administration Edition, in the Video Stores business area, create an
analytical function item Cumulative Total that will calculate the cumulative total
of sales for each city in a region.
a Create the item in Video Analysis folder as:
SUM(SUM(Video Analysis .Sales)) OVER(PARTITION BY Video
Analysis ."Year",Video Analysis .Region ORDER BY
SUM(Video Analysis .Sales) DESC RANGE UNBOUNDED
PRECEDING ).
4 Launch Discoverer Plus and connect as oraxxb.
nly
a Open the workbook Workbook6-1.dis.

e O
s
b Create a Page-detail table worksheet with Year, Region, City, Sales SUM, and

U
I
Cumulative Total from the Video Analysis folder. Make Year a Page item.

A
Make a group sort on Region. Format Cumulative Total to currency.
5

& O
In the Administration Edition, in Video Stores business area, create the following

l
aggregate calculations:

na
a In the Video Analysis folder, create a new item that will compute the profit per

r
e
unit, SUM(Profit)/SUM(Unit Sales). Name it Administration

IntCalculation Profit Per Unit. What icon is displayed?

e
b Create the same calculation in the Video Analysis folder, but select the items

cl from the Sales Facts folder. Name it Derived Aggregate Profit Per Unit. What

ra icon is displayed?

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 6-19
Lesson 6: Creating Analytical and Aggregate Items
.....................................................................................................................................................

Practice 6-1 (continued)


Hints: When you are creating Derived Aggregates you will get a warning
message. Click Yes.
6 Reconnect to Discoverer Plus as oraxxb and create a new workbook for the
following queries that display the Profit Per Unit for each region by department
and by transaction date.
a Create a crosstab query that includes the Profit SUM , Unit Sales SUM,
Department, the East region, and Transaction Date items from the Video
Analysis folder, but create the calculation SUM(Profit)/SUM(Unit
Sales) in Discoverer Plus. Move Department and Region to page axis, and
place Transaction Date to side axis. Name the calculation as User
Calculation.
b Duplicate the query, adding the two administration calculations:
Administration Calculation Profit Per Unit and Aggregate Derived Profit Per
Unit. Format the calculated items.
c Compare the results of the different calculations in the queries.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
6-20 Oracle iDS: Discoverer for Administrators
7
.................................

Creating Drills

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O
Lesson 7: Creating Drills
.....................................................................................................................................................

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
7-2 Oracle iDS: Discoverer for Administrators
Objectives
.....................................................................................................................................................

Objectives

Objectives

After completing this lesson, you should be able to


do the following:
Describe drill facilities
Create an item hierarchy
Create a drill-to-detail item class
Create a hyperdrill plug-in
Create a date hierarchy
Create a nonstandard calendar
Use binary large objects (BLOBs)

Copyright Oracle Corporation, 2001. All rights reserved.

Lesson Aim
In this lesson, you learn how to create hierarchies that enable users to drill down on
data for more detail, drill up for summary data, and perform associated data drills. You
learn how to create date drills for drilling down over time periods. You will also learn
how to enable users to read binary large objects stored in the database.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 7-3
Lesson 7: Creating Drills
.....................................................................................................................................................

Overview

Overview
Load business area*

Create item classes


Refine relational structure

Create joins Create drills


Create calculated items

Create conditions Create summary tables


Create complex folders

Maintain the EUL


Edit formatting properties

Grant access*
* Mandatory

Copyright Oracle Corporation, 2001. All rights reserved.

Overview
As administrator, you can set up drills to help users navigate through their data. You
do not actually need to set up hierarchies for a user to perform a drill-down operation.
If you do, however, any items that are drillable are marked with the drill symbol in
Discoverer Plus, and the user can drill down with a single mouse click. Also, setting

ly
up date hierarchies makes it easy for the user to analyze information over time,
without having to know about date masks and date functions.
On
se
I U
OA
l &
rna
nte
e I
cl
ra
O

.....................................................................................................................................................
7-4 Oracle iDS: Discoverer for Administrators
Using Drills
.....................................................................................................................................................

Using Drills

Drill Facilities

In the User Edition, the user can:


Drill up or down through data
Drill to a related item
Drill to detail
Drill to an external application

Copyright Oracle Corporation, 2001. All rights reserved.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 7-5
Lesson 7: Creating Drills
.....................................................................................................................................................

Drill Facilities

The administrator defines the following:


Item-to-item drills (item hierarchies)
Date-to-date drills (date hierarchies)
Drill-to-detail item class (hyperdrills)
External application drills to external (hyperdrill
plug-ins)

Copyright Oracle Corporation, 2001. All rights reserved.

Drill Structures
The administrator can set up a number of different drill structures that enable users to
analyze their data more thoroughly. These structures are relationships that exist among
items in the End User Layer, enabling users to drill up or down through their data to
see a different level of detail. The different types of drill facilities are discussed in the
following slides.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
7-6 Oracle iDS: Discoverer for Administrators
Using Drills
.....................................................................................................................................................

Drilling Down for Detailed Data

Expand

Replace

Copyright Oracle Corporation, 2001. All rights reserved.

Drilling Down for Detailed Data

About Drilling Drilling is the ability to view information in a report at different


levels. When users view a report in Discoverer Plus, they can use the drill feature to
display more or less information. This is referred to as drilling up or drilling down.
You drill down to view more information and drill up to view less information. As the
Discoverer administrator, you define the drill relationships.

End-User Drilling Options You select the Options button to get the following
nly
available drill options:
e O
Expand: Adds the less aggregated information below the selected drill item
Us
item
AI
Replace: Replaces the currently selected drill item with the less aggregated drill

Current sheet: Displays the result in the same sheet


& O
al
New sheet: Displays the result in a new sheet

rn
Table: Displays the result as a table in case of a new sheet

e
Int
Crosstab: Displays the result as a crosstab in case of a new sheet

cle
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 7-7
Lesson 7: Creating Drills
.....................................................................................................................................................

Drilling to a Related Item

Expand Replace

Copyright Oracle Corporation, 2001. All rights reserved.

Drilling to a Related Item


Drilling to a related item is similar to drilling up or down. The difference is that a
related item is not part of the hierarchy relationship. A related item can be selected
from the current source folder but is not part of the current query or date hierarchy
structure. As the Discoverer administrator, you decide which items should be available
to users when they select a related item drill.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
7-8 Oracle iDS: Discoverer for Administrators
Using Drills
.....................................................................................................................................................

Filtering Drills

Filtered Unfiltered

Copyright Oracle Corporation, 2001. All rights reserved.

Filtering Drills
Users use the LOV that you create to drill on selected values of an item.

Filtered Drill You use a filtered drill to drill on a selected value of an item within a
single level. For example, you might drill down from the value Region Name: East to
City Name for the Eastern region only. Discoverer Plus rebuilds the output and
displays the city names for East region only.

nly
O
Unfiltered Drill An unfiltered drill enables you to drill on all values of an item

e
within the selected level. For example, you might drill down from Region Name to
City Name. Discoverer Plus rebuilds the output and displays the city names for every
Us
I
region.

OA
l &
rna
nte
e I
cl
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 7-9
Lesson 7: Creating Drills
.....................................................................................................................................................

Designing and Creating an Item Hierarchy

Designing an Item Hierarchy

Sales Region = West

State Name = Oregon

City Name = Portland

Copyright Oracle Corporation, 2001. All rights reserved.

Item Hierarchies
An item hierarchy is a fixed static structure that links multiple items in a chain to
denote a logical hierarchy, such as year to quarter, quarter to month, and month to day.
The items that compose the hierarchy can be from a single folder or from multiple
folders, provided the folders are joined.
When you drill down using an item hierarchy, you add the item to which you are
nly
drilling into the current sheet. You can also add a condition, depending on whether
you did a conditional drill, by clicking on an axis item. New data is returned for all the
e O
data points in the sheet and is aggregated at a lower level (the level of the added item).
Us
For example, if you are drilling down from region data to state data, new data is
AI
O
returned at the state level, not the region level. If you invoke the drill menu, and drill
down to City, you can drill into a new sheet or let City replace Region.

l &
a
Item hierarchies are exposed only on the axis items (not on data points). Users have

ern
the ability to toggle items between the axis and data points. However, an item

t
belonging to a hierarchy is not available for drilling if the user makes it a data point in
the query.
In
cle
ra
O

.....................................................................................................................................................
7-10 Oracle iDS: Discoverer for Administrators
Designing and Creating an Item Hierarchy
.....................................................................................................................................................

Creating an Item Hierarchy


by Using the Hierarchy Wizard

Copyright Oracle Corporation, 2001. All rights reserved.

Creating an Item Hierarchy by Using the Hierarchy Wizard

Invoking the Hierarchy Wizard You use the Hierarchy Wizard to build item or
date hierarchies. There are several ways to invoke the Hierarchy Wizard:
Select Insert>Hierarchy from the menu bar.
Select Create item and date hierarchies from the Administration Tasklist dialog

ly
box.
Click the Hierarchies tab in the work area, and then select New Hierarchy from the
right-mouse menu.
On
se
U
Creating an Item Hierarchy by Using the Wizard: Step 1 After you launch the

I
Hierarchy Wizard, your first step is to select the type of hierarchy that you want to
A
O
create: item or date. Click Next to continue.

l
Creating an Item Hierarchy by Using the Wizard: Step 2 The second step is to
&
na
select the items that you want to include in the hierarchy. You can use the following

r
e
components to move or group items within the hierarchy:

Int
Promote: Moves the selected item up one level in the hierarchy.

le
Demote: Moves the selected item down one level in the hierarchy.

c
a
Group: Places all selected items on the same level in the hierarchy. Grouping items

Or enables the user to drill to more items in the same level. For example, a user could
drill from City to Store Name and Floor Plan type.
Ungroup: Ungroups the selected items so that they are not grouped at the same
level in the hierarchy.

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 7-11
Lesson 7: Creating Drills
.....................................................................................................................................................

Creating an Item Hierarchy


by Using the Hierarchy Wizard

Discoverer
Plus Edition

Copyright Oracle Corporation, 2001. All rights reserved.

Creating an Item Hierarchy by Using the Hierarchy Wizard (continued)

Creating an Item Hierarchy by Using the Wizard: Step 3 The third step is to give
the hierarchy a name and, optionally, a description. Although the name of the
hierarchy is not seen by the end user, you can change the names that the user sees in
step 2 of the wizard. To complete the hierarchy definition, click Finish.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
7-12 Oracle iDS: Discoverer for Administrators
Designing and Creating an Item Hierarchy
.....................................................................................................................................................

Maintaining Item Hierarchies

Create a new hierarchy


Edit a hierarchy
Delete a hierarchy

Copyright Oracle Corporation, 2001. All rights reserved.

Grouping Items in the Same Level


To group items in the same level in the hierarchy, use the following steps:
1 Select the items that you want in the hierarchy.
2 In the selected box, select multiple items with the [Shift] key.
3 Click Group. This will place the items in the same level.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 7-13
Lesson 7: Creating Drills
.....................................................................................................................................................

Maintaining Item Hierarchies

Copyright Oracle Corporation, 2001. All rights reserved.

Placing Items in the Same Level


Items can be placed in the same level but not grouped. For example, City and Store
Name can both be under Region but not grouped. To create the hierarchy, drag Region
and then City from the left box to the right box. Then select Region in the right box
and drag Store Name from the left box. You will have City and Store Name under
Region. You can have lower levels of hierarchy from either of them. Users can then

ly
drill to any one of them.

On
se
I U
OA
l &
rna
nte
e I
cl
ra
O

.....................................................................................................................................................
7-14 Oracle iDS: Discoverer for Administrators
Creating a Drill to Detail
.....................................................................................................................................................

Creating a Drill to Detail

Using Drill to Detail

1998
SELECT year, state,
Tape CD Laser
product, SUM(order)
CA 420 450 424
FROM table_A,
OR 312 315 311
table_B ...
WA 354 3345 349

Ord_id State order CD_code

1234 CA 100 54-445


Double-click Table query
1235 CA 100 01-445 worksheet
1236 CA 100 99-445
1237 CA 150 90-445
01-Jan-95

SELECT * FROM table_A WHERE state=CA


AND product=CD AND year=1998;

Copyright Oracle Corporation, 2001. All rights reserved.

Using Hyperdrills
Users can drill to detail from an aggregated data item in a cross-tab report. The target
folder can be either the default folder or an associated folder. To do this, double-click a
cell. In this example, double-clicking the cell containing the 450 value launches the
Drill dialog box. Click OK in the Drill dialog box, and the results will contain all items

ly
in the current query plus the items from the default folder with the aggregate removed.
This drill requires no setup by the administrator.
On
e
Users drill to detail in associated folders by using the same Drill dialog box as a drill to

s
detail in the default folder. The user must choose from the list of associated folders
U
I
before clicking OK in the Drill dialog box. The results will contain all items from the
associated folder with the aggregate removed.

OA
l &
rna
nte
e I
cl
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 7-15
Lesson 7: Creating Drills
.....................................................................................................................................................

Drill to Detail: Default Folder

Creates a new tabular sheet


Options: Current sheet or
new sheet
Data source: Current sheet
Removes aggregates
and adds all other items

Default folder

Copyright Oracle Corporation, 2001. All rights reserved.

Drill to Detail: Default Folder


When a user selects Drill to Detail in Discoverer Plus, Discoverer looks up folders that
share Drill to Detail item classes with the items in the query. Those folders with the
most item classes in common are displayed at the top of the list.

Show Component Rows Option The Show components rows option is always
available and requires no additional setup. When a user selects this option, a new sheet
is built that queries the folders in the current sheet, applies a condition for each axis
nly
O
item in the selected row, and displays the data points without any aggregation.
You can display the new sheet as a tabular (default) or a cross-tab report, or you can
se
U
choose to display the new information in the current sheet rather than a new sheet.

AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
7-16 Oracle iDS: Discoverer for Administrators
Creating a Drill to Detail
.....................................................................................................................................................

Drill to Detail: Associated Folder

Creates a new tabular sheet


using new folder
New folder shares item
classes with current sheet
Ordered by the number
of Drill to Detail items in
common with the current
sheet
Uses Drill to Detail option Associated
in the Item Class wizard folders

Copyright Oracle Corporation, 2001. All rights reserved.

Drill to Detail: Associated Folders


Folders are associated by the items that share the same item classes, when the Drill to
Detail option is selected in the Item Class Wizard. When you select the Drill to Detail
option, no related folders appear unless you have previously defined item classes.
The new sheet is created with all the items in the selected folder and conditions
applied for all the item classes that it has in common with the original sheet.

ly
There are options to make the new sheet tabular (default) or cross-tab and an option to
include the information in the current sheet, rather than creating a new sheet.
On
e
You can use these drill-to-detail links for exploring data in a very interactive wayfor
example, moving from actuals to budgets for the same department, then looking at the
Us
I
department employee details, then drilling to their salary and training histories, then
drilling to the job grades structure, and so on.

OA
l &
rna
nte
e I
cl
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 7-17
Lesson 7: Creating Drills
.....................................................................................................................................................

Creating a Drill to Detail by Using


the Item Class Wizard

Copyright Oracle Corporation, 2001. All rights reserved.

Creating Hyperdrill (Drill to Detail) by Using the Wizard


To build a hyperdrill, launch the Item Class Wizard and follow these steps:
1 In the first step of the Item Class Wizard, select the Drill to detail option.
Optionally, select the List of values option to select the item that will generate
the list of values. Click Next to continue.
2 If you select the List of values option, the second step of the wizard prompts you

ly
to select the item that will generate the list of values. If you do not select the List
of values option, the second step of the wizard prompts you to select the items
that will use the item class.
On
Note: If you do not select the List of values option, you will need to apply the item
se
class to the specific items later.
I U
OA
l &
rna
nte
e I
cl
ra
O

.....................................................................................................................................................
7-18 Oracle iDS: Discoverer for Administrators
Creating a Drill to Detail
.....................................................................................................................................................

Creating a Drill to Detail by Using


the Item Class Wizard

Copyright Oracle Corporation, 2001. All rights reserved.

Creating a Hyperdrill (Drill to Detail) by Using the Wizard (continued)


3 In the third step of the Item Class Wizard, select the items that will use the new
item class.
4 In the fourth step of the Item Class Wizard, enter a name for the item class and
optionally provide a description.
In this example, the hyperdrill will allow drills from the Department item to any of the

ly
following folders: Products (detail folder), Video Analysis, and Store and Sales
Details (complex folders).
On
se
I U
OA
l &
rna
nte
e I
cl
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 7-19
Lesson 7: Creating Drills
.....................................................................................................................................................

Managing Drill to Detail Item Classes

Copyright Oracle Corporation, 2001. All rights reserved.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
7-20 Oracle iDS: Discoverer for Administrators
Creating a Drill to Detail
.....................................................................................................................................................

Editing a Drill to Detail Item Class

Copyright Oracle Corporation, 2001. All rights reserved.

Editing a Drill to Detail Item Class


Items that share an LOV may be used in a drill to detail by selecting the Use these
items in drill to detail check box in the Edit Item Class dialog box. The LOVs do not
need to be re-created.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 7-21
Lesson 7: Creating Drills
.....................................................................................................................................................

Using Hyperdrill Plug-Ins

About Hyperdrill Plug-Ins

Double-click

Copyright Oracle Corporation, 2001. All rights reserved.

Drilling to an External Application


Discoverer provides an extension to the drill to detail called a hyperdrill plug-in that
enables users to drill out to an external application. The application can be any desktop
application registered in the Windows registry, such as a word-processing document,

ly
spreadsheet, or Web browser. The application must be installed on the end users
machine, and the file type must be registered in the Windows registry. Each cell that
has an external drill contains an icon of the application that Windows will launch for
On
that file type.
se
I U
A
Drilling to an External Application for End Users To drill to an external

O
application, double-click the cell. The application is launched, displaying the contents

&
of the file.

al
ern
Int
cle
ra
O

.....................................................................................................................................................
7-22 Oracle iDS: Discoverer for Administrators
Using Hyperdrill Plug-Ins
.....................................................................................................................................................

Defining a Hyperdrill Plug-In

Item data type must be


VARCHAR or LONG RAW.
Item contains path and
application extension:
Example:
C:\DisAdm\HWOnline.htm
Application must be
on the client machine or
accessible by using a
constant network path.
Content type property
must be set to FILE or to an
application file extension.

Copyright Oracle Corporation, 2001. All rights reserved.

Defining a Hyperdrill Plug-In


The hyperdrill plug-in feature requires that filenames be recorded in the application
database or as derived items in the End User Layer. You can use the derived item
mechanism to change the reference to the physical location of the file easily by
concatenating a string containing the directory path with the filename.

Content Type Property You must set the Content type property of the item to one
of the following:
nly
FILE: Indicates that the column contains a filename.

e O
s
File extension: Indicates the application that should process the data. Examples of
supported file extensions are avi, wav, and jpg.
I U
A
The content type setting helps Discoverer recognize that an item is to be used for a
hyperdrill plug-in.

& O
l
The application that is launched when you drill out depends on the file extension and

rna
on access to the associated application on your system.

e
Note: If an item has a data type of VARCHAR, then the Content type property will

nt
contain the values None and FILE. If an item has a data type of LONG RAW, then the
I
Content type property will display None and a list of application file extensions.

cle
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 7-23
Lesson 7: Creating Drills
.....................................................................................................................................................

Creating the Date Hierarchy

Default Date Hierarchy

Copyright Oracle Corporation, 2001. All rights reserved.

Date Hierarchy Template


By using Date Hierarchy templates, you can create date hierarchies on date items.
Discoverer includes a default date hierarchy of year to quarter, quarter to month, and
month to day. The default date hierarchy template is applied to all Date columns when
the tables or views are loaded into the EUL and the default options are selected. You

ly
can select another Date Hierarchy template, if you have one, instead of the default
Date Hierarchy template.
On
e
When you create a new date hierarchy, Discoverer automatically creates an associated
template. An option in the Load Wizard allows you to select the default date hierarchy
Us
I
template supplied by Discoverer, or to select a custom-defined date hierarchy as the
default date hierarchy template.
When you assign a date item in a folder to a date hierarchy, or when you use the Load
OA
l
Wizard, a set of items is generated in the folder, one for each node in the date
&
na
hierarchy template. These items are calculations, using the EUL_DATE_TRUNC

r
e
function that truncates the date to the right amount of detail (Year, Quarter, Month,
Day).
Int
le
Date Hierarchy Dependencies
c
ra
Date hierarchies introduce dependencies in the EUL. For example, when you delete a

O
date hierarchy, the date items that were created from it are also deleted. If you delete
the date item on which a hierarchy is based, the generated date items and the items
date hierarchy are also deleted. When you edit a date hierarchy template, the
corresponding date hierarchies are regenerated.
You can view the dependencies of a data hierarchy in the Folder Properties dialog box
and by selecting the Impact option when you delete a hierarchy or dependent item.
.....................................................................................................................................................
7-24 Oracle iDS: Discoverer for Administrators
Creating the Date Hierarchy
.....................................................................................................................................................

Designing a Date Hierarchy

Month
Year Quarter
Week Day

Quarter
Year
Month Week

Week Day Hour Minute

Copyright Oracle Corporation, 2001. All rights reserved.

Designing a Date Hierarchy


Date drills enable users to summarize information by different date elements. You can
drill up or down to see lesser or greater detailed date formats.
For example, a group of users may want to create a report that displays sales
information according to order date. If the Order Date item has the format MON-
YYYY, sales information is summarized by month. However, suppose users want the

ly
sales information displayed by week instead. To do this, you must create a date drill
that includes the format WEEK-YYYY within the data drill structure.
When a date hierarchy is applied to a date column, a new date item is created for each
On
se
format mask in the hierarchy. For example, if the default date hierarchy is used, four
new date items are created using the appropriate format masks: YYYY, QQ, Mon,
I U
A
DD. As a result, the user is selecting the most appropriate format mask, as opposed to
selecting the date item and then changing the format mask.

& O
l
Discoverer uses the EUL_DATE_TRUNC function to create date items, so that,

rna
regardless of the level, the item retains its date data type. This means that you can then
use any date format mask that you like when displaying the date item, and the item

te
will sort correctly, without requiring an alternative sort.
n
e I
cl
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 7-25
Lesson 7: Creating Drills
.....................................................................................................................................................

Creating a Date Hierarchy

Copyright Oracle Corporation, 2001. All rights reserved.

Creating a Date Hierarchy


You use the Hierarchy Wizard to create a date hierarchy template. There are several
ways to display the Hierarchy Wizard:
Select Insert>Hierarchy from the menu bar.
Click the New Hierarchy icon on the toolbar.
Select Create item and date hierarchies from the Administration Tasklist.
Click the Hierarchies tab in the work area and select New Hierarchy from the right
nly
O
mouse menu.
Note: You use the Hierarchy Wizard to create either a date hierarchy or an item
se
U
hierarchy.

Creating a Date Hierarchy by Using the Wizard: Step 1


AI
&
After you launch the Hierarchy Wizard, your first step is to select the Date HierarchyO
l
option in the first screen of the wizard. Click Next to go to the next step.
a
ern
Int
cle
ra
O

.....................................................................................................................................................
7-26 Oracle iDS: Discoverer for Administrators
Creating the Date Hierarchy
.....................................................................................................................................................

Creating a Date Hierarchy

Copyright Oracle Corporation, 2001. All rights reserved.

Creating a Date Hierarchy by Using the Wizard: Step 2


The second step is to select each item that you want to include in the hierarchy and add
it to the selected items box. Use the Promote and Demote buttons to arrange the items
in the hierarchy. Enter a name for the hierarchy in the Name box. When you finish,
click Next to go to the next step.

Promoting and Demoting Items Use the Promote button to move a selected item
up one level in the hierarchy. Use the Demote button to move a selected item down
nly
O
one level in the hierarchy.

Formatting Date Items By default, Discoverer uses the item name as a label for
se
I U
each level in the hierarchy. To change this label, select the date item and enter a new

New Format. The New Date Format dialog box is displayed. Use this dialog box to
OA
label in the Name box. To change the default date format for a particular item, click

l
enter your own customized date formats.
&
rna
nte
e I
cl
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 7-27
Lesson 7: Creating Drills
.....................................................................................................................................................

Creating a Date Hierarchy

Copyright Oracle Corporation, 2001. All rights reserved.

Creating a Date Hierarchy by Using the Wizard: Step 3


The third step is to select the items that will use the date hierarchy. Add the desired
items and click Next to go to the next step.

Creating a Date Hierarchy by Using the Wizard: Step 4


In the fourth step, assign a name and useful description for the end user. Click Finish

ly
to complete the creation of the new date hierarchy. Click the Hierarchies tab in the

n
work area to view the new hierarchy. You can also specify that the date hierarchy be
used as the default date hierarchy by selecting the Set as default date hierarchy
check box.
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
7-28 Oracle iDS: Discoverer for Administrators
Creating the Date Hierarchy
.....................................................................................................................................................

Maintaining Date Hierarchies

Create a new hierarchy


Edit a hierarchy
Delete a hierarchy

Copyright Oracle Corporation, 2001. All rights reserved.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 7-29
Lesson 7: Creating Drills
.....................................................................................................................................................

Assigning a Date Hierarchy to an Item

Select a date item.


Display the Item
Properties dialog box.
Select the Date
hierarchy attribute.
Select a date hierarchy
template from the
pull-down list.

Copyright Oracle Corporation, 2001. All rights reserved.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
7-30 Oracle iDS: Discoverer for Administrators
Using a Nonstandard Calendar
.....................................................................................................................................................

Using a Nonstandard Calendar

Using a Nonstandard Calendar

Requirement:
Analyze sales by fiscal year, which begins in
June 1999 and ends in May 2000.

Qtr1, 00 Qtr2, 00 Qtr3, 00 Qtr4, 00

Jun99 Sep99 Dec99 Mar00


Jul99 Oct99 Jan00 Apr00
Aug99 Nov99 Feb00 May00

Copyright Oracle Corporation, 2001. All rights reserved.

Nonstandard Calendars
Many organizations use fiscal calendars rather than annual calendars. For example,
one common fiscal calendar starts in June and ends in May the following year. This
means that for you to produce financial reports by fiscal period, you must define a
hierarchy that drills from FY00 to Q1 to June, July, and August, where June 1999 is

ly
the first month in the year and is also in Q1. The last month in Q4 FY00 would be May
2000.
On
se
I U
OA
l &
rna
nte
e I
cl
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 7-31
Lesson 7: Creating Drills
.....................................................................................................................................................

Example of a Nonstandard Calendar


Transaction Date Fiscal Date
hierarchy items hierarchy items
1999 2000
Q2 Q1
JUN JAN
03-JUN-99 03-JAN-00

Nonstandard hierarchy items


2000
Q1
JUN
03-JUN-99

Copyright Oracle Corporation, 2001. All rights reserved.

Example of a Nonstandard Calendar


Consider the two date items Transaction Date and Fiscal Date (Transaction Date plus
seven months). By applying the default date hierarchy to both items, you can see how
a drill from year to quarter to month to day is created. The problem is that neither
hierarchy meets the requirements. What is needed is a new hierarchy that includes
items from both hierarchies as shown here.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
7-32 Oracle iDS: Discoverer for Administrators
Using a Nonstandard Calendar
.....................................................................................................................................................

Implementing a Nonstandard Calendar

Solution:
1. Create a calculated item:
Fiscal Date = Add_months(Transaction
Date,7)
2. Apply the default date hierarchy to the Fiscal Date.
3. Edit the Fiscal Date item hierarchy:
Fiscal Date FY YY
Fiscal Date Q Q
Transaction Date Mon
Transaction Date DD
4. Delete unwanted items from the
Fiscal Date hierarchy and
hide the Fiscal Date.

Copyright Oracle Corporation, 2001. All rights reserved.

Implementing a Nonstandard Calendar


This slide overviews the steps needed to create a nonstandard calendar. The slides on
the following pages illustrate how to implement a nonstandard date hierarchy by using
the Transaction Date item in the Video Stores business area and a new calculated item
called Fiscal Date.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 7-33
Lesson 7: Creating Drills
.....................................................................................................................................................

Implementing a Nonstandard Calendar


Step 1: Create a calculated item.

Step 2: Apply the default date


hierarchy to the Fiscal Date.

Copyright Oracle Corporation, 2001. All rights reserved.

Implementing a Nonstandard Calendar


The first step in implementing a nonstandard fiscal calendar is to create a calculated
date item that is shifted by the lag between the annual calendar and the fiscal
calendar. In this case, the annual calendar starts seven months after the fiscal one.
Second, you apply the default date hierarchy to the Fiscal Date hierarchy that you want
to use. In this case, the default date hierarchy is: Year>Quarter>Month>Day

ly
Applying the default date hierarchy to the Fiscal Date item generates four extra items:
Fiscal Date Year
On
Fiscal Date Quarter
se
U
Fiscal Date Month
Fiscal Date Day
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
7-34 Oracle iDS: Discoverer for Administrators
Using a Nonstandard Calendar
.....................................................................................................................................................

Implementing a Nonstandard Calendar


Step 3: Edit the Fiscal Date hierarchy.

Step 4: Delete unwanted


items and hide the Fiscal
Date item.

Copyright Oracle Corporation, 2001. All rights reserved.

Implementing a Nonstandard Calendar


To obtain the desired results, edit the Fiscal Date hierarchy, combining the Fiscal Date
Year and Quarter items with the Transaction Date Month and Day items. Next, you
can delete any unwanted items. In this example, the Transaction Date hierarchy has
been deleted.
Remember that this shows the fiscal year, fiscal quarter, annual month, and date for

ly
each order. Setting up the hierarchy simply enables users to drill between these items
easily.

On
se
I U
OA
l &
rna
nte
e I
cl
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 7-35
Lesson 7: Creating Drills
.....................................................................................................................................................

BLOB Support

BLOB Support

BLOBs are large binary


objects stored in the database.
The application associated with
the content type of an item is
launched.
The administrator specifies the
file extension in the Content
Type property of the item.
The user sees an application
icon and description.

Copyright Oracle Corporation, 2001. All rights reserved.

BLOB Support
When a user selected the drill, the appropriate application was launched, opening the
filename designated in the reference stored in the database.
Discoverer allows the actual data to be stored in the database, with a reference to the
application data type specified in the Content Type property of an item.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
7-36 Oracle iDS: Discoverer for Administrators
BLOB Support
.....................................................................................................................................................

BLOB Setup
Administrator Edition

User Edition

Copyright Oracle Corporation, 2001. All rights reserved.

BLOB Setup
To set up the workbook to view images, follow these steps.
In the Administrator Edition:
1 Create a folder and associate it to a database table with a BLOB column. The
image in the BLOB column should already be loaded in the database table.
2 In the image item Properties dialog box enter the content type for the image.
In Discoverer Plus:
nly
1 Create a worksheet with the image item.

e O
s
2 Select Tools>Options. In the General tab, associate the file type as image. Enter
the path for the viewer application.
I U
A
Note: Discoverer will remember the path if \ is present at the end.
Double-click the column with the image in the worksheet. The image should be

& O
l
displayed.

rna
nte
e I
cl
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 7-37
Lesson 7: Creating Drills
.....................................................................................................................................................

Summary

Summary

In this lesson, you should have learned how to:


Describe the drill facilities
Create and manage item and date hierarchies
Create and manage a drill-to-detail item class
Create a hyperdrill plug-in
Use BLOBs

Copyright Oracle Corporation, 2001. All rights reserved.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
7-38 Oracle iDS: Discoverer for Administrators
Practice 7-1 Overview
.....................................................................................................................................................

Practice 7-1 Overview

Practice 7-1 Overview

This practice covers the following topics:


Creating an item hierarchy
Creating a date hierarchy
Creating a drill-to-detail item class

Copyright Oracle Corporation, 2001. All rights reserved.

Practice 7-1 Overview


In this practice, you create geographical item hierarchies, a product item hierarchy,
and a date hierarchy. You apply the new date hierarchy to the Transaction Date item in
the Video Analysis folder and test the drills in Discoverer Plus.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 7-39
Lesson 7: Creating Drills
.....................................................................................................................................................

Practice 7-1
1 Create a geographical item hierarchy in the Video Analysis folder that enables
users to drill from Region to City to Store Name. Name the hierarchy Video
Analysis Geography.
2 Expand the Video Analysis Geography hierarchy in the Hierarchies tab in the
work area and edit the hierarchy as follows:
a Change Video Analysis.Region to Region.
b Change Video Analysis.City to City.
c Change Video Analysis.Store Name to Store Name.
3 Create a geographical item hierarchy in the Stores folder that enables users to drill
from Region to City to Store Name and Reports, where Store Name and Reports
are grouped. Name the hierarchy Store Geography.
4 Create an item hierarchy in the Products folder that enables users to drill from
Product Type to Department to Product Category to Description and Full
Description, where Description and Full Description are grouped. Name the
hierarchy Product Hierarchy.
5 Edit the Store Geography as follows:
a Change Stores.Region to Region.
b Change Stores.City to City.
c Change Stores.Store Name, Stores.Reports to Store Name, Reports.
6 Edit the Product Hierarchy as follows:
a Change Products.Product Type to Product Type.
b Change Products.Department to Department.

nly
O
c Change Products.Product Category to Product Category.
d Change Products.Description, Products.Full Description to Description, Full
se
U
Description.
7 Create a date hierarchy named Custom Date that drills from YYYY to QQ to
AI
O
Mon. Apply the Custom Date to the Hiredate item in the Employment Records

&
folder and to the Transaction Date item in the Video Analysis folder.
8
al
Change the Content Type property of the Full Description item in the Products

rn
folder and the Reports item in the Stores folder to FILE at the same time.

e
9

Int
Create a drill-to-detail item class that will allow drills from the Department item to
any of the following folders: Products, Video Analysis, and Store and Sales Detail.

le
Name the item class Department Item Class.
c
ra
O

.....................................................................................................................................................
7-40 Oracle iDS: Discoverer for Administrators
Practice 7-1
.....................................................................................................................................................

Practice 7-1 (continued)


10 Launch Discoverer Plus as oraxxb, and create queries to test the drills that you
created.
11 In the Video Store business area, create a nonstandard calendar based on the
Transaction Date item to analyze sales using a fiscal year that starts June 1999 and
ends May 2000. Name the calendar Fiscal Calendar.
Hints: Create a new calculated item called Fiscal Date that uses the
ADD_MONTHS functions. Apply a date hierarchy to the new item Fiscal Date.
Modify the hierarchy to include the Fiscal Year, Quarter, Transaction Month, Day
and Date. Delete the used date hierarchy items.
12 Reconnect in Discoverer Plus and create a query to test your new date drill.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 7-41
Lesson 7: Creating Drills
.....................................................................................................................................................

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
7-42 Oracle iDS: Discoverer for Administrators
8
.................................

Creating and Managing


Summary Folders

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O
Lesson 8: Creating and Managing Summary Folders
.....................................................................................................................................................

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
8-2 Oracle iDS: Discoverer for Administrators
Objectives
.....................................................................................................................................................

Objectives

Objectives

After completing this lesson, you should be able to


do the following:
Describe different types of summary management
Create summary folders by using EUL items
Create summary folders by using Query Statistics
Register external summary tables
Manage summary folders
Describe summary combination strategies

Copyright Oracle Corporation, 2001. All rights reserved.

Lesson Aim
In this lesson, you will learn about Discoverer summary tables and Materialized
Views. You will also learn how to create and manage summary folders manually and
efficiently, and how to access existing summary tables.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 8-3
Lesson 8: Creating and Managing Summary Folders
.....................................................................................................................................................

Overview

Overview
Load business area*

Create item classes


Refine relational structure

Create joins
Create drills
Create calculated items
Create conditions
Create summary tables
Create complex folders

Maintain the EUL


Edit formatting properties

Grant access*
* Mandatory

Copyright Oracle Corporation, 2001. All rights reserved.

Summary Management
Summary management is one of the most important features of Discoverer. When
used correctly, it can speed query response time significantly, resulting in queries that
take seconds rather than hours. Managing summaries is the key to good performance
with Discoverer implementations.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
8-4 Oracle iDS: Discoverer for Administrators
Summary Tables and Folders
.....................................................................................................................................................

Summary Tables and Folders

Summary Tables and Folders

Summary tables Summary folders


Contain Contain information
preaggregated and about the summary
prejoined data tables
Hold the results of Direct queries to run
frequently run queries against the summary
tables

Copyright Oracle Corporation, 2001. All rights reserved.

Summary Tables
Summary tables hold preaggregated and prejoined data. A query directed to a
summary table may return results in a few seconds, but that same query directed
against the base data tables may require a three- or four-table join and an aggregation
over thousands or millions of rows, which would take considerably longer. Both

ly
queries, however, would produce the same results. Summary tables are used to provide
a rapid response time for commonly run queries.
On
Summary Folders
se
Summary folders hold information about the summary tables and the EUL items that
I U
can use them. Summary folders improve performance by directing queries to run

OA
against the preaggregated and prejoined data of the summary tables. The process is

&
automatic from the end users viewthat is, to the user it is not apparent that the query
l
rna
is being handled by the summary folder, rather than the base data tables. The net result
is quick response times for queries and accurate results.

te
Note: End users can control whether they access summary or detail data by setting
n
I
either of the three options in Discoverer Plus:
e
cl
Always, when available

ra
Only when summary data is not out of date (stale)

O
Never
These options are available under Tools>Option>Query Governor.

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 8-5
Lesson 8: Creating and Managing Summary Folders
.....................................................................................................................................................

Different Types of Summary Tables

Summary Tables

Discoverer Summary tables (pre-Oracle 8.1.6)


Materialized Views (Oracle 8.1.6 and higher)

Copyright Oracle Corporation, 2001. All rights reserved.

Discoverer Summary Tables


If you are running Discoverer against pre-Oracle 8.1.6 database then summary tables
are created in Discoverer Administration Edition by administrators and subsequent
queries are redirected to the appropriate summary tables.

ly
Materialized Views
If you are running Discoverer against Oracle 8.1.6 or higher database, Materialized
On
e
Views will be created and subsequent queries are redirected to the appropriate
Materialized Views.

Us
Summaries created using materialized views can be used by other database
applications.
AI
The SQL Inspector/Explain Plan in Discoverer Plus Edition shows you whether the
& O
l
SQL generated to run a query used a summary table or a Materialized View.
a
ern
Int
cle
ra
O

.....................................................................................................................................................
8-6 Oracle iDS: Discoverer for Administrators
Different Types of Summary Tables
.....................................................................................................................................................

Oracle 8i Materialized Views

Consume storage space


Must be refreshed
Query rewrite is transparent to users

Copyright Oracle Corporation, 2001. All rights reserved.

Oracle 8i Materialized Views


Materialized Views provide indirect access to table data by storing the results of a
query in a separate table.

Consume Storage Space Unlike ordinary views, Materialized Views contain data
resulting from a query against one or more detail tables.

Must Be Refreshed Oracle maintains the data in Materialized Views by refreshing


nly
O
them after changes are made to the detail tables. The refresh method can be

e
incremental (fast refresh) or complete. Materialized Views can be refreshed either on
demand or at regular time intervals. Alternatively a Materialized View in the same
Us
I
database as the detail tables can be refreshed whenever a transaction commits its
changes to the detail tables.

OA
Transparent to Users Query rewrite transforms a SQL statement expressed in
l &
rna
terms of the detail table into a statement accessing one or more Materialized Views
that are defined on the detail tables. The transformation is transparent to the users.

nte
e I
cl
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 8-7
Lesson 8: Creating and Managing Summary Folders
.....................................................................................................................................................

Discoverer Summaries versus


Materialized Views

Discoverer Summaries Materialized Views


RDBMS ver 7.1 to RDBMS ver 8.1.6 and
8.1.5 higher
Stored as tables Stored as Materialized
only Views
Full refresh only Full or incremental refresh
Refresh on demand Refresh on
only demand/commit
Refresh only by Refresh outside
Discoverer Discoverer
Rewrite only by Rewrite only by server
Discoverer
Defined in terms of Defined in terms of tables
items and folders and columns

Copyright Oracle Corporation, 2001. All rights reserved.

Discoverer Summaries versus Materialized Views

Full Refresh Refreshes by recalculating the full result set from the detail tables.

Incremental Refresh Refreshes incrementally by updating the Materialized Views


with the changes in the detail tables.

Refresh on Demand
nly
Refreshes only when a user manually executes a refresh or

O
schedules a refresh.

Refresh on Commit Refreshes automatically when transaction is committed against


se
I
the detail tables. In this case the scheduling option of the Summary Wizard will be
U
disabled.

OA
Refresh Outside Discoverer Since Discoverer now creates Materialized Views as
l &
rn
applications.a
summary tables, these Materialized Views can also be used by other database

nte
e I
cl
ra
O

.....................................................................................................................................................
8-8 Oracle iDS: Discoverer for Administrators
Different Types of Summary Management
.....................................................................................................................................................

Different Types of Summary Management


H

Summary Management

Automates Summary Management with Oracle


8.1.6 and higher database
Creates summaries manually
Creates summary tables or Materialized
Views, populates and refreshes them with
data
Recommends what summaries to build
based on system usage and query statistics
Registers external summary tables to use
for summary redirection

Copyright Oracle Corporation, 2001. All rights reserved.

Summary Management
You can let Discoverer automatically create and maintain summaries, or you can
create the summaries manually.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 8-9
Lesson 8: Creating and Managing Summary Folders
.....................................................................................................................................................

Requirements for Creating


Summary Tables

Managed summary folders require the following:


PL/SQL support in the database
DBMS_JOB package
User with the following privileges:
CREATE TABLE
CREATE VIEW
CREATE PROCEDURE
CREATE SESSION
CREATE SEQUENCE

Copyright Oracle Corporation, 2001. All rights reserved.

Requirements for Summary Table Creation


Note that the following are the database server requirements for setting up summary
folders:
PL/SQL support in the database.
DBMS_JOB package installed for scheduling summary creation and refreshing
summary tables. To confirm whether DBMS_JOB is installed, follow these steps:
Log in to SQL*PLUS as the administrator and execute the statement:
nly
O
SQL>SELECT * FROM all_objects WHERE object_name=DBMS_JOB AND

e
object_type=PACKAGE;
The user creating the summaries must have CREATE TABLE, CREATE VIEW,
Us
CREATE PROCEDURE, CREATE SESSION, and CREATE SEQUENCE
privileges and sufficient QUOTA in the tablespace for the summary tables to be
AI
created.

& O

l
The Oracle database parameter file, init<SID>.ora, should have the following
a
n
parameters included:

ter
job_queue_processes = 2

In
job_queue_interval = 600

le
timed_statistics = TRUE

c
ra
O

.....................................................................................................................................................
8-10 Oracle iDS: Discoverer for Administrators
Different Types of Summary Management
.....................................................................................................................................................

Requirements for Creating


Materialized Views

The EUL owner requires to have the following


privileges:
Analyze any table
Create, drop, alter any Materialized Views
Rewrite query

Copyright Oracle Corporation, 2001. All rights reserved.

Requirement for Materialized Views


The above privileges are required by Oracle 8.1.6 or higher database for the EUL
owner.
Discoverer package has the script to provide these privileges.
Log in to SQL*PLUS as the administrator and execute the script:
SQL>START [Path]\Discvr4\SQL\eulasm.sql
[Path] is where your Discoverer software is installed. When prompted enter the name
nly
O
of the EUL owner.
Note: If in case you are not able to create summaries select Help>Database
se
U
Information and see whether the global query rewrite has been enabled.

AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 8-11
Lesson 8: Creating and Managing Summary Folders
.....................................................................................................................................................

Summary Wizard

Copyright Oracle Corporation, 2001. All rights reserved.

Summary Wizard
In Discoverer there are two ways to create and manage summaries:
Automatic Summary Management: Discoverer recommends and manages the
summary tables for you.
Manual: You can create and maintain your own summaries.

ly
Invoking the Summary Wizard You can launch the Summary Wizard in one of the
following ways:
Select Insert>Summary from the menu bar.
On
Select New Summary from the right mouse menu in the Summaries tab.
se
Select Create summary folders from the Administration Tasklist.
I U
Select the Summary icon from the toolbar.
OA
l &
rna
nte
e I
cl
ra
O

.....................................................................................................................................................
8-12 Oracle iDS: Discoverer for Administrators
Creating Summary Folders by Using EUL Items
.....................................................................................................................................................

Creating Summary Folders by Using EUL Items

Creating Summary Folders


by Using EUL Items

1. Select items from the EUL to include in the


summary folder.
2. Add combinations of the selected items to the
summary folder.
3. Estimate, view, and configure storage space
required by the summary.
4. Schedule the refresh and build time.

Copyright Oracle Corporation, 2001. All rights reserved.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 8-13
Lesson 8: Creating and Managing Summary Folders
.....................................................................................................................................................

Creating Summary Folders


by Using EUL Items: Step 2

Copyright Oracle Corporation, 2001. All rights reserved.

Creating Summary Folders by Using EUL Items: Step 2


You control the physical storage of the summary tables. You can also use the
sindex.dis workbook that ships with Discoverer to help determine what columns
are candidates for indexing. It is also easy to use other applications for summary
creation and management because Discoverer allows you to enter a name for the
summary table even if it is not managed by Discoverer.

Summary Wizard: Step 2 After selecting the option that lets you create your own
nly
summaries, select the summary option that you want on how to create the summary
e O
s
folder. To create a summary folder from items in the EUL, select the From items in
the End User Layer option. This generates a new table or a set of tables in the
I U
A
database. Click Next to go to the next screen.
Note: The first two options in the Summary Wizard Step 2 create internally managed
summary folders.
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
8-14 Oracle iDS: Discoverer for Administrators
Creating Summary Folders by Using EUL Items
.....................................................................................................................................................

Creating Summary Folders


by Using EUL Items: Step 3

Copyright Oracle Corporation, 2001. All rights reserved.

Creating Summary Folders by Using EUL Items: Step 3


The third step is to select the data point items to summarize and the desired axis items
from the available folders. You can select axis items from multiple folders, but if the
items are from different tables, a join must exist. You should also be sure to include all
the necessary aggregate functions for the selected data points.
When you finish, click Next to go to the next screen.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 8-15
Lesson 8: Creating and Managing Summary Folders
.....................................................................................................................................................

Creating Summary Folders


by Using EUL Items: Step 4

Copyright Oracle Corporation, 2001. All rights reserved.

Creating Summary Folders by Using EUL Items: Step 4


A combination is a single set of axis items and data points in a summary folder. Each
combination is a different way of combining two or more of the axis items in the same
summary folder. A summary combination is very much like a query, in that it defines a
specific row and column set.

Summary Wizard: Step 4 In the fourth step, you select the summary combinations
that should be prebuilt and managed by the EUL. In each row, select the check box for
nly
O
each axis item and combination to create a specific summary table for that choice. The
EUL will always build data for that table and use it when an end user selects that
se
U
query.
Use the following dialog box components to add or remove item combinations:
AI
O
Add Combination: Adds a new summary combination row.
Remove Combination: Deletes the selected summary combination row.
l &
rna
Estimate Space: Displays an estimate of the disk space required to store the
selected summary combination. Space estimates cannot be calculated unless LOVs

te
exist for each item in the combination.
n
I
Properties: Allows you to view and edit database storage properties for the
e
cl
selected combination.

ra
When you finish selecting combinations, select Next to go to the next screen.

O
Note: All data points in the summary folder are included in all summary
combinations. The control is in setting which combinations of axis items are required.

.....................................................................................................................................................
8-16 Oracle iDS: Discoverer for Administrators
Creating Summary Folders by Using EUL Items
.....................................................................................................................................................

Estimating Storage Space

Copyright Oracle Corporation, 2001. All rights reserved.

Estimating Storage Space


In Summary Wizard: Step 4 dialog box, click Estimate Space to display the amount of
hard disk space required to store the summary combination that is created.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 8-17
Lesson 8: Creating and Managing Summary Folders
.....................................................................................................................................................

Viewing Database Properties

Copyright Oracle Corporation, 2001. All rights reserved.

Viewing Database Storage Properties


Use the Properties tab to set physical database storage properties for each combination
of items in the summary folder. You can also view status information for a particular
combination of items once the summary folder has been built.
Most of the database storage properties can be edited, including those that affect the
placement of the table (for example, Tablespace.) If you change a physical storage

ly
property, the table is dropped and re-created. The following table lists some of the
database storage properties:
Property Description
On
Table Name Displays the current name of the table
se
Table Owner Displays the owner of the table
I U
Tablespace
Status
Displays the name of the tablespace for the summary table
Shows the current status of the summary refresh
OA
Error
l &
Displays an error message when a refresh is incomplete or fails

rna
nte
e I
cl
ra
O

.....................................................................................................................................................
8-18 Oracle iDS: Discoverer for Administrators
Creating Summary Folders by Using EUL Items
.....................................................................................................................................................

Viewing Mapping Information

Copyright Oracle Corporation, 2001. All rights reserved.

Viewing Mapping Information


To view the mapping of the items of the summary folders to database columns, use the
Mappings tab. The Mappings tab contains three columns:
Item: The name of the item in the summary folder
Database Column: The database column that the item is mapped to
Datatype: The data type of the item

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 8-19
Lesson 8: Creating and Managing Summary Folders
.....................................................................................................................................................

Viewing Tablespace Information

Copyright Oracle Corporation, 2001. All rights reserved.

Viewing Tablespace Information


To view the tablespace details, use the Tablespaces tab. The Tablespaces tab contains
the following columns:
Tablespace: The name of the tablespace for the summary table
Free Space: The amount of free space left in the tablespace
Used Space: The amount of space currently used in the tablespace
Extend: Whether the tablespace automatically extends when more space is
nly
O
required

se
I U
OA
l &
rna
nte
e I
cl
ra
O

.....................................................................................................................................................
8-20 Oracle iDS: Discoverer for Administrators
Creating Summary Folders by Using EUL Items
.....................................................................................................................................................

Viewing Oracle 8i Properties

Copyright Oracle Corporation, 2001. All rights reserved.

Viewing Oracle 8i Properties


This tab is available if the summary is built using Oracle 8.1.6 or higher. It allows you
to set properties that are specific only to Oracle 8.1.6 or higher. The following table
lists some of the properties:

Property Description

ly
Refresh Type Can be either Full or Incremental.
Refresh Can be on demand or on transaction commit.
On
e
Incremental Load Shows the type of inserts available for the detail table.
Stale
s
When the summary table is out of syncronization with the data

U
I
in the detail tables.

OA
l &
rna
nte
e I
cl
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 8-21
Lesson 8: Creating and Managing Summary Folders
.....................................................................................................................................................

Creating Summary Folders


by Using EUL Items: Step 5

Copyright Oracle Corporation, 2001. All rights reserved.

Creating Summary Folders by Using EUL Items: Step 5


The fifth step is to provide details about how to manage refresh of the summary folder.
If you want to specify the starting date, time, and repeat frequency for the refresh of
the summary do the following:
1 Select Automatically refresh this summary, starting on option.
2 Enter the starting date.
3 Enter the starting time.
nly
4 Enter the refresh frequency.

e O
s
Click Next to go to the next screen.

I U
OA
l &
rna
nte
e I
cl
ra
O

.....................................................................................................................................................
8-22 Oracle iDS: Discoverer for Administrators
Creating Summary Folders by Using EUL Items
.....................................................................................................................................................

Cr

Creating Summary Folders


by Using EUL Items: Step 6

Copyright Oracle Corporation, 2001. All rights reserved.

Creating Summary Folders by Using EUL Items: Step 6


The final step is to enter a name for the summary folder and schedule its build time.
You can select either:
Build immediately: The summary table will be built after you click the Finish
button. It is the default.
Build at: The summary table will be built later. Specify the date and time when you

ly
want to build.

On
se
I U
OA
l &
rna
nte
e I
cl
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 8-23
Lesson 8: Creating and Managing Summary Folders
.....................................................................................................................................................

Creating Summary Folders by Using Query Statistics

Creating Summary Folders


by Using Query Statistics

1. Specify search criteria to obtain statistics on


query performance.
2. Select a query to be summarized.
3. Add or remove items from the summary folder.
4. Add combinations of the selected items to the
summary folder.
5. Estimate, view, and configure storage space.
6. Schedule the refresh and build time.

Copyright Oracle Corporation, 2001. All rights reserved.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
8-24 Oracle iDS: Discoverer for Administrators
Creating Summary Folders by Using Query Statistics
.....................................................................................................................................................

Creating Summary Folders


by Using Query Statistics: Step 2

Copyright Oracle Corporation, 2001. All rights reserved.

Creating Summary Folders by Using Query Statistics: Step 2


Select the Using query performance statistics option in Step 2 of the wizard. This
option creates summary folders based on queries that were previously run in
Discoverer Plus and can save you time and work.
Click Next to go to the next screen.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 8-25
Lesson 8: Creating and Managing Summary Folders
.....................................................................................................................................................

Creating Summary Folders


by Using Query Statistics: Step 3

Copyright Oracle Corporation, 2001. All rights reserved.

Creating Summary Folders by Using Query Statistics: Step 3


The third step is to generate query statistics based on specified search criteria and to
select the queries that you want summarized from the resulting statistics.
To generate query statistics, you first use the settings in the top half of the dialog box
to set the search criteria, and then click Search to display the queries that match the
specified search criteria. Discoverer uses the criteria to run a query against the EUL

ly
query statistics table and updates the Queries list in the lower-left corner of the dialog
box.
From the Queries list, select a row to display the folders, items, and joins included in
On
the query. Click Next to go to the next step in the Summary Wizard.
se
Note: When a summary already exists for a query, Discoverer displays a cube in the
I U
first column.

OA
l &
rna
nte
e I
cl
ra
O

.....................................................................................................................................................
8-26 Oracle iDS: Discoverer for Administrators
Creating Summary Folders by Using Query Statistics
.....................................................................................................................................................

Creating Summary Folders


by Using Query Statistics: Step 4 and 5

Copyright Oracle Corporation, 2001. All rights reserved.

Creating Summary Folders by Using Query Statistics: Step 4


The fourth step is to add or remove items in the summary folder, if desired. Drag
desired data points and axis items to the Selected Items box. Click Next to go to the
next screen.
Creating Summary Folders by Using Query Statistics: Step 5
In the fifth step, you select the summary combinations that should be prebuilt and

ly
managed by the EUL. Click Next to go to the next screen.

On
se
I U
OA
l &
rna
nte
e I
cl
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 8-27
Lesson 8: Creating and Managing Summary Folders
.....................................................................................................................................................

Creating Summary Folders


by Using Query Statistics: Steps 6 and 7

Copyright Oracle Corporation, 2001. All rights reserved.

Creating Summary Folders by Using Query Statistics: Step 6


The sixth step is to provide details about how to manage refresh of the summary
folder. Click Next to go to the next screen.

Creating Summary Folders by Using Query Statistics: Step 7

ly
The final step is to name the summary folder and schedule its build times. When you
are finished, click Finish to proceed with the creation of the summary folder.

On
se
I U
OA
l &
rna
nte
e I
cl
ra
O

.....................................................................................................................................................
8-28 Oracle iDS: Discoverer for Administrators
Registering External Summary Tables
.....................................................................................................................................................

Registering External Summary Tables

Registering External
Summary Tables

1. Identify axis items and data points.


2. Specify the aggregation method for data points.
3. Create summary table definitions and populate
the tables.
4. Define indexes and storage parameters.
5. Invoke the Discoverer Summary Wizard.
6. Register each externally independent summary
table.

Copyright Oracle Corporation, 2001. All rights reserved.

External Summary Tables


The previous examples use Discoverer to populate the data in the summary tables. For
very large systems, however, there may be more optimal ways of refreshing summary
data, depending on the application. Some implementations may already have created
summary tables and programs to refresh them and simply require Discoverer to know

ly
about these tables, so they can be used to improve query performance.
Registered external summary folders map to tables created and populated by a method
On
e
external to Discoverer. Data values in external summaries are not controlled or
managed by the EUL. They must be updated independently by some other application.
Us
I
External summaries are created by mapping to an existing summary table in the
database.
To create and register external summaries:
OA
l
1 Identify the set of axis items and data points that you want to summarize.
&
rna
2 Specify the aggregation method for the data points.

te
3 Create the corresponding summary tables.

n
I
4 Add indexes and storage parameters for the populated table.

e
cl
5 Use the Discoverer Summary Wizard to register the external summary table.

ra
6 Set the refresh interval in the final step of the Summary Wizard if the summary

O will be managed by Discoverer.

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 8-29
Lesson 8: Creating and Managing Summary Folders
.....................................................................................................................................................

Creating Summary Folders


by Using External Tables

Copyright Oracle Corporation, 2001. All rights reserved.

Registering External Summary Tables


While registering an external summary table you must map the specific table columns
for the items to the summary table.
Summary tables and columns are identified in Discoverer with the Summary Wizard.
You must walk through the Summary Wizard to register each external table, because
you cannot register multiple tables at the same time.

Summary Wizard: Step 2


nly
After you launch the Summary Wizard, select the Registering an external summary
e O
table option in the second step of the wizard. Click Next to go to the next screen.
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
8-30 Oracle iDS: Discoverer for Administrators
Registering External Summary Tables
.....................................................................................................................................................

Creating Summary Folders


by Using External Tables: Step 3

Copyright Oracle Corporation, 2001. All rights reserved.

Summary Wizard: Step 3


The third step is to select the external summary table for which you want to create a
summary folder. Use the Select button to locate the table that you want.
After selecting the external summary table, drag the EUL items from the Available
Items column to the appropriate item in the Mapped Items column. Discoverer
automatically maps identically named folder items and table names.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 8-31
Lesson 8: Creating and Managing Summary Folders
.....................................................................................................................................................

Creating Summary Folders


by Using External Tables: Step 4

Copyright Oracle Corporation, 2001. All rights reserved.

Summary Wizard: Step 4


The fourth step is to provide details about how to manage refresh of the summary
folder. Click Next to go to the next screen.

Managing the Refresh with External Tables If you do not select the Manage the
refresh of this summary folder check box, then the summary table will be refreshed
independently by some external program, which means that you are registering an
externally managed summary table. If you select this option, then the summary table
nly
O
will be refreshed by Discoverer.

se
I U
OA
l &
rna
nte
e I
cl
ra
O

.....................................................................................................................................................
8-32 Oracle iDS: Discoverer for Administrators
Registering External Summary Tables
.....................................................................................................................................................

Creating Summary Folders


by Using External Tables: Step 5

Copyright Oracle Corporation, 2001. All rights reserved.

Summary Wizard: Step 5


The final step is to name the summary folder and give a description. Click Finish to
register the external summary table.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 8-33
Lesson 8: Creating and Managing Summary Folders
.....................................................................................................................................................

Managing Summary Folders

Managing Summary Folders


Create new
Edit
Refresh
Delete
Properties

Copyright Oracle Corporation, 2001. All rights reserved.

Editing a Summary
You use the Edit Summary dialog box to modify an existing summary. The available
tabs depend on the type of summary that you are editing. The tabs are described as
follows:
General: Modify the build time and date, change the refresh schedule, change the
name and description.
nly
O
Choose Items: Add or remove items from the selected summary folder.
Combinations: Add or remove summary combinations.
se
Refresh: Change date and time for summary refresh.
I U
Managing Combinations
OA
&
It is possible that an internally or externally managed summary folder was created that
l
a
did not contain all of the summary folder combinations. This situation can occur for

rn
any number of reasons, primarily because of insufficient tablespace extents. It is also

e
t
possible that an underlying summary database table was deleted. To see the status of

In
summary folder combinations, click the Combinations tab in the Edit Summary dialog

le
box. When you select a combination, Discoverer displays status information in the box

c
at the bottom of the dialog box.

ra
O

.....................................................................................................................................................
8-34 Oracle iDS: Discoverer for Administrators
Managing Summary Folders
.....................................................................................................................................................

Refreshing Summary Folders

Copyright Oracle Corporation, 2001. All rights reserved.

Refreshing Summary Folders


To refresh your summaries and reset the refresh interval, select Tools>Refresh
Summaries. In the Refresh Summaries dialog box, enter when you want the refresh to
take place and perform what type of refresh.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 8-35
Lesson 8: Creating and Managing Summary Folders
.....................................................................................................................................................

Viewing Summary Folder Properties

Copyright Oracle Corporation, 2001. All rights reserved.

Viewing Summary Folder Properties


By using the Summary Properties dialog box, you can view summary folder
properties. The Summary Properties dialog box contains the following fields:
Property Description
Name Displays the name of the selected summary folder
Description Displays a description of the current summary folder

ly
Type Displays whether the summary folder is Discoverer

Available for Queries


managed or externally managed

On
Indicates whether the summary is available for queries
Status
se
Indicates the refresh status of the folderpossible

I U
values: Failed, Pending, Complete, External, and

A
Requires Refresh External indicate that the summary

O
folder is not Discoverer managed

&
Last Refreshed Indicates the day and time of the last refresh
Next Refresh
al Indicates the day and time of the next refresh

rn
Refresh Interval or Never

e
Indicates how often a refresh takes place or if a refresh

t
Refresh never takes place, for external summaries, the value is

In set to NA

le
Identifier

c
Unique identifier for the summary table

ra
O

.....................................................................................................................................................
8-36 Oracle iDS: Discoverer for Administrators
Managing Summary Folders
.....................................................................................................................................................

Creating and Refreshing Summaries

Create/Refresh

Refresh required
Pending

Under construction
Edit changes

Failed (DB error) Complete

Copyright Oracle Corporation, 2001. All rights reserved.

Creating and Refreshing Summaries

Refresh Status
Pending: After you finish the steps in the Summary Wizard, refresh status is set to
Pending while Discoverer creates a job by using DBMS_JOB to populate the
summary tables. The status remains Pending until the job runs. Note that this
period depends on the value of the database parameter JOB_QUEUE_INTERVAL
(seconds).
nly
Under construction: When the job is running and the summary is being built.

e O
s
Complete: When the summary is built. External summaries always have a status of
Complete.
I U
A
Failed: Database error occurred that caused the job to failfor example, lack of

that occurred.
& O
space. Edit the summary and click the Combinations tab to see the database error

al
Refresh required: Need to refresh the summary.

ern
Changes to the formula of a calculated item or to the definition of a join or folder

nt
affect the refresh status of associated summary folders. A Refresh status means that
I
the summary must be refreshed before it can be used because the result set of the

cle
summary has changed.

ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 8-37
Lesson 8: Creating and Managing Summary Folders
.....................................................................................................................................................

Creating and Refreshing Summaries (continued)

Making Summaries Available for Queries The value of the Available for Queries
property in the Summary Properties dialog box controls whether a summary folder is
available for queries in the User Edition. These settings are as follows:
Yes: The summary tables are populated successfully and available for use in
queries.
No: The job has failed to execute or the administrator has elected not to make the
summary table available for use in queries. This property can be used to enable or
disable all types of summaries.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
8-38 Oracle iDS: Discoverer for Administrators
Summary Combination Strategies
.....................................................................................................................................................

Summary Combination Strategies

Summary Combination Strategies

Create a few summary combinations that combine


five to seven frequently accessed axis items.
Create one summary combination that combines
all or most axis items.
Create many summary combinations that combine
three to four regularly accessed axis items.
Include all data points in all summary tables.

Copyright Oracle Corporation, 2001. All rights reserved.

Summary Combination Strategy


If you are going to build summaries manually, you will need to have some good
summary combination strategies.
Building summaries and summary combinations in layers is usually an efficient
process. Implement the following summary combination strategies for a single
summary folder.
nly
O
For frequent queries, provide a number of summary combinations that combine only a
few (three or four) axis items. Space is minimized and performance gains maximized.
se
U
For a wider variety of queries, provide a smaller number of summary combinations

I
that combine a medium number (five to seven) of axis items. More space is required,
A
O
but performance gains will still be realized. The larger number of items in each

&
combination serve the wider variety of queries.

al
Provide one summary combination that contains all of the items in the summary folder

rn
(as long as the total number is less than the number of items in the source folder). This

e
t
type of combination provides a catchall summary that works for any combination of
items.
In
le
Include all data points in the summary table and all aggregate functions.

c
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 8-39
Lesson 8: Creating and Managing Summary Folders
.....................................................................................................................................................

More Summary Combination Strategies

Summary tables with many Summary tables with few


axis items axis items
Large Small
Can be used in Can be used in
many queries fewer queries
Medium performance Maximum
gain performance gain

Copyright Oracle Corporation, 2001. All rights reserved.

Space and Refresh Considerations


Users often ask, How much space do I need for summaries? The answer varies
depending on the number of types of queries, the number of items, and the
performance gain required. Fifty percent additional database for storing summary
tables is reasonable, but it may be more or less. Generally, it is not the space taken by
the summary tables that is the problem, as much as the time taken to refresh summary

ly
tables if they are large.
Discoverer optimizes a summary refresh by pyramid refreshing, where summary
combinations with the largest number of axis items are created first. Other
On
combinations are created from the new summaries in sequence, depending on the
se
number of axis items in the combination. For this reason, it is always best to include
I U
A
all the combinations of a particular summary in the same summary folder and not split

O
them across multiple summary folders, where this optimization cannot be performed.

l &
rna
nte
e I
cl
ra
O

.....................................................................................................................................................
8-40 Oracle iDS: Discoverer for Administrators
Summary Combination Strategies
.....................................................................................................................................................

Summary Combination Example

Sales Sales Profit Profit


COUNT SUM COUNT SUM Qtr Month Yr City Region Dept

X X X X X X X X X X

X X X X X X X X X

X X X X X X X X

X X X X X X X

Copyright Oracle Corporation, 2001. All rights reserved.

Summary Combination Example


This slide example illustrates a common summary combination. Each item of the
combination creates a separate table in the database. It is similar to the summary
combinations used in the Video Analysis Tutorial that is included with Discoverer.
Note: When you include both SUM and COUNT, Discoverer can compute the average
using the summary table aggregated data points.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 8-41
Lesson 8: Creating and Managing Summary Folders
.....................................................................................................................................................

Summary Management in Applications Mode

Summary Management
in Applications Mode

Use external summaries for Applications mode


EUL.
Administrators should ensure that summaries are
not managed by Discoverer.

Copyright Oracle Corporation, 2001. All rights reserved.

Application Mode EUL


Use external summaries for Applications mode EUL, if summaries contain items
based on Applications secure views or Applications business views. Administrators
should ensure that summaries based on Applications secure views or Applications
business views are not managed by Discoverer.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
8-42 Oracle iDS: Discoverer for Administrators
Summary
.....................................................................................................................................................

Summary

Summary

In this lesson, you should have learned how to:


Describe different types of summary management
Create different types of summary folders
based on:
Items found in the EUL
Query statistics
Register external summary tables
Manage summary folders
Describe summary combination strategies

Copyright Oracle Corporation, 2001. All rights reserved.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 8-43
Lesson 8: Creating and Managing Summary Folders
.....................................................................................................................................................

Practice 8-1 Overview

Practice 8-1 Overview

This practice covers the following topics:


Creating a summary folder based on items in the
Video Stores business area
Creating a summary folder based on query
statistics
Creating a summary folder based on an external
summary table

Copyright Oracle Corporation, 2001. All rights reserved.

Practice 8-1 Overview


In this practice, you will create different types of summary folders by using data in the
Video Stores business area.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
8-44 Oracle iDS: Discoverer for Administrators
Practice 8-1
.....................................................................................................................................................

Practice 8-1
1 Create a new summary folder based on items in the End User Layer:
a Select the following items from the Video Analysis folder:

Item
Unit Sales SUM
Unit Sales COUNT
Department
Region
Year

bAdd a combination to the summary folder that includes all the data points,
Department, and Year.
c View the database storage properties and note the name of the summary table
in the Table Name property.
d Specify that the summary be refreshed once a week.
e In step 6 of the Wizard, name the summary Video Analysis Summary.
f View the newly created summary in the Summaries tab of the work area. What
is the status of the summary folder?
g In the Database Storage Properties dialog box, view the database table name of
the summary folder. In SQL*Plus, connect as oraxxa and execute the
following SQL command for the table name to see whether the summary table
has been created with the desired items:
SQL>DESC <table_name>;
nly
h Refresh the Video Analysis Summary.

e O
s
2 Launch Discoverer Plus as oraxxb and create a query using the Department,
Region, Year, and Profit SUM items in the Video Analysis folder. Use the SQL
I U
A
Inspector to verify that the query was redirected to the summary table.

EUL4_MVnnnnnn.
& O
Note: Select the Plan tab. Summary tables can be identified by the prefix

al
3 Create an internal summary based on query statistics.

ern
Note: If you have few queries, you may not get the statistics, unless you clear all

nt
the options in Summary Wizard Step 3.

I
e
a Add item combinations where appropriate.

cl
b View the database storage properties for each combination and note the name

ra of the summary table.

.....................................................................................................................................................
Oracle iDS: Discoverer for Administrators 8-45
Lesson 8: Creating and Managing Summary Folders
.....................................................................................................................................................

Practice 8-1 (continued)


c Specify that the summary be refreshed once a month.
d Name the summary Query Statistics Summary, add a description if desired, and
build the summary immediately.
e View the newly created summary in the Summaries tab of the work area.
4 Reconnect to Discoverer Plus and experiment with creating queries that use
subsets of the summaries that you have created. Use the SQL Inspector to verify
that the queries are redirected to the summary tables.
5 Create a summary folder by registering the VIDEOCUT external summary table
DEPT_REGION_SUMMARY. Map the items in the summary table to the
appropriate items in the simple folders Products, Stores, and Sales Facts. Do not let
Discoverer manage the summary for you. Name the summary Dept and
Region Summary.
6 Launch Discoverer Plus as oraxxb and create a query using items from the newly
created summary. Be sure to select the items from the simple folders. Use the SQL
Inspector to verify that Discoverer has redirected the query to the
DEPT_REGION_SUMMARY summary table.

nly
e O
Us
AI
& O
al
ern
Int
cle
ra
O

.....................................................................................................................................................
8-46 Oracle iDS: Discoverer for Administrators

Vous aimerez peut-être aussi