You are on page 1of 36

Using Data Model Editor to Create Data Models Based on a SQL Query Data Set

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Objectives
After completing this lesson, you should be able to: Describe samples used for the course Describe the features of Data Model Editor Create and edit a data model based on a SQL Query data set Define parameters and a list of values (LOV) for a data model Create reports based on these data models

4-2

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Introducing Sample Lite

4-3

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Introducing Sample Schemas


Sample schemas: Are provided with Oracle Database Provide a common platform for examples in each release of Oracle Database Are a set of interlinked schemas

4-4

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Introducing Sample Schemas: HR Data Model

HR

DEPARTMENTS DEPARTMENT_ID DEPARTMENT_NAME MANAGER_ID LOCATION_ID

JOB_HISTORY EMPLOYEE_ID START_DATE END_DATE JOB_ID DEPARTMENT_ID

LOCATIONS LOCATION_ID STREET_ADDRESS POSTAL_CODE CITY STATE_PROVINCE COUNTRY_ID

JOBS JOB_ID JOB_TITLE MIN_SALARY MAX_SALARY

EMPLOYEES EMPLOYEE_ID FIRST_NAME LAST_NAME EMAIL PHONE_NUMBER HIRE_DATE JOB_ID SALARY COMMISSION_PCT MANAGER_ID DEPARTMENT_ID

COUNTRIES COUNTRY_ID COUNTRY_NAME REGION_ID

REGIONS REGION_ID REGION_NAME

4-5

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Introducing Sample Schemas: OE Data Model


HR OE ORDER_ITEMS ORDER_ID LINE_ITEM_ID PRODUCT_ID UNIT_PRICE QUANTITY EMPLOYEES REGIONS

ORDERS ORDER_ID ORDER_DATE ORDER_MODE CUSTOMER_ID SHIP_MODE ORDER_STATUS SALES_REP_ID ORDER_TOTAL PRODUCT DESCRIPTIONS PRODUCT_ID LANGUAGE_ID PRODUCT_NAME PRODUCT_DESCRIPTION INVENTORIES PRODUCT_ID WAREHOUSE_ID QUANTITY_ON_HAND

PRODUCT INFORMATION PRODUCT_ID CATEGORY WEIGHT_CLASS WARRANTY_PERIOD SUPPLIER_ID PRODUCT_STATUS LIST_PRICE MIN_PRICE CATALOG_URL

CUSTOMERS CUSTOMER_ID CUST_FIRST_NAME CUST_LAST_NAME CUST_ADDRESS_TYP STREET_ADDRESS POSTAL_CODE CITY STATE_PROVINCE COUNTRY_ID PHONE_NUMBERS CREDIT_LIMIT CUST_EMAIL ACCOUNT_MGR_ID NLS_LANGUAGE NLS_TERRITORY WAREHOUSES WAREHOUSE_ID WAREHOUSE_NAME LOCATION_ID

4-6

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Introducing Data Model Editor


Data Model Editor allows you to: Create data sets Query data Structure data Aggregate data Customize data Create calculations Perform advanced tasks

4-8

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Exploring the Data Model Editor User Interface

4 - 10

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Examining Data Model Properties

4 - 11

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Supported Data Sources


BI Publisher supports the following data sources: SQL query MDX query (including Essbase) Oracle BI Analysis View object Web service LDAP query XML file MS Excel file HTTP(XML/RSS feed)

4 - 13

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Creating a Simple Data Model Based on a SQL Query Data Set


1. 2. 3. 4. 5. Define default data source and output options. Add a SQL query data set. Build a query in Query Builder. Save the data model. View the XML output and save the sample data.

4 - 15

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Step1: Defining Default Data Source and Output Options

1 2

4 - 16

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Step 2: Adding a SQL Query Data Set


2

3 4
5

4 - 17

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Step 3: Building a Query in Query Builder

4 - 18

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Step 3: Building a Query in Query Builder: Select Objects

4 - 19

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Step 3: Building a Query in Query Builder: Define Relations

4 - 20

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Step 3: Building a Query in Query Builder: Select Columns

4 - 21

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Step 3: Building a Query in Query Builder: Add Aliases and Conditions

4 - 22

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Step 3: Building a Query in Query Builder: View Results and Save Query
1 2

4 - 24

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Step 4: Saving the Data Model


1

4 - 25

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Step 5: Viewing XML Output and Saving Sample Data


1 2 3

4 - 26

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Creating a Report Based on a Data Model

4 - 27

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Describing Parameters and LOVs

4 - 28

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Create a parameter.

Adding Parameters

2
8 1

4 - 30

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Additional Examples of Parameters


Parameter Type = Menu Reorder the parameters.

4 - 31

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Additional Examples of Parameters

Data Type = Date

Data Type = Menu

Date picker is restricted to the year 2010.

4 - 32

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Adding a Bind Variable to a Query


1
The original SQL Query for the simple salary report

The SQL query for the salary report after the bind variable is added

3 4
4 - 33

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Adding a Bind Variable to a Query

Enter the parameter value and click Apply.

4 - 34

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Configuring Parameter Settings for a Report


1

4 - 35

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Create a list of values.

Adding LOVs: SQL Query Type


2

4 - 36

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Adding LOVs: SQL Query Type

7 6

4 - 37

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Additional Example of an LOV

4 - 38

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Cascading Parameters

4 - 39

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Viewing a Report with Parameters


1

4 - 40

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Summary
In this lesson, you should have learned how to: Describe samples used for the course Describe the features of Data Model Editor Create and edit a data model based on a SQL Query data set Define parameters and a list of values (LOV) for a data model Create reports based on these data models

4 - 41

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Practice 4: Overview
This practice covers the following topics: Creating and editing a data model based on a SQL query data set Defining parameters and LOVs for a data model Creating an auto-generated RTF template Viewing a report and changing parameter attributes by using Report Editor

4 - 42

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

You might also like