Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Oracle Essbase 11 Development Cookbook

You're reading from   Oracle Essbase 11 Development Cookbook Over 90 advanced development recipes to build and take your Oracle Essbase Applications further with this book and ebook

Arrow left icon
Product type Paperback
Published in Jan 2012
Publisher Packt
ISBN-13 9781849683265
Length 400 pages
Edition 1st Edition
Arrow right icon
Author (1):
Arrow left icon
Jose R Ruiz Jose R Ruiz
Author Profile Icon Jose R Ruiz
Jose R Ruiz
Arrow right icon
View More author details
Toc

Table of Contents (17) Chapters Close

Oracle Essbase 11 Development Cookbook
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
1. Understanding and Modifying Data Sources 2. Using Essbase Studio FREE CHAPTER 3. Building the BSO Cube 4. Building the ASO Cube 5. Using EAS for Development 6. Creating Calculation Scripts 7. Using MaxL to Automate Process 8. Data Integration 9. Provisioning Security Using MaxL Editor or Shared Services 10. Developing Dynamic Reports Index

Setting up dimensions with a generation reference


In this recipe, we will build a table in a generation reference format. The SUPPLIER is a geographical dimension. Geographic dimensions are natural hierarchies, which means that the generations are related to each other naturally and there is normally a one-to-many relationship. A generation reference format is common in a relational environment as it can be used to conduct relational reporting as well. The same cannot be said about the parent-child structure.

Getting ready

To get started, open your SQL Server Management Studio, and add a TBC database. Add a SCHEMA using a tool such as TOAD, SQL Developer, or Golden, if you are using Oracle.

How to do it...

  1. Run the following scripts to create the SUPPLIER table. We can change the script below to PL/SQL by replacing int with INTEGER and varchar() with VARCHAR2(). Following the scripts is a screenshot of the table:

    --This is the syntax in T-SQL
    create table SUPPLIER
    (
      SUPPLIERID         int                   not null,
      SUPPLIER_ALIAS     varchar(50)           null    ,
      ADDRESS            varchar(25)           null    ,
      CITY               varchar(25)           null    ,
      STATE              varchar(25)           null    ,
      ZIP                varchar(20)           null    ,
      COUNTRY            varchar(25)           null    ,
      constraint PK_SUPPLIER primary key (SUPPLIERID)
    )
    go
  2. Execute the following scripts to add data to the SUPPLIER table:

    INSERT INTO SUPPLIER(SUPPLIERID,SUPPLIER_ALIAS,ADDRESS,CITY,STATE,ZIP,COUNTRY)VALUES (1,'High Tech Drinks','1344 CrossmanAve','Sunnyvale','California','94675','USA');
    
    INSERT INTO SUPPLIER(SUPPLIERID,SUPPLIER_ALIAS,ADDRESS,CITY,STATE,ZIP,COUNTRY)VALUES (2,'East Coast Beverage','900 Long RidgeRd','Stamford','Connecticut','92001','USA');
    
    INSERT INTO SUPPLIER(SUPPLIERID,SUPPLIER_ALIAS,ADDRESS,CITY,STATE,ZIP,COUNTRY)VALUES (3,'Cool Canadian','1250 Boul ReneLevesque','Montreal','New York','H3B-W4B','Canada');
  3. Select from the SUPPLIER table to see the results:

    Select * From SUPPLIER;

How it works...

In step 1, the SUPPLIER table was created and in step 2 the data was populated. A generation in Essbase begins with generation 1 at dimension because the name of the cube in the outline is generation 0. We can tell from the structure of the table that it is clearly set up in generation reference as depicted in the following grid:

COLUMN

DESCRIPTION

SUPPLIERID

The PRIMARY KEY and a FOREIGN KEY

COUNTRY

Generation 2

STATE

Generation 3

CITY

Generation 4

ZIPCODE

Generation 5

ADDRESS

Generation 6

Tip

The generation reference will allow us to create ragged hierarchies, but requires the handling of null values by your development tool.

See also

For more information on how to build the SUPPLIER dimension using Essbase Studio, refer to the recipe Creating hierarchies using a Generation reference table in Chapter 3.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image