# Global Sample Schema for Oracle® OLAP 11g Release 1 (11.1)

The Global sample schema is used by the examples in the following documents.

- Oracle OLAP User's Guide, 11g, Release 1 (11.1), B28124-02
- Oracle OLAP Java API Developer's Guide, 11g Release 1 (11.1), B28127-02
- Oracle OLAP Java API Reference, 11g Release 1 (11.1), B28128-02

The Global schema contains eight tables. Examples in the Oracle OLAP documentation create OLAP dimensions, attributes, cubes, and measures and map them to columns in the relational tables.

For information on using Analytic Workspace Manager to define an OLAP dimensional data model and create an analytic workspace, see Oracle OLAP User's Guide. For information on defining an OLAP dimensional data model and creating analytic workspaces using the OLAP Java API, see Oracle OLAP Java API Developer's Guide.

## Prerequisites

- Oracle Database 11g Release 1 (11.1), Enterprise Edition
- Analytic Workspace Manager 11g Release 1 (11.1)

## Sample Kit Contents

The sample kit is in the compressed file `global_11g_schema.zip`. The sample kit includes:

- A script that installs the Global schema, `global_11g_install.sql`. This script does the following:
  - Prompts for a password for the GLOBAL user.
  - Creates the GLOBAL user and grants to GLOBAL the privileges required to create and use analytic workspaces.
  - Connects as the GLOBAL user.
  - Imports the tables and data of the schema.
- The `global_11g_source.dmp` file, which contains the GLOBAL tables and relational metadata that are required to enable general query refresh and rewrite for cube materialized views. This includes primary key constraints, foreign key constraints, and relational dimension objects. For more details on the required metadata, please refer to the Oracle Database Data Warehousing Guide (11.1).
- A script that uninstalls the Global schema, `global_11g_remove.sql`. This script drops the GLOBAL user and all of the objects created by the `global_11g_install.sql` script.
- Templates that contain XML definitions of OLAP metadata objects. For information on the templates, see Templates in the Sample Kit.

## Installing the Global Schema

To install the Global sample schema, do the following:

1. Download the `global_11g_schema.zip` file.
2. Extract the contents of the file.
3. Change directories to the directory containing the extracted files.
4. Start SQL*Plus and connect as the SYSTEM user.
5. Run the installation script. For example, enter the following command.
   `SQL> @global_11g_install;`

## Tables in the Global Schema

The Global schema has four dimension tables, two fact tables, and two other tables. The following table lists the tables and provides brief descriptions of them.

Table | Description
--- | ---
`CHANNEL_DIM` | Contains sales channel information that is the basis of an OLAP dimension that has one hierarchy with two levels. The table supports description attributes in three languages.
`CUSTOMER_DIM` | Contains customer information that is the basis of an OLAP dimension that has two hierarchies. Each hierarchy has four levels. The table supports description attributes in three languages.
`PRODUCT_DIM` | Contains product information that is the basis of an OLAP dimension that has one hierarchy with four levels. The table supports description attributes in three languages. It also supports attributes for packages of products, buyers, and marketing managers.
`TIME_DIM` | Contains time period information that is the basis of an OLAP dimension that has two hierarchies. Each hierarchy has four levels. The table supports end date and time span attributes.
`PRICE_FACT` | Contains data for unit prices and unit costs by product and time period. This table is the basis for an OLAP cube that has two measures that are dimensioned by the product and time dimensions.
`UNITS_FACT` | Contains data for the number of units sold, the cost of the units sold, and the amount of gross sales revenue received by channel, customer, product, and time period. This table is the basis for an OLAP cube that has three measures that are dimensioned by the channel, customer, product and time dimensions.
`ACCOUNT` | Contains additional information about customers by account. It is related to the `CUSTOMER_DIM` table by `ACCOUNT_ID`.
`PRODUCT_CHILD_PARENT` | Contains much of the same data as the `PRODUCT_DIM` table. This table is the basis for an OLAP dimension that has a value-based hierarchy rather than a hierarchy based on levels.

## Templates in the Sample Kit

In Analytic Workspace Manager or in an OLAP Java API program, you can import or export OLAP metadata objects as XML templates. In the `Templates` directory, the sample kit contains the following XML templates that you can import into an analytic workspace.

Template | Description
--- | ---
`GLOBAL.XML` | Defines an analytic workspace name Global that has two cubes and four dimensions but does not have materialized views.
`GLOBAL_MV.XML` | Defines an analytic workspace name Global that has two cubes and four dimensions. The Units cube and the four dimensions are enabled as materialized views. The Price cube is not enabled as a materialized view.
`TIME.XML` | Defines a Time dimension that has two level-based hierarchies.
`PRODUCT.XML` | Defines a Product dimension that has one level-based hierarchy.
`CHANNEL.XML` | Defines a Channel dimension that has one level-based hierarchy.
`CUSTOMER.XML` | Defines a Customer dimension that has two level-based hierarchies.
`UNITS_CUBE.XML` | Defines a Units cube without materialized view capabilities.
`PRICE_CUBE.XML` | Defines a Price cube without materialized view capabilities.

## Uninstalling the Global Schema

To uninstall the Global schema, run the `global_11g_remove.sql` script as the SYSTEM user.

Copyright © 2007, Oracle. All rights reserved.