Skip Headers
Oracle® Warehouse Builder User's Guide
11g Release 1 (11.1)

B31278-06
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

12 Designing Target Schemas

Warehouse Builder is also a design tool that enables you to design your data warehouse. Target schemas contain all the necessary data objects in your data warehouse such as tables, views, dimensions, and cubes. In a traditional data warehousing implementation, there is typically only one target schema, which is the data warehouse target. You can design target schemas, both relational and dimensional, using the Data Object Editor.

This chapter includes the following topics:

Designing the Target Schema

To create a target schema, you create any of the dimensional or relational objects listed in Table 13-1. You can design a relational target schema or a dimensional target schema. In this section, the term dimensions refers to both regular dimensions and Slowly Changing Dimensions (SCDs).

Designing a Relational Target Schema

A relational target schema is one that contains relational data objects such as tables, views, materialized views, and sequences. All the warehouse data is stored in these objects.

To design a relational target schema: 

  1. If you have not already done so, create an Oracle module that will contain the objects for your target schema. Ensure that the location associated with this module refers to the target schema.

  2. Create the relational data objects.

    Relational objects that you can create include tables, views, materialized views, and sequences. You can create additional structures pertaining to relational objects such as constraints, indexes, and partitions. You may have already imported some existing target objects. To create additional data objects, refer to "Defining Oracle Data Objects".

    Note that this step only creates the definitions of the objects in the workspace. To create the objects in the target schema, you must deploy these objects.

  3. Configure the data objects.

    In this step, you set the physical properties of the data objects. For example, you specify the name of the tablespace in which a table should be created. Each data object has a set of default configuration properties. You can choose to modify these default values.

    See "Configuring Data Objects".

  4. Validate the data objects.

    Validation verifies the metadata definitions and configuration properties of data objects. Correct any errors that are encountered during the validation.

    See "Validating Data Objects".

  5. Generate code that will create these data objects in the target schema.

    Generation produces code that is required to create the data objects created in step 2 in the target schema.

    See "Generating Data Objects".

Designing a Dimensional Target Schema

A dimensional target schema uses dimensional objects to store the data warehouse data. Dimensional objects include dimensions and cubes. Dimensional objects transform the visualization of the target schema from a table-oriented environment to a more business-focussed environment. This helps you obtain answers to complex analytical queries quickly and more efficiently.

To design a dimensional target schema: 

  1. If you have not already done so, create the Oracle module that will contain your dimensional objects. Ensure that the location associated with this module refers to the target schema.

  2. Create the dimensions required in your target schema.

    See "Creating Dimensions".

  3. Create time dimensions.

    Data warehouses use time dimensions extensively to store temporal data. See "Creating Time Dimensions".

  4. Create the cubes required for the target schema.

    See "Creating Cubes".

  5. Configure the dimensions and cubes.

    Configure the dimensional objects you created in steps 2, 3, and 4 to set physical properties for these objects. You can accept the default properties or modify them.

    See "Configuring Data Objects".

  6. Validate the dimensions and cubes.

    In this step, you verify the metadata definitions and configuration properties of the dimensional objects created in steps 2, 3, and 4. Correct any errors resulting from the validation.

    See "Validating Data Objects".

  7. Generate code that will create these dimensions and cubes in the target schema.

    See "Generating Data Objects".

Note:

Defining dimensional objects only creates the definitions of these objects in the workspace. To create these objects in the target schema, you must deploy these objects

Configuring Data Objects

Configuration defines the physical characteristics of data objects. For example, you can define a tablespace and set performance parameters in the configuration of a table. Or you can specify the type of implementation for dimensional objects. You can change the configuration of an object any time prior to deployment.

You can define multiple configurations for the same set of objects. This feature is useful when deploying to multiple environments, such as test and production.

See Also:

"Creating Additional Configurations" in the Oracle Warehouse Builder Installation and Administration Guide.

All objects have a Deployable parameter, which is selected by default. To prevent an object from being deployed, clear this parameter.

You can configure objects using the Data Object Editor or the Project Explorer. To configure an object using the Data Object Editor, use the Configuration panel of the editor. This panel displays the configuration details for the object currently selected on the canvas. You can even drill down to, say and index in a table in the Selected Objects tab of the Explorer panel to see those configuration details.

To configure an object using the Project Explorer:

  1. In the Project Explorer, select the object and click the Configure icon.

    or

    Right-click the object and select Configure.

    The Configuration Properties dialog box is displayed.

  2. Select a parameter to display its description at the bottom of the right panel.

  3. Enter your changes and click OK.

Validating Data Objects

Validation is the process of verifying metadata definitions and configuration parameters. These definitions must be valid before you proceed to generation and deployment of scripts.

Warehouse Builder runs a series of validation tests to ensure that data object definitions are complete and that scripts can be generated and deployed. When these tests are complete, the results display. Warehouse Builder enables you to open object editors and make corrections to any invalid objects before continuing. In addition to being a standalone operation, validation also takes place implicitly when you generate or deploy objects.

To detect possible problems and deal with them as they arise, you can validate in two stages: after creating data object definitions, and after configuring objects for deployment. In this case, validating objects after configuration is more extensive than validating object definitions.

Tip:

Validate objects as you create and configure them to resolve problems as they arise. The same error-checking processes are run whether you are validating the design or configuration.

When you validate an object after it has been defined, the metadata definitions for the objects you have designed are checked for errors. For example, if you create a table, Warehouse Builder requires that columns be defined. When this object is validated, Warehouse Builder verifies that all components of the table have been defined. If these components are missing, validation messages display in the Validation Results window.

If you validate an object after it has been configured, metadata definitions are re-checked for errors and configuration parameters are checked to ensure that the object will be generated and deployed without any problems. You can then make edits to invalid objects.

You can validate a single object or multiple objects at a time. You can also validate objects that contain objects, such as modules and projects. In this case, all data objects contained by that object are validated. Use the Project Explorer or the Data Object Editor to validate data objects.

When you validate objects, Warehouse Builder displays the Validation Results window that contains the results of the validation. For more information about this dialog box, click Help and then Topic.

Validating Data Objects Using the Project Explorer 

In the Project Explorer, select the data object and click the Validate icon. You can select multiple objects by holding down the Ctrl key while selecting objects.

or

In the Project Explorer, select the data object or data objects. To select multiple objects, hold down the Ctrl key while selecting objects. Right-click the data object and select Validate. If you selected multiple objects, ensure that the Ctrl key is pressed when you right-click.

Validating Data Objects Using the Data Object Editor 

Right-click the icon representing the data object on the Data Object Editor canvas and select Validate.

or

Select the object on the canvas and either click the Validate icon or select Validate from the Object menu.

Editing Invalid Objects

The results of validating data objects are displayed in the Validation Results window. From this window, you can access the editors for objects and rectify errors in their definition, if any.

To edit invalid definitions:

  1. In the Validation Results window, double-click an invalid object from the tree or from the validation messages grid.

    An editor for the selected object is displayed.

  2. Edit the object to correct problems.

  3. Close the editor when you are finished and re-validate.

Generating Data Objects

When you generate data objects, Warehouse Builder produces the code required to create the data objects in the target schema. Warehouse Builder generates the following types of scripts:

You can view the generated scripts and also store them to a file system.

When you generate code for a data object, Warehouse Builder first validates the object and then generates code.You may skip the validation step and directly generate code for your data objects. However, it is recommended that you validate objects before you generate them. This enables you to discover and correct any errors in data object definitions before the code is generated.

Use the Project Explorer or the Data Object Editor to generate code for data objects. When you generate objects, Warehouse Builder displays the Generation Results window that contains the results of the generation. For more information about this window, click Help and then Topic.

Generating Data Objects Using the Project Explorer

To generate a single data object, select the data object and click the Generate icon. Or right-click the data object and select Generate.

To generate code for multiple objects, select the objects by holding down the Ctrl key and click the Generate icon. Or select the data objects and, while continuing to hold down the Ctrl key, right-click and select Generate.

Generating Objects Using the Data Object Editor

Open the Data Object Editor for the data object by right-clicking the object and selecting Open Editor. The canvas displays a node that represents the data object.

Right-click the data object node on the canvas and select Generate.

or

Select the data object node on the canvas. Click the Generate icon or select Generate from the Object menu.

Viewing Generated Scripts

To view the generated scripts:

  1. From the Generation Results window, select an object in the navigation tree on the left of the Generation Results window.

  2. Select the Scripts tab on the right of this window.

    The Scripts tab contains a list of the generated scripts for the object you selected.

  3. Select a specific script and click View Code.

    The selected script displays in a code viewer, which is read-only.

Saving Generated Scripts to a File

To save generated scripts:

  1. From the Generation Results window, select an object from the navigation tree on the left.

  2. Select the Scripts tab from the bottom section of the window.

    The Scripts tab contains a list of the generated scripts for the object you selected.

  3. Select a specific script and click Save As.

    The Save dialog box opens and you can select a location where you want to save the script file.