oracle data mart

Upload: prasad-geddam

Post on 04-Jun-2018

223 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/13/2019 Oracle Data Mart

    1/328

    Oracle Data Mart Suite

    The Oracle Data Mart Suite Cookbook

    Release 2.6

    August 1999

    Part No. A75671-01

  • 8/13/2019 Oracle Data Mart

    2/328

  • 8/13/2019 Oracle Data Mart

    3/328

    iii

    Contents

    Send Us Your Comments ................................................................................................................ xvii

    About the Cookbook............................................................................................................................ xix

    1 Data Mart ConceptsWhat Is a Data Mart? .......................................................................................................................... 1-1

    How Is It Different from a Data Warehouse?........................................................................... 1-1

    Dependent and Independent Data Marts ................................................................................. 1-2

    What Are the Steps in Building a Data Mart?............................................................................... 1-3

    Designing....................................................................................................................................... 1-4

    Constructing.................................................................................................................................. 1-5

    Populating ..................................................................................................................................... 1-6

    Accessing ....................................................................................................................................... 1-6

    Managing....................................................................................................................................... 1-7

    Oracle Data Mart Suite ...................................................................................................................... 1-7

    What Is in Oracle Data Mart Suite?................................................................................................. 1-8

    Oracle Data Mart Designer.......................................................................................................... 1-8

    Oracle8 Enterprise Edition .......................................................................................................... 1-9Oracle Enterprise Manager ......................................................................................................... 1-9

    Oracle Data Mart Builder ............................................................................................................ 1-9

    Oracle Discoverer ....................................................................................................................... 1-10

    Oracle Reports............................................................................................................................. 1-10

    Oracle Web Application Server................................................................................................ 1-10

    How Do You Build a Data Mart Using These Products? .......................................................... 1-11

    Data ModelingData Mart Design and Construction ......................................................... 1-11

    http://comments_template.pdf/http://comments_template.pdf/
  • 8/13/2019 Oracle Data Mart

    4/328

    iv

    Process ModelingPopulating the Data Mart....................................................................... 1-12

    Business ModelingAccessing the Data ................................................................................ 1-13Managing the Data Mart............................................................................................................ 1-13

    2 Case StudyThe Global Computing Company

    Case Study Scenario ........................................................................................................................... 2-1

    Global Computing Information Requirements ............................................................................ 2-2

    Business Analysis Questions....................................................................................................... 2-3Information Requirements from the Information Technology (IT) Department ................ 2-3

    Information Requirements from the Sales and Marketing Department............................... 2-3

    The Oracle Data Mart Suite Databases........................................................................................... 2-4

    What Does the DMDB Database Include? ................................................................................ 2-4

    Database Files......................................................................................................................... 2-4

    Database Users....................................................................................................................... 2-5

    Data Mart Builder Repository.............................................................................................. 2-6Database Structures for the Global Computing Case Study ...................................................... 2-7

    Source Data .................................................................................................................................... 2-7

    Target Tables ................................................................................................................................. 2-7

    Overview of the Hands-on Exercises......................................................................................... 2-7

    3 Requirements and Design

    What Happens in This Step of the Process? .................................................................................. 3-1

    What Is the Role of Data Mart Designer? ...................................................................................... 3-2

    Defining the Scope of the Data Mart Project ................................................................................ 3-2

    Defining the Requirements for the Data Mart.............................................................................. 3-3

    Business Requirements ................................................................................................................ 3-3

    Technical Requirements............................................................................................................... 3-4

    How Do You Know If You Have Done It Right?..................................................................... 3-4Global Computing CompanyRequirements Definition ......................................................... 3-5

    Input from Interviews .................................................................................................................. 3-5

    Information Requirements .......................................................................................................... 3-6

    Performance Requirements ......................................................................................................... 3-6

    Requirements Summary .............................................................................................................. 3-7

    Data Mart Design ................................................................................................................................ 3-7

  • 8/13/2019 Oracle Data Mart

    5/328

    v

    Creating a Logical Design ................................................................................................................. 3-9

    Creating a Wish List of Data..................................................................................................... 3-10Identifying Sources..................................................................................................................... 3-11

    Classifying Data for the Data Mart Schema ........................................................................... 3-13

    Dimensions........................................................................................................................... 3-13

    Facts....................................................................................................................................... 3-14

    Granularity ........................................................................................................................... 3-14

    Designing the Star Schema........................................................................................................ 3-14

    Moving from Logical to Physical Design..................................................................................... 3-16Estimating the Size of the Data Mart ....................................................................................... 3-16

    What Is Metadata?...................................................................................................................... 3-18

    Global Computing CompanyData Mart Design .................................................................... 3-18

    Setting Up Data Mart Designer ................................................................................................ 3-19

    Creating a Designer User ................................................................................................... 3-19

    Creating a Designer Application....................................................................................... 3-21

    Creating a Wish List of Data..................................................................................................... 3-23

    Adjusting Your Wish List to Reality................................................................................. 3-24

    Determining the Granularity Level .................................................................................. 3-25

    Classifying Data for the Global Computing Star Schema .................................................... 3-26

    Creating the Logical Design...................................................................................................... 3-27

    Sketching an Initial Logical Design .................................................................................. 3-27

    Capturing the Design of the Source OLTP System ........................................................ 3-33Creating a New Version ..................................................................................................... 3-40

    Completing the Logical Design......................................................................................... 3-41

    Adding Attributes ............................................................................................................... 3-44

    Creating the Physical Design.................................................................................................... 3-46

    Transforming the Logical Design into a Physical Design ............................................. 3-46

    Displaying the Default Physical Design .......................................................................... 3-47

    Adding a Staging Table...................................................................................................... 3-50Generating the DDL Script........................................................................................................ 3-52

    Estimating Size..................................................................................................................... 3-54

    Translating the Physical Design to a Physical Implementation .......................................... 3-55

  • 8/13/2019 Oracle Data Mart

    6/328

    vi

    4 Construct

    What Happens in This Step of the Process? .................................................................................. 4-1

    What Is the Role of Oracle8 in the Data Mart?.............................................................................. 4-2

    Storage Management.................................................................................................................... 4-2

    Fast Access ..................................................................................................................................... 4-2

    Data ProtectionBackup and Recovery ................................................................................... 4-2

    Access by Multiple Users............................................................................................................. 4-3

    Database Security..........................................................................................................................4-3

    Understanding Oracle8 Database Server: The Building Blocks................................................ 4-4

    Oracle Processes............................................................................................................................ 4-4

    Oracle Memory Structures .......................................................................................................... 4-4

    Oracle Instances ............................................................................................................................ 4-4

    Client/Server Architecture.......................................................................................................... 4-4

    Oracle Files..................................................................................................................................... 4-5

    Putting the Building Blocks Together........................................................................................ 4-7How Oracle8 Organizes and Manages Storage........................................................................ 4-7

    Tablespaces, Datafiles, and Data Blocks............................................................................. 4-8

    Segments and Extents and How They Relate to Tablespaces....................................... 4-11

    Schema Objects in Oracle8......................................................................................................... 4-11

    Tables Revisited ................................................................................................................... 4-11

    IndexesBitmap and B-Tree............................................................................................. 4-12

    Views ..................................................................................................................................... 4-13SQL Optimization and Execution............................................................................................. 4-14

    How SQL Statements Are Processed................................................................................ 4-15

    Who Does All of the Work? ............................................................................................... 4-16

    Different Ways of Getting to DataAccess Paths.......................................................... 4-16

    The Cost-Based Optimizer ................................................................................................. 4-17

    Generating Statistics............................................................................................................ 4-18

    Parallel Processing...................................................................................................................... 4-18

    Parallel Query ...................................................................................................................... 4-19

    Parallel CREATE TABLE. . . AS SELECT Statements .................................................... 4-21

    Parallelizing SQL Statements............................................................................................. 4-21

    Setting the Degree of Parallelism ...................................................................................... 4-22

    Parallel Direct Path Load.................................................................................................... 4-22

    Parallel Index Create ........................................................................................................... 4-23

  • 8/13/2019 Oracle Data Mart

    7/328

    vii

    Star Query Processing................................................................................................................ 4-23

    Star Schema Revisited......................................................................................................... 4-23What Is a Star Query? ......................................................................................................... 4-24

    Optimizing Star Query ExecutionStar Transformation............................................. 4-25

    Partitioned Tables and Indexes ................................................................................................ 4-25

    Global Computing Case StudyManaging Data Mart Storage ............................................. 4-28

    Logging In to Oracle Enterprise Manager Components....................................................... 4-28

    Adding Space to the Database.................................................................................................. 4-30

    Creating a New Tablespace ............................................................................................... 4-31Adding Space to the USERDATA Tablespace ................................................................ 4-35

    Miscellaneous Tasks................................................................................................................... 4-35

    Starting Up and Shutting Down the Database....................................................................... 4-35

    Shutting Down the Database............................................................................................. 4-36

    Starting Up the Database.................................................................................................... 4-38

    5 Extraction, Transformation, and Transportation

    What Happens in This Step of the Process? .................................................................................. 5-1

    What Is the Role of Oracle Data Mart Builder? ............................................................................ 5-2

    Oracle Data Mart Builder .................................................................................................................. 5-2

    Parts of a Data Flow Plan ............................................................................................................ 5-3

    Built-in Transforms ...................................................................................................................... 5-4

    Source Transforms................................................................................................................. 5-4Data Flow Transforms .......................................................................................................... 5-5

    Record Manipulation Transforms....................................................................................... 5-6

    Column Manipulation Transforms..................................................................................... 5-7

    Sort Transforms ..................................................................................................................... 5-8

    Sink Transforms..................................................................................................................... 5-8

    Data Mart Population Transforms...................................................................................... 5-9

    VBScript Transforms.................................................................................................................. 5-11

    Transform Software Developers Kit ....................................................................................... 5-12

    Oracle Data Mart Builder Admin .................................................................................................. 5-12

    Understanding Data Extraction and Oracle Data Mart Builder .............................................. 5-13

    Primary Data Sources and Targets........................................................................................... 5-13

    Source MetadataProviding Information About the Source ...................................... 5-13

    Capturing Changes in Source Data .................................................................................. 5-14

  • 8/13/2019 Oracle Data Mart

    8/328

    viii

    Maintaining Referential Integrity...................................................................................... 5-14

    Understanding Data Transformation ............................................................................................ 5-15Understanding Data Transportation ............................................................................................. 5-16

    What Are the Steps in Populating a Data Mart? ......................................................................... 5-16

    Global Computing Case StudyPopulating the Data Mart .................................................... 5-18

    Starting Assumptions................................................................................................................. 5-18

    What Happens in This Section?................................................................................................ 5-19

    Logging In to Data Mart Builder .............................................................................................. 5-21

    Representing Source Data ............................................................................................................... 5-22Creating a BaseView and a MetaView of Source Data.......................................................... 5-22

    Representing Target Data ................................................................................................................ 5-25

    Creating a BaseView for Target Data....................................................................................... 5-25

    Creating a BaseView and MetaView for the Staging Area................................................... 5-27

    Extracting and Transforming the Source Data ............................................................................ 5-29

    Using the Data Flow Editor to Create and Run Data Flow Plans........................................ 5-29

    Displaying the Plan and Results........................................................................................ 5-29

    Selecting the Tables to Use in the Plan............................................................................. 5-30

    Adding Transforms to the Plan......................................................................................... 5-31

    Creating Data Flow Plans to Populate the Target Star Schema........................................... 5-31

    Loading the Time Dimension Table DAYS............................................................................. 5-32

    Creating Plans for Other Dimension Tables ........................................................................... 5-36

    Loading the Customer Dimension Table CUSTOMERS.......................................................5-36

    Loading the Product Dimension Table PRODUCTS............................................................. 5-39

    Loading the Channel Dimension Table CHANNELS........................................................... 5-44

    Populating the Fact Table SALES............................................................................................. 5-47

    Reenabling Constraints....................................................................................................... 5-53

    Analyzing the Table SALES............................................................................................................ 5-53

    What Have You Learned and What Is Next?................................................................................ 5-54

    6 Access to the Database

    What Happens in This Step of the Process? .................................................................................. 6-1

    Reviewing Your Data Model ............................................................................................................ 6-1

    What Is the Role of Oracle Discoverer in the Data Mart?........................................................... 6-2

    Discoverer User Edition............................................................................................................... 6-3

    Discoverer Administration Edition............................................................................................ 6-4

  • 8/13/2019 Oracle Data Mart

    9/328

    ix

    End User Layer ............................................................................................................................. 6-4

    Discoverer Viewer for the Web .................................................................................................. 6-4Basic Steps in Designing a Business Area ..................................................................................... 6-4

    Creating and Managing a Business Area.................................................................................. 6-5

    Managing End-User Access ........................................................................................................ 6-5

    Using Oracle Discoverer to Improve Query Performance.......................................................... 6-6

    Automatic Summary RedirectionSummary Tables............................................................. 6-6

    Query Prediction........................................................................................................................... 6-7

    Query Governor............................................................................................................................ 6-7Client-Side Cubic Cache .............................................................................................................. 6-8

    Global Computing Case StudyCreating the Metalayer .......................................................... 6-8

    Installing the End User Layer ..................................................................................................... 6-8

    Creating a New Business Area ................................................................................................. 6-10

    Granting Business Area Access ................................................................................................ 6-15

    Optional Formatting................................................................................................................... 6-17

    Renaming Folders and Adding Descriptions.................................................................. 6-17

    Renaming an Item ............................................................................................................... 6-18

    Hiding Items in the Business Area ................................................................................... 6-19

    Formatting Currency .......................................................................................................... 6-21

    Creating a New Item for Calculations.............................................................................. 6-21

    Defining a Hierarchy .......................................................................................................... 6-22

    Creating a Join......................................................................................................................6-23

    Defining a New Item Class ................................................................................................ 6-24

    Creating a Condition........................................................................................................... 6-26

    Creating a Summary Table........................................................................................................ 6-27

    Analyzing Your Data: Discoverer User Edition .......................................................................... 6-28

    Types of Reports ......................................................................................................................... 6-28

    Table Format ........................................................................................................................ 6-29

    Page-Detail Table Format................................................................................................... 6-29Crosstab Format................................................................................................................... 6-30

    Page-Detail Crosstab Format ............................................................................................. 6-31

    Graphical Format................................................................................................................. 6-32

    Modifying Formats.............................................................................................................. 6-32

    Drilling Down and Drilling Up ................................................................................................ 6-33

  • 8/13/2019 Oracle Data Mart

    10/328

    x

    Investigating Your Data ................................................................................................................... 6-33

    Where Do You Begin? ................................................................................................................ 6-34Global Computing Case StudyAccessing the Data ................................................................ 6-35

    Creating a Report........................................................................................................................ 6-35

    Reformatting a Report................................................................................................................ 6-38

    Creating a Page-Detail Crosstab Report.................................................................................. 6-40

    Drilling Down ............................................................................................................................. 6-42

    Creating Graphs.......................................................................................................................... 6-44

    Drilling to Detail ......................................................................................................................... 6-47Drilling Out.................................................................................................................................. 6-47

    Custom Formatting .................................................................................................................... 6-47

    Publishing Your Work for Others to View ............................................................................. 6-48

    Exporting to Excel................................................................................................................ 6-48

    Exporting to HTML............................................................................................................. 6-48

    Exporting to Other File Formats........................................................................................ 6-48

    Scheduling a Workbook .................................................................................................................. 6-49

    What Have You Learned and What Is Next?................................................................................ 6-49

    7 Report Creation

    What Happens in This Step of the Process? .................................................................................. 7-1

    What Is the Role of Oracle Reports in the Data Mart? ................................................................ 7-1

    Scalability ....................................................................................................................................... 7-2Components of Oracle Reports................................................................................................... 7-2

    Global Computing Case StudyBuilding a Report.................................................................... 7-2

    Invoking Report Builder.............................................................................................................. 7-3

    Building a Report with the Report Wizard............................................................................... 7-3

    Finishing the Report............................................................................................................ 7-11

    Formatting the Report in the Live Previewer.................................................................. 7-14

    Making Changes to the Report ................................................................................................. 7-16

    Deploying a Report .......................................................................................................................... 7-18

    What Have You Learned and What Is Next?................................................................................ 7-18

  • 8/13/2019 Oracle Data Mart

    11/328

    xi

    8 Manage

    What Happens in This Step of the Process? .................................................................................. 8-1

    Data Mart Maintenance Issues......................................................................................................... 8-2

    Managing Users and Security .......................................................................................................... 8-2

    User Authentication ..................................................................................................................... 8-3

    User Quotas and Space Requirements ...................................................................................... 8-3

    Resource Profiles .......................................................................................................................... 8-3

    Roles and Privileges ..................................................................................................................... 8-4

    Global Computing Case StudyAdding Users and Roles ........................................................ 8-4

    Creating a New User ID .............................................................................................................. 8-5

    Creating a New Role .................................................................................................................... 8-9

    Managing Database Backup and Recovery ................................................................................. 8-11

    Types of Database Failure ......................................................................................................... 8-11

    Instance Failure.................................................................................................................... 8-11

    Media Failure ....................................................................................................................... 8-12Structures Used for Database Recovery .................................................................................. 8-12

    Database Backup Files ........................................................................................................ 8-12

    Redo Logs ............................................................................................................................. 8-12

    Control File........................................................................................................................... 8-13

    Backing Up a Database .............................................................................................................. 8-13

    Database ModesARCHIVELOG and NOARCHIVELOG......................................... 8-13

    Types of Database Backups ............................................................................................... 8-13Recovering a Database............................................................................................................... 8-14

    Backing Up and Recovering Read-Only Tablespaces ........................................................... 8-15

    Managing Data Mart Performance ................................................................................................ 8-15

    Capacity Planning ...................................................................................................................... 8-16

    How Many CPUs Do You Need?...................................................................................... 8-16

    Memory Requirements....................................................................................................... 8-16

    Requirements for the I/O Subsystem............................................................................... 8-17Tuning Physical Database Configuration ............................................................................... 8-17

    Setting Initialization Parameters .............................................................................................. 8-18

    Parameters Affecting Resource Consumption................................................................ 8-18

    Parameters Enabling New Features ................................................................................. 8-19

    Parameters Related to I/O ................................................................................................. 8-19

  • 8/13/2019 Oracle Data Mart

    12/328

    xii

    Managing Growth............................................................................................................................. 8-20

    Global Computing Case StudyAdding a Datafile to an Existing Tablespace................ 8-20Global Computing Case StudyCreating a Summary Table.................................................. 8-21

    Managing the ETT Environment ................................................................................................... 8-23

    Using Oracle Data Mart Builder Admin ................................................................................. 8-24

    Managing the Repository .......................................................................................................... 8-25

    Registering a Repository..................................................................................................... 8-25

    Backing Up the Repository........................................................................................................ 8-26

    Cleaning Up the Repository...................................................................................................... 8-27Managing Data Collection Agents ........................................................................................... 8-28

    Updating Data in the Data Mart .................................................................................................... 8-28

    Updating Data in the Fact Table............................................................................................... 8-29

    Updating Dimension Tables ..................................................................................................... 8-30

    Scheduling Data Refreshes ........................................................................................................ 8-39

    Scheduling a Plan ................................................................................................................ 8-39

    Deleting a Scheduled Run of a Plan.................................................................................. 8-41

    9 External Data

    The Value of External Data ............................................................................................................... 9-1

    InfoBase Package for the Oracle Data Mart Suite ........................................................................ 9-2

    How to Get the External Data ........................................................................................................... 9-3

    10 Summary

    Project Team ....................................................................................................................................... 10-1

    Project Plan......................................................................................................................................... 10-2

    Checklists ........................................................................................................................................... 10-3

    Index

  • 8/13/2019 Oracle Data Mart

    13/328

    xiii

    Figures

    31 Sources for the Independent Sales and Marketing Data Mart...................................... 3-1232 Star Schema .......................................................................................................................... 3-1333 Primary Keys in the Star Schema...................................................................................... 3-1534 OLTP Source Schema.......................................................................................................... 3-2435 Data in Flat Files .................................................................................................................. 3-2551 Global Computing CompanyOLTP Source Schema .................................................. 5-2052 Global Computing CompanyFlat File Sources ........................................................... 5-2053 Global Computing CompanyTarget Star Schema...................................................... 5-21

  • 8/13/2019 Oracle Data Mart

    14/328

    xiv

  • 8/13/2019 Oracle Data Mart

    15/328

  • 8/13/2019 Oracle Data Mart

    16/328

    xvi

  • 8/13/2019 Oracle Data Mart

    17/328

  • 8/13/2019 Oracle Data Mart

    18/328

    xviii

  • 8/13/2019 Oracle Data Mart

    19/328

    xix

    About the Cookbook

    Congratulations on purchasing Oracle Data Mart Suite! Now, you have in one placeall of the products that you need to get your data mart up and running quickly. Thiscookbook provides a how-to overview of what you need to know to build, use, andmaintain your Oracle data mart. This cookbook presents an overview of the basics

    and a guided tour of how to use the products in the suite to quickly implement adata mart. This book does not emphasize formal definition of concepts or detaileddiscussion of the underlying issuesfor details on each of the products and its use,you should refer to the product documentation available online. You probably havesigned up for the classroom training that is offered with the suitethink of thecookbook as detailed notes to complement the class.

    The organization of the cookbook follows the process flow of building andmanaging a data mart. At each step in the process, this book provides some

    technical background on the products used and then uses a case study to walk youthrough the implementation steps.

    The cookbook uses the same case study throughout to illustrate each step inbuilding a complete data mart. It shows you how to develop the businessrequirements, design and build the data mart, and provide your end users withaccess to the data mart. When you have finished the case study, you should becomfortable enough with the process and tools to begin your real-life data mart

    project.

  • 8/13/2019 Oracle Data Mart

    20/328

    xx

    Who Should Read This CookbookThis book is intended for anyone involved in implementing a data mart usingOracle Data Mart Suite. Given the cross-section of organizational units andindividuals involved in building a data mart, you could fit any of the followingroles:

    Database administrator

    Data mart designer

    Information technology (IT) professional: systems administrator, networkadministrator, business analyst

    Data extract programmer or end-user applications programmer

    Systems integrator

    In general, this book defines technical terms and concepts when they areintroduced. However, it assumes that you know the underlying operating systemand are familiar with basic system administration tasks. It also assumes someknowledge of relational database systems.

    How This Cookbook Is OrganizedThe cookbook is organized into the following chapters:

    Chapter 1, Data Mart Concepts,gives you an overview of what a data mart is,the business reasons for building a data mart, the components of Oracle DataMart Suite, and how you can expect to use each of these components to buildand manage a data mart.

    Chapter 2, Case StudyThe Global Computing Company, introduces thecase study that is used throughout the cookbook.

    Chapter 3, Requirements and Design, describes how you develop thebusiness requirements and prepare the project plan for the data mart, thentranslate these requirements into a logical and physical design.

    Chapter 4, Construct, describes how you manage data storage and retrieval,and how you exploit the data warehousing features of the Oracle8 databaseserver.

    Chapter 5, Extraction, Transformation, and Transportation, describes howyou extract data from different sources and filter, transform, and load the datainto the target data mart schema.

  • 8/13/2019 Oracle Data Mart

    21/328

    xxi

    Chapter 6, Access to the Database, describes how you let the user query andanalyze the data and get the information needed to support business decisions.

    Chapter 7, Report Creation, describes how you can create sophisticatedreports in a short time.

    Chapter 8, Manage, describes how you manage users privileges, back updata, and refresh the data in the data mart to reflect changes in the data source.

    Chapter 9, External Data, provides information about how to get data fromexternal sources.

    Chapter 10, Summary, describes how to get started building your own datamart and provides checklists for project planning.

    Conventions Used in This CookbookThe following notation and style conventions are used throughout this book:

    Technical terms are indicated inbold

    when they are first mentioned. Screen prompts, menu selections, radio buttons, and values to be filled in

    appear inbold.

    SQL statements are shown in monospacedfont.

    The following icons are used in the cookbook to highlight hints and pitfalls:

    Where You Can Get Additional Help

    Online tutorials and product documentation provide additional details on eachproduct component of the suite. If you need further help, here are some sources:

    Oracle Customer Support: Oracle Support Services can help you with answersto immediate questions related to the installation and use of Oracle Data MartSuite.

    Oracle Consulting Services:Oracle Consulting provides consulting services tocustomers who need onsite help.

    Tips and points to remember

    Pitfalls

  • 8/13/2019 Oracle Data Mart

    22/328

    xxii

    Oracle Education Classes:Besides the three-day course that is included in theOracle Data Mart Suite package, Oracle Education offers a comprehensiveportfolio of classes on Oracle software. Classes are offered all over the world. Acatalog is available online at the Oracle Web site www.oracle.com.

  • 8/13/2019 Oracle Data Mart

    23/328

    Beta Draft Data Mart Concepts 1-1

    1Data Mart Concepts

    This chapter reviews some basic concepts relating to data marts and establishessome working definitions for use in the rest of this book. Although there is a lot ofagreement among users and vendors on the definitions and terminology, they havenot yet reached complete consensus. If you talk to a dozen people, you are likely tohear about half a dozen similar but slightly differing answers for even something as

    basic as What is a data mart? This chapter takes a quick look at some definitionsand explains what a data mart is (and is not).Chapter 1, "Data Mart Concepts"

    What Is a Data Mart?A data martis a simple form of a data warehouse that is focused on a single subject(or functional area), such as Sales or Finance or Marketing. Data marts are often

    built and controlled by a single department within an organization. Given theirsingle-subject focus, data marts usually draw data from only a few sources. Thesources could be internal operational systems, a central data warehouse, or externaldata.

    How Is It Different from a Data Warehouse?Adata warehouse,in contrast, deals with multiple subject areas and is typically

    implemented and controlled by a central organizational unit such as the CorporateInformation Technology (IT) group. Often, it is called a central or enterprise datawarehouse. Typically, a data warehouse assembles data from multiple sourcesystems.

    Nothing in these basic definitions limits the size of a data mart or the complexity ofthe decision-support data that it contains. Nevertheless, data marts are typicallysmaller and less complex than data warehouses; hence, they are typically easier to

    Wh t I D t M t?

  • 8/13/2019 Oracle Data Mart

    24/328

    What Is a Data Mart?

    1-2 The Oracle Data Mart Suite Cookbook Beta Draft

    build and maintain. The following table summarizes the basic differences between adata warehouse and a data mart:

    Dependent and Independent Data MartsTwo basic types of data marts, dependent and independent, are shown in thefollowing figure. The categorization is based primarily on the data source that feedsthe data mart.Dependent data marts draw data from a central data warehouse that

    has already been created. Independent data marts, in contrast, are standalonesystems built by drawing data directly from operational or external sources of dataor both.

    The main difference between independent and dependent data marts is how youpopulate the data mart; that is, how you get data out of the sources and into thedata mart. This step, called theExtraction-Transformation-Transportation (ETT)

    Data Warehouse Data Mart

    Scope Corporate Line-of-Business (LoB)

    Subjects Multiple Single subject

    Data Sources Many Few

    Size (typical) 100 GB - TB+ < 100 GBImplementation Time Months to years Months

    What Are the Steps in Building a Data Mart?

  • 8/13/2019 Oracle Data Mart

    25/328

    What Are the Steps in Building a Data Mart?

    Beta Draft Data Mart Concepts 1-3

    process, involves moving data from operational systems, filtering it, and loading it

    into the data mart.With dependent data marts, this process is somewhat simplified because formattedand summarized (clean) data has already been loaded into the central datawarehouse. The ETT process for dependent data marts is mostly a process ofidentifying the right subset of data relevant to the chosen data mart subject andmoving a copy of it, perhaps in a summarized form.

    With independent data marts, however, you must deal with all aspects of the ETT

    process, much as you do with a central data warehouse. The number of sources arelikely to be fewer and the amount of data associated with the data mart is less thanthe warehouse, given your focus on a single subject.

    The motivations behind the creation of these two types of data marts are alsotypically different. Dependent data marts are usually built to achieve improvedperformance and availability, better control, and lower telecommunication costsresulting from local access of data relevant to a specific department. The creation ofindependent data marts is often driven by the need to have a solution within a

    shorter time.

    What Are the Steps in Building a Data Mart?Simply stated, the major steps in building a data mart are:

    Designing

    Constructing Populating

    Accessing

    Managing

    You design the schema, construct the physical storage, populate the data mart withdata from source systems, access it to make informed decisions, and manage it over

    time, as shown in the following figure:

    What Are the Steps in Building a Data Mart?

  • 8/13/2019 Oracle Data Mart

    26/328

    What Are the Steps in Building a Data Mart?

    1-4 The Oracle Data Mart Suite Cookbook Beta Draft

    Thats all there is to it!

    DesigningThe design step is first in the data mart process. This step covers all of the tasksfrom initiating the request for a data mart through gathering information about therequirements and developing the logical and physical design of the data mart. Thedesign step involves the following tasks:

    Gathering the business and technical requirements

    Identifying data sources

    Selecting the appropriate subset of data

    Designing the logical and physical structure of the data mart

    What Products and Technologies Do You Need?

    You accomplish these design tasks using a tool that facilitates design of the datamart at the logical and physical levels. In the process, the tool creates metadatarelating to the data mart structures. Ideally, you reuse this metadata at a later stageof your data mart project.

    What Are the Steps in Building a Data Mart?

  • 8/13/2019 Oracle Data Mart

    27/328

    What Are the Steps in Building a Data Mart?

    Beta Draft Data Mart Concepts 1-5

    Constructing

    This step involves creating the physical database and the logical structuresassociated with the data mart to provide fast and efficient access to the data.

    This step involves the following tasks:

    Creating the physical database and storage structures, such as tablespaces,associated with the data mart

    Creating the schema objects, such as tables and indexes defined in the design

    step Determining how best to set up the tables and the access structures, such as

    bitmap indexes, for optimal query execution

    What Products and Technologies Do You Need?

    You accomplish these construction tasks using the following tools:

    A relational database management system(RDBMS) performs several

    functions that are required for the creation and management of a data mart:

    Storage management:An RDBMS stores and manages the data as youcreate, add, and delete data.

    Fast data access:A query is a SQL statement that selects data satisfying aset of conditions that you define. You expect your users to issue frequentqueries to access the data stored in the data mart. Your users want promptanswers to their queries. The RDBMS provides mechanisms to process

    queries quickly and efficiently. Such fast data access is usually facilitated bythe use of special algorithms and structures.

    Data protection:The RDBMS provides a way to recover from systemfailures such as power failures. It also allows you to back up data on disk toa safe location and restore data from these backups if the disk fails. Such

    backup mechanisms do not need you to shut off access to usersthe datamart can be running while you protect your data.

    Multiuser support:The RDBMS provides concurrent access, the ability formultiple users to access and modify data without interfering with eachother or overwriting other changes made by other users.

    Security:You may want to restrict users to certain sets of data; for example,you may want only a very specific set of users to have access to payrollinformation. The database management system provides a way to regulateaccess by users to objects and certain types of operations.

    What Are the Steps in Building a Data Mart?

  • 8/13/2019 Oracle Data Mart

    28/328

    p g

    1-6 The Oracle Data Mart Suite Cookbook Beta Draft

    A graphical system management tool:Most operations required to manage adata mart can be accomplished by issuing the appropriate SQL commands.However, it is much more intuitive and efficient to manage the data mart usinga graphical system management tool.

    PopulatingThe populating step covers all of the tasks related to getting the data from thesource, cleaning it up, modifying it to the right format and level of detail, andmoving it into the data mart. More formally stated, the populating step involves thefollowing tasks:

    Mapping source data to target data

    Extracting data

    Cleansing and transforming the data

    Loading data into the data mart

    Creating and storing metadata

    What Products and Technologies Do You Need?

    You accomplish these population tasks using an ETT tool. This tool enables you tolook at (browse) the data sources, perform source-to-target mapping, extract thedata, transform and cleanse it, and load it into the data mart. In the process, the toolalso creates some metadata(data about data) relating to things like where the datacame from, how recent it is, what kind of changes were made to the data, and whatlevel of summarization was done. Another name for an ETT tool is a datamovement tool. You can perform the same functions using more than one tool.

    AccessingThe accessing step involves putting the data to use: querying the data, analyzing it,creating reports, charts, and graphs, and publishing these. Typically, the end user

    uses a graphical front-end tool to submit queries to the database and display theresults of the queries.

    The accessing step requires that you perform the following tasks:

    Set up an intermediate layer for the front-end tool to use. This layer, themetalayer,translates database structures and object names into business terms,so that the end user can interact with the data mart using terms that relate to the

    business function.

  • 8/13/2019 Oracle Data Mart

    29/328

    What Is in Oracle Data Mart Suite?

  • 8/13/2019 Oracle Data Mart

    30/328

    1-8 The Oracle Data Mart Suite Cookbook Beta Draft

    What Is in Oracle Data Mart Suite?

    Oracle Data Mart Suite is built on the Oracle8 database server, the industrys mostwidely used database for data warehousing. The suite integrates a visual tool fordesigning the data mart; an easy-to-use graphical tool for extracting informationfrom operational systems; a high-performance, scalable database that serves as ashared repository for both data and metadata; a Web server for intranet access to thedata mart; a new-generation querying, reporting, and analysis tool; anddocumentation and online tutorials. All components in Oracle Data Mart Suiteinstall through a single integrated process. Once installed, the components work

    together and share information seamlessly. This tight integration enables you torapidly develop and deploy your data mart.

    The components of Oracle Data Mart Suite include:

    Oracle Data Mart Designer

    Oracle8Enterprise Edition

    Oracle Enterprise Manager

    Oracle Data Mart Builder

    Oracle Discoverer

    Oracle Reports

    Oracle Web Application Server

    Oracle Data Mart DesignerYou use Oracle Data Mart Designer to design data marts and then store the designsin a repository for reference by Oracle Data Mart Builder. Usually, existingoperational systems are the source of data for independent data marts, and thelogical structure of these systems is the basis for the data mart design. Oracle DataMart Designer lets you reverse-engineer the data model of the operational sourcedatabase using a graphical interface called the Data Schema Diagrammer, and thenmodify these models to create data mart schemas like the star schema. A schemaisa collection of database objects. A star schemais a particular type of schema, calledthat because the graphical representation looks like a star, with a large fact table inthe center and the smaller dimension tables arranged around it.

    Once you design the data mart and store it in the repository, Oracle Data MartDesigner generates SQL commands to create the physical data structures, like tablesand indexes, in the Oracle8 database.

    What Is in Oracle Data Mart Suite?

  • 8/13/2019 Oracle Data Mart

    31/328

    Beta Draft Data Mart Concepts 1-9

    Oracle8 Enterprise Edition

    This is the heart of the mart!

    Oracle8 Enterprise Edition provides data management designed specifically fordecision support. Data marts require different processing techniques thantransaction processing applications due to the complex, ad hoc queries runningagainst large amounts of data. To address these special requirements, Oracle8Enterprise Edition offers a rich variety of query processing techniques, sophisticatedquery optimization for choosing the most efficient data access path, and a scalable

    architecture.The parallelism of Oracle8 Enterprise Edition speeds query response time andprovides exceptional analytical and drill-down capabilities. The server executes allcritical query operations, including scans, sorts, joins, and aggregations, in parallel.Its cost-based optimizer not only selects the best execution plan for complexqueries, but also provides support for star queries. Also, Oracle8 Enterprise Editionimplements hash joins and bitmapped indexing to provide dramatic improvementsin query execution.

    Oracle Enterprise ManagerOracle Enterprise Manager provides a complete systems management solution,with applications to manage storage, schema objects, logical and physical database

    backup, database instance startup and shutdown, and user privileges to access thedata mart. Your interface to this powerful set of applications is an easy-to-usegraphical user interface that lets you point and click through most data mart

    administration tasks. If you would rather write your own scripts, Oracle EnterpriseManager provides support for that as well.

    Oracle Enterprise Manager also provides the optional Oracle Diagnostics Pack,Oracle Tuning Pack, and Oracle Change Management Pack. These packs allow theadministrator to monitor and diagnose the operation of the database system andapplications, tune the performance of the database to meet the needs of a specificdata mart, and manage changes to the database and applications.

    Oracle Data Mart BuilderOracle Data Mart Builder provides the technology needed to perform the extractionand transformation tasks, managing the flow of data from a data source into thedata mart. You define the extraction and transformation using an intuitive, visualmetaphor, called a data flow plan,that defines how data is to be processed as itflows from data sources to a sink, which is typically a table in the data mart. You

    What Is in Oracle Data Mart Suite?

  • 8/13/2019 Oracle Data Mart

    32/328

    1-10 The Oracle Data Mart Suite Cookbook Beta Draft

    create and maintain data flow plans using a graphical interface, so you can usedrag-and-drop operations to model where your data is coming from, how you want

    it transformed, and where you want the data to go.

    Oracle DiscovererOracle Discoverer is an end-user analysis and reporting tool that allows your usersto easily navigate through the data mart, as well as drill out to other applicationssuch as Microsoft Excel spreadsheets, Web browsers, and Word documents. Thistool is built on an end-user layer architecture that abstracts the complexity ofunderlying database structures and allows users to refer to data in business terms,rather than technical terms. Oracle Discoverer provides a mechanism toautomatically create and maintain summary tables, and redirect queries to thesetables if that is faster than accessing detailed data. It also collects query statistics tohelp you build and delete summary tables based on the query activity of your users.

    You probably know how important performance of an application isif a querytool cannot provide rapid responses, users will reject it. Oracle Discoverer is

    designed to provide maximum query processing performance. It incorporatesseveral performance-oriented features, such as an expert SQL query engine thatdynamically generates performance-optimized SQL queries and exploits Oracle8warehousing functionality like bitmapped indexes.

    Oracle Discoverer Viewer lets you view and manipulate reports from a Webbrowser interface.

    Oracle ReportsOracle Reports provides an easy-to-use productive approach to developing anddelivering sophisticated reports in a timely fashion. While Oracle Discoverer letsusers construct ad hoc reports, Oracle Reports lets you quickly create a wide varietyof reports that your users can use and reuse.

    Oracle Web Application ServerOracle Web Application Server provides a scalable, secure, Web applicationplatform that works with all popular browsers. Included is Web Request Broker,which provides integration with Web servers from Netscape and Microsoft.

  • 8/13/2019 Oracle Data Mart

    33/328

    How Do You Build a Data Mart Using These Products?

  • 8/13/2019 Oracle Data Mart

    34/328

    1-12 The Oracle Data Mart Suite Cookbook Beta Draft

    This metadata, information about the source and target definitions, is stored in arepository to be retrieved later (during the process modeling phase) by Oracle Data

    Mart Builder.

    The data mart schema that you design is stored in an Oracle8 database,administered by the Oracle8 database server. Oracle Data Mart Suite has apreinstalled database that you can use as the repository for the tables that yougenerate from your design.

    Process ModelingPopulating the Data MartProcess modelinginvolves the specification and application of the changessuchas cleansing, transformation, and aggregation operationsto the source data andpopulating the data mart with the transformed data. Oracle Data Mart Builderhelps you to design and execute the extraction, transformation, and transportationof operational data into the data mart.

    Oracle Data Mart Builder provides an intuitive and graphical environment fordescribing the process needed to populate the data mart from operational sources.Those sources can be online transaction processing (OLTP) sources and enterprisedata warehouses. Oracle Data Mart Builder supports sources including Oracle, DB2,Sybase, Informix, and Microsoft SQL Server databases, as well as flat files andODBC sources.

    First, you model the process of extracting data from the source database,transforming the data and loading it into the data mart using a data flow plan. Youuse the drag-and-drop interface of the Oracle Data Mart Builder component, theData Flow Editor, and a set of predefined transformations to create the data flowplan. To enable the development of custom transforms, the Data Flow Editor alsosupports SQL, VBScript, and C++.

    How Do You Build a Data Mart Using These Products?

  • 8/13/2019 Oracle Data Mart

    35/328

    Beta Draft Data Mart Concepts 1-13

    Oracle Data Mart Builder uses the concept of BaseViews,which provide a physicalrepresentation of the source databases, and MetaViews,which allow you to create

    business representations of the source information. Because Oracle Data MartBuilder is integrated with Oracle Data Mart Designer, it can retrieve the BaseViewinformation directly from the Oracle Data Mart Designer repository.

    After you create the data flow plans, you load the data mart by running the plansusing the Oracle Data Mart Builder Data Collection Agent. Because Oracle DataMart Builder is integrated with the Oracle8 database server, you can load dataefficiently using the Oracle8 direct-path bulk loader. You can schedule these plans

    through the Windows NT scheduling service, a capability that is important for theongoing process of refreshing the information in the data mart.

    Business ModelingAccessing the DataAfter you populate the data mart, you must give your users access to the data. Thisis called business modeling. The intent is to hide the complexities of the physicaldata mart structures and present information using business-oriented logical

    structures to which end users can easily relate. Typically, you accomplish this stepusing an end-user tool such as Oracle Discoverer or Oracle Reports.

    Managing the Data MartAt this point, to generate the best execution plan for complex queries, you need togenerate the statistics that the Oracle8 cost-based optimizer requires. Also, you setup the indexes required for star query optimization and any other indexes that you

    determine are necessary, based on your knowledge of your users query patterns.

    You need to create user IDs in the database and assign different privileges to usersbased on their roles in the organization. You also need to determine how you willprotect your data from system and machine failures by creating a backup strategy.You can either use the GUI-based applications available as part of Oracle EnterpriseManager or write your own scripts to perform these functions.

    Finally, as data changes on the source system, you need to reflect the changes in the

    data stored in the data mart. Remember, you can use the Oracle Data Mart BuilderData Collection Agent to run the data flow plans, and you can schedule these plansthrough the Windows NT scheduling service. You will use this capability for theongoing process of refreshing the information in the data mart.

    This chapter presented an overview of the fundamental concepts. Now, on to thedetailed information that will help you build a successful data mart!

    How Do You Build a Data Mart Using These Products?

  • 8/13/2019 Oracle Data Mart

    36/328

    1-14 The Oracle Data Mart Suite Cookbook Beta Draft

  • 8/13/2019 Oracle Data Mart

    37/328

    Case StudyThe Global Computing Company 2-1

    2Case StudyThe Global Computing

    Company

    This cookbook presents a case study to illustrate the use of Oracle Data Mart Suiteproducts in building and managing a data mart. The case study represents activitiesat a fictitious organization, Global Computing Company. This chapter describes the

    case study and the physical and logical database structures associated with it.Oracle Data Mart Suite includes a database called DMDB, which holds all datareferred to in the case study. The installation takes care of all of the setup needed toaccess this database.

    Oracle Corporation recommends that you use this DMDB database as the startingpoint for building your data mart, rather than creating a new database. That is theapproach taken in this book.

    Case Study ScenarioThe Global Computing Company, established in 1990, distributes computerhardware and software components to customers all over the world. The Sales andMarketing department is not meeting its budgeted numbers and has beenchallenged to develop a strategy to increase the Marketing return on investment(ROI).

    Global traditionally experiences low third-quarter sales (July through September).The company has experienced bursts of growth, but for no apparent reason has hadlower first-quarter sales during the last two years compared with prior years.Margins have been shrinking, and sales for its flagship product have been declining.

    Recently, a new sales channel, the Internet, has opened, yet profits are declining.Global wants to analyze where the business is going, which components of its

    business are profitable, and which could become more profitable.

    Global Computing Information Requirements

  • 8/13/2019 Oracle Data Mart

    38/328

    2-2 The Oracle Data Mart Suite Cookbook

    The Sales and Marketing organization has been struggling with a lack of timelyinformation about what is selling, who is buying, and how they are buying. In a

    meeting with the Chief Information Officer (CIO), the Sales VP stated, By the timeI get the information, it is no longer useful! I am only able to get information at theend of each month, and it does not have the details I need to do my job. Whenasked to be more specific about what she needed, she identified the followinginformation requirements:

    Provide sales data for specific customers.

    Provide sales detail for mail order, phone, and e-mail sales on a weekly and

    monthly basis and compare them to past time periodswhen, how, and what isbeing sold by each channel?

    Provide margin information on products to understand dollar contribution foreach sale.

    The CIO has discussed these new requirements with the team and concluded thatrunning these reports against the current production system would be tooexpensive and too risky. The business analysis reporting requirements are sodiversified that the projected cost of development and expected turnaround time forrequests would make this solution unacceptable. The team recommends that theSales and Marketing departments information technologies (IT) group work withCorporate IT to build a data mart to meet their information analysis needs. Here arethe high-level business goals that the data mart project must meet:

    Globals Strategic Goal:Increase company profits by offering one-stopshopping for all hardware and software needs.

    Sales and Marketing Objective:Analyze industry trends and target specificmarket segments. Analyze sales channels and increase profits. Identify producttrends and develop a strategy for developing the appropriate channels.

    The Line of Business (LoB) IT team, in conjunction with the Corporate IT team, hasidentified Oracle Data Mart Suite as the integrated software package it needs to getthe data mart up and running as quickly as possible.

    Global Computing Information RequirementsThe LoB IT team first conducts a high-level meeting with the Sales and Marketingdepartment staff to define the following high-level issues and requirements.

    Global Computing Information Requirements

  • 8/13/2019 Oracle Data Mart

    39/328

    Case StudyThe Global Computing Company 2-3

    Business Analysis Questions

    The Sales and Marketing department wants the data mart to answer the followingquestions:

    What products are selling?

    What are the customers buying?

    What are the sales by location?

    What are the sales by selling channel?

    What products are selling together?

    What are the trends in purchases over time?

    What products are not selling?

    Where are we making moneyproducts, customers?

    Information Requirements from the Information Technology (IT) DepartmentTo build and manage the data mart, the LoB IT team needs to work with CorporateIT to get answers to questions like:

    Where is the data located today, on what systems, at which physical locations?

    What is the format of the data? Is it in a database or flat files?

    How often is the data refreshed or changed?

    How volatile is the data, meaning how often does it change?

    How is the data accessed today?

    What networking and protocols exist for accessing the data?

    What is the quality of the data? Is it accurate? Are the models fully populated?Is it really what it purports to be?

    Information Requirements from the Sales and Marketing DepartmentThe Sales and Marketing department staff need the following information:

    Customer account information by region

    Customer account information by ship-to address

    The industry, such as manufacturing, consulting, or retailing, associated withthe customer

    The Oracle Data Mart Suite Databases

  • 8/13/2019 Oracle Data Mart

    40/328

    2-4 The Oracle Data Mart Suite Cookbook

    Standard marketing department quarterly reports

    Standard sales department weekly reports Geographic sales reports by any combination of user-specified attributes

    The identity of the best and worst sellers

    Trends in the marketplace over time

    The team determines that the order entry database is the primary source of data forthe data mart. The order entry database can provide data for:

    All of the companys customers

    All of the packages under which the company sells products

    All of the off-invoice discounts and allowances

    Data for all company products is located in flat files.

    Use these requirements as your guide as you move through the development stepsof the data mart.

    The Oracle Data Mart Suite DatabasesThe installation of Oracle Data Mart Suite provides you with a databaseinstanceDMDB. The DMDB database holds all of the system tables and the GlobalComputing Company data.

    What Does the DMDB Database Include?During the Oracle8 database server package installation, the DMDB database isinstalled. DMDB includes all of the database structures and user IDs that you needto start building your data mart without becoming overwhelmed with databasecreation activities. The database also contains all structures that the tools in OracleData Mart Suite need to access and work with the database.

    Database FilesOracle8 server database files are organized into logical units called tablespaces.Table 21lists all of the tablespaces and associated files in the DMDB database,along with a short description of the type of data in each tablespace.

    The Oracle Data Mart Suite Databases

  • 8/13/2019 Oracle Data Mart

    41/328

    Case StudyThe Global Computing Company 2-5

    Other files required for the functioning of the DMDB database are:

    log1dmdb.ora, log2dmdb.oraRedo log files, which hold data required toprotect the database from system failures

    ctl1dmdb.ora, ctl2dmdb.oraControl files, which hold bookkeepinginformation about the status of the database and its associated files

    initdmdb.oraInitialization file, which records values of configurableparameters that influence the functioning of the database

    Database Users

    Table 22describes the user accounts that are used in this book and that are already

    configured in the DMDB database. All information is provided here so that you canrefer to it when you need it. The DMDB database contains other accounts, but youdo not use them in the exercises in this book. At this point, you may not be familiarwith all technical terms used in this table. The technical terms are explained in latersections.

    Table 21 Tablespaces in the DMDB Database

    Tablespace Type of Data File Name

    SYSTEM Consists of the data dictionary, including definitions oftables, views, and stored procedures needed by the RDBMS.

    sys1dmdb.ora

    ROLLBACK Holds the rollback segments, which record the data neededto undo changes made by database transactions.

    rbs1dmdb.ora

    USERDATA Holds the SAMPLEOLTP and SAMPLESTAR data. Used bythe case study to hold data for user MARTY.

    usr1dmdb.ora

    TEMP Serves as a temporary workspace for operations that sort alarge amount of data and cannot do it all in memory.

    tmp1dmdb.ora

    Table 22 User Accounts for the DMDB Database

    Account Password Type Description Roles

    system manager Administrator Has privileges that allow databaseadministration tasks.

    CONNECT,RESOURCE,DBA

    sys change_on_install Administrator Owns the data dictionary. Not used inthis book.

    Mostavailableroles

    The Oracle Data Mart Suite Databases

  • 8/13/2019 Oracle Data Mart

    42/328

    2-6 The Oracle Data Mart Suite Cookbook

    As you step through the process of creating your data mart using this cookbook,you use the user IDs yvesand marty.Think of the accounts and all structurescreated by these accounts as your play area, where you are free to experiment.Because it is quite possible that you may make a mistake or two along the way, mostof the exercises requiring changes to the database are confined to this area. You will

    be directed to switch to the installed demo tables owned by user samplestarwhenyou need to access a consistent set of data.

    Note that the user dmadminowns the default Data Mart Builder repository. Duringthe Data Mart Suite installation, the user dmadminis mapped to the Data MartBuilder registereduser called system, as explained in Data Mart BuilderRepository. This user is not the same as the database user system.

    Data Mart Builder Repository

    In this release, Oracle Data Mart Builder does not use the database for userauthentication. The list of registered Builder users, as well as their privileges, ismaintained in the Builder repository. This repository, named DEFAULT, ships withtwo predefined Builder users: system (password manager) and guest (nopassword).

    dmadmin manager Administrator Owns Data Mart Designer and DataMart Builder repositories. Also owns apublic Discoverer End User Layerwith a defined business area forGlobal Computing Business.

    CONNECT,RESOURCE,DBA

    marty marty User Owns a schema that represents thetarget data mart schema as it would beif the exercises in Chapter 3arecompleted correctly. The tables containno data.

    CONNECT,RESOURCE,DBA

    sampleoltp sampleoltp User Owns the order entry applicationtables that feed the data mart.

    CONNECT,RESOURCE

    samplestar samplestar User Owns the installed target tables for theGlobal Computing case study.

    CONNECT,RESOURCE

    yves yves User Used inChapter 3as a subordinateData Mart Designer user.

    CONNECT,RESOURCE

    Table 22 (Cont.) User Accounts for the DMDB Database

    Account Password Type Description Roles

    Database Structures for the Global Computing Case Study

  • 8/13/2019 Oracle Data Mart

    43/328

    Case StudyThe Global Computing Company 2-7

    Database Structures for the Global Computing Case Study

    This sections describes the database structures you will use in creating the datamart for the Global Computing case study.

    Source DataThe primary source of data for the data mart is the order entry database. All data inthe order entry database is owned by one user, sampleoltp,and is stored in theDMDB database. Flat files contain additional data needed for the data mart. This

    arrangement, unusually simple, was created for this exercise. A closerrepresentation of reality would have meant that the tables reside on a differentdatabase on a different machine.

    The source data, from both the database tables and flat files, is discussed in detail inChapter 3.

    Target TablesTo represent the process of designing and creating the tables that hold the data martinformation, in Chapter 3and Chapter 4you will design and create the tables foruser yves. Because you may make some mistakes in the design and creation of thetables, the installation provides tables that are already created, but unpopulated.These tables are owned by the user marty.In Chapter 5, you will load the tables asuser martyusing the ETT tool. In Chapter 6, which describes how to use OracleDiscoverer, you will use tables owned by samplestarto look at a consistent set of

    data when analyzing the data.

    Overview of the Hands-on ExercisesIn the exercises in this cookbook, file specifications use the Windows NT format. Ifyour database is on another platform, such as Sun Solaris, use the appropriateformat for any database-related file specifications.

    Here is a quick overview of what you will learn in the hands-on exercises:

    DesignDesign the data mart star schema from the operational sources, anOLTP schema and flat files.

    Construct storageLearn the fundamentals of how to create storage using theOracle8 database server. The exercises use Oracle Enterprise Manager as thesystem management tool.

    Database Structures for the Global Computing Case Study

  • 8/13/2019 Oracle Data Mart

    44/328

    2-8 The Oracle Data Mart Suite Cookbook

    PopulateUse Oracle Data Mart Builder to construct data flow plans andpopulate the fact and dimension tables.

    AccessSet up Oracle Discoverer for end-user access and use OracleDiscoverer to analyze data. Create reports using Oracle Reports.

    ManageManage the data mart for efficient performance, back up the data toprotect against system failures, and keep the data current by schedulingrefreshes.

  • 8/13/2019 Oracle Data Mart

    45/328

    Requirements and Design 3-1

    3Requirements and Design

    What Happens in This Step of the Process?This chapter looks at the issues involved in the design of a data mart. Think of thischapter as a collection of tips on how to run your data mart implementation project.

    Just as important as learning what you should do is learning what to watch out

    forthe things that can trip you up on a project like this (and these may not alwaysbe technical issues).

    You build the data mart in an iterative mannerthe end users tell you what theywant, you deliver some data, and the end users examine it and develop newrequirements. Then, you revisit your design and the cycle begins again. This is theI know it only when I see it phenomenon. However, you have to start somewhere.

    The driving business factor for the data mart is the need for information, and the

    best way to start the design process is by identifying the business needs. You shouldinvolve those who have an investment in the data mart, such as the businesssponsor and the end user, as early as possible in the design process. Together, youshould agree on the information requirements that the data mart must fulfill, thedata sources, the technical requirements (such as how often the data needs to berefreshed from the source), and the success criteria for the project.

    The steps in designing a data mart are:

    1. Conducting a study to define the scope of the project2. Defining the business and technical requirements for the data mart

    3. Developing the logical and physical design of the data mart

    In the rest of this chapter, you look at the issues involved in each one of these steps.Then, you apply these general principles to the Global Computing case study tocreate a logical and physical data mart design.

    What Is the Role of Data Mart Designer?

  • 8/13/2019 Oracle Data Mart

    46/328

    3-2 The Oracle Data Mart Suite Cookbook

    What Is the Role of Data Mart Designer?

    In addition to a powerful graphical interface, Oracle Data Mart Designer provides ametadata repository that holds detailed design information about your databases.The repository is implemented as a set of tables in an Oracle database. The data youenter in the repository is available to any user who has at least read access to therepository application system. Thus, the metadata generated in Designer can beshared by Oracle Data Mart Builder and Oracle Discoverer.

    The data can also be accessed through the open repository metamodel views by anySQL reporting tool, other third-party products, or custom in-house applications. Itcan even be made available through a Web browser, using Oracle Web ApplicationServer. Oracle Data Mart Designer also includes a set of standard RepositoryReports that you can access from the Designer Front Panel.

    You can use components of Data Mart Designer to help you create the logical andphysical design of the data mart:

    Use Entity Relationship Diagrammer to create the logical design of the datamart.

    Use Database Design Transformer and Design Editor to create the physicaldesign of the data mart.

    Use Server Generator to generate scripts that contain SQL data definitionlanguage (DDL) commands, such as CREATE TABLE. You can use these scriptsin later steps to create the objects in the database.

    Defining the Scope of the Data Mart ProjectBefore you begin to implement the data mart, you need to develop a plan for itsdelivery. Critical inputs to this plan are the information requirements and prioritiesof your users. After this information has been define