Oracle9i Warehouse Builder User's Guide Release 2 (v9.0.2) Part Number A95949-01 |
|
This chapter describes how to define a target module and define relational targets within a module.
This chapter includes the following topics:
Warehouse Builder stores definitions for target schemas in target warehouse modules.
To create a target warehouse module:
Warehouse Builder displays the New Module Wizard welcome page.
The wizard displays the Name page.
If you intend to import definitions from a schema or an Oracle Designer repository:
Warehouse Builder displays the New Database Link dialog.
Warehouse Builder displays a Finish page summarizing the information you entered. If you need to change any information, navigate back through the wizard pages using the Back button.
Warehouse Builder creates the module in the active project and inserts its name in the MODULES branch of the navigation tree.
You can view the warehouse module in the Warehouse Module Editor. Use the Warehouse Module Editor to view the structure of a module and create objects within the module.
To open the Warehouse Module Editor:
Warehouse Builder lists the project modules.
The Warehouse Module Editor opens displaying the navigation tree.
This section shows you how to create a definition for a table using the New Table Wizard and how to modify the table definition using the property sheet.
When you create a definition for a table, you enter detailed information about the table into a series of pages in the New Table Wizard.
To create a table definition:
Warehouse Builder displays the welcome page for the New Table Wizard.
The wizard displays the Name dialog.
The wizard displays the Columns page.
Repeat these steps for each column.
The wizard displays the Constraints page. You can define constraints, if necessary.
The wizard displays the Finish page. Verify the description.
The wizard creates a definition for the table, stores the definition in the warehouse module, and inserts the name in the navigation tree under TABLES.
You can view the definition for a table object in the Table Editor. You use the Table property sheet to edit the table.
To open the Table Editor, right-click the table in the navigation tree and select Edit. Warehouse Builder displays the Table Editor.
You can update the definition for a table by editing entries in the property sheet. In the Warehouse Module Editor, right-click the table and select Properties.
The property sheet for the table has the following tabs:
The following examples show you how to order columns within a table, change a UK to a PK constraint, create a check constraint, and create attribute sets.
By default, the column names within a table are sorted in the order they were created. The order of column names in the property sheet is propagated to the DDL script that Warehouse Builder generates to create the table. The default ordering can cause problems if an application is sensitive to the order of columns. You can order columns so that a generated concatenated key for a fact table corresponds to expected query usage. This ordering can greatly influence query performance.
Warehouse Builder displays the information on the columns in the table.
You can order the following warehouse objects:
Warehouse Builder automatically generates a UK constraint for each Level defined within a dimension table. The generated constraint is always on the column defined as the Level ID column, and except for the lowest-level, these constraints are purely logical constraints that are not used in the DDL to create the table. You can edit these constraints but you cannot remove them. If you attempt to remove one of these constraints, Warehouse Builder displays an error message.
When you declare a PK or UK constraint, you cannot later change it to a FK or CK constraint. You must drop the constraint and create a new one. Similarly, if you create an FK constraint, you cannot change it to any other kind of constraint. You must drop the constraint and create a new one.
For a dimension table, Warehouse Builder automatically generates a UK rather than a PK constraint on the column that defines the lowest level of aggregation.
To change a constraint type:
Warehouse Builder displays the information on all constraints defined in the table.
The editor only allows you to select a UK or PK constraint.
Warehouse Builder updates the definition of the underlying table.
You can add a check constraint to any table column. These constraints enforce business rules on values stored in a dimension, fact, or table. They can also be used to define a not null constraint. However, using the Add Check Constraints feature can slow your load performance.
To add a check constraint:
Warehouse Builder displays information on all the constraints defined in the table.
Warehouse Builder inserts a row in the top pane.
Warehouse Builder stores the CHECK constraint in the property sheet.
A CHECK integrity constraint requires that a condition be true or unknown for every row of the table. If a statement causes the condition to evaluate to false, then the statement is rolled back.
The condition of a CHECK constraint has the following limitations:
For additional information on CHECK constraints, see the Oracle8i/9i Application Developer's Guide - Fundamentals.
Columns in a table are called attributes. Each table in the warehouse module has a predefined attribute set consisting of all the table columns and another attribute set for each constraint. You can create additional named attribute sets containing any number of the table columns in the order you specify.
You can add the following types of attribute sets:
Attribute sets are used in mappings.
To add an attribute set:
Warehouse Builder displays information on the attribute sets defined in the table.
Warehouse Builder inserts a row in the top pane.
The order in which you select the columns determines their initial order in the attribute set.
Warehouse Builder displays the Advanced Attribute Set Properties dialog.
You can import definitions for tables, Views and Sequences into a warehouse module using the Import Metadata Wizard. For instructions, see "Importing Definitions from a Database".
This section shows you how to create and update definitions for materialized views. You create a definition for a materialized view using the New Materialized View Wizard. You modify a view definition by editing a property sheet. In the New Materialized View Wizard, you enter:
When you create a definition for a materialized view, you enter detailed information about it into a series of pages for the New Materialized View Wizard.
To create a materialized view definition:
Warehouse Builder displays the welcome page for the New Materialized View wizard.
The wizard displays the Name page.
The wizard displays the Columns page.
To define a column:
Repeat this procedure for each column.
The wizard displays the Query Text page.
Figure 3-16 shows sample query text.
Repeat these steps to define the other constraints.
The wizard displays the Finish page. Verify the summary, and if you need to modify the definition, click Back.
The wizard creates a definition for the materialized view, stores this definition in the warehouse module, and inserts its name in the warehouse module navigation tree. Confirm this by fully expanding the editor navigation tree. The name of the materialized view now occurs under the MATERIALIZED VIEWS subtree.
You can view the materialized view in the Materialized View Editor. Use the property sheet to edit the materialized view.
To open the Materialized View Editor, right-click the materialized view and select Edit. The editor diagrams the materialized view and its references.
To open the Materialized View properties sheet, right-click the materialized view and select Properties. You can modify the view definition by editing the property sheet. For examples on editing a property sheet, see "Updating Table Definitions".
To rename a materialized view, right-click the view name and select Rename. Type the new name over the highlighted object name.
This section describes how to create and update definitions for conventional views. You create a definition for a conventional view using the New View Wizard. You update the view definition by editing its property sheet.
Although this view has similar structure to a materialized view, the views differ as follows:
To create a view definition:
Warehouse Builder displays the welcome page for the wizard.
The wizard displays the Name page.
The wizard displays the Columns page.
Repeat this procedure for each column.
The wizard displays the Query Text page. When you create the definition for a view, you can:
Figure 3-19 shows sample query text.
The wizard displays the Define Constraints page.
Use this page to define logical constraints for a view. These constraints can be useful when the view serves as a data source in a mapping. The Mapping Editor can use the logical foreign key constraints to include the referenced dimensions as secondary sources in the mapping.
Define foreign key reference constraints as described in step 8 in "Creating a Materialized View Definition".
Warehouse Builder displays the Finish page. Verify the description, and if you need to modify the definition, click Back.
Warehouse Builder creates a definition for the view, stores the definition in the warehouse module, and inserts its name in the warehouse module navigation tree under VIEWS.
You can display the view in the View Editor. Use the property sheet to edit the view.
To open the View Editor, right-click the view and select Edit. The editor diagrams the view and its references.
To open the View properties sheet, right-click the view and select Properties. You can modify the view definition by editing the property sheet. For examples on editing a property sheet, see "Updating Table Definitions".
To rename a view, right-click the view name and select Rename. Type the new name over the highlighted object name.
A sequence object populates the warehouse key column for a dimension. To define a sequence object, you use the New Sequence Wizard. You configure the sequence settings when you use the sequence in a mapping. See "Adding Mapping Sequences" for more information.
To define a sequence object:
|
Copyright © 1996, 2002 Oracle Corporation. All Rights Reserved. |
|