Download Create a New Project

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Clusterpoint wikipedia , lookup

Versant Object Database wikipedia , lookup

Data vault modeling wikipedia , lookup

Relational model wikipedia , lookup

Database model wikipedia , lookup

Transcript
Multiple Layer Approach to Modeling
Create a New Framework Manager Project and call it “My Project”
Set the default language to “English”
Select Cancel to the import metadata wizard
Organize the model information structure according to best practice methods. In this workshop
we will organize our model into a 3-layer approach.
1. Create a new namespace and call it “Database Layer”
2. Create a new namespace and call it “Performance Layer”
3. Create a new namespace and call it “Presentation Layer”
5. Under the “Database Layer” namespace create a new namespace and call it “GSDWH”
We will not import tables from “go_data_warehouse” database.
6. From the Tasks menu, run the Metadata Wizard.
???pg-3-29
7. Import the following tables.
??? pg-3-29
8. Apply relationships for the imported tables.
??? pg-3-30
The model will look something like this.
??? pg-3-30
1.
2.
3.
4.
Make sure all the relationships exist in the database view
1. Maintain Relationships
There are a few relationships that need to be added for LOOKUP information.
 Review and maintain the following relationships between the imported query subjects
in the “GSDWH” namespace:
o Link GENDER_LOOKUP to RETAILER_DIMENSION 1.1 to 1.n
o Link GENDER_LOOKUP to STAFF_DIMENSION 1.1 to 1.n
o Link PRODUCT_LOOKUP to PRODUCT_DIMENSION 1.1 to 1.1
 Create relationships to link the TIME_DIMENSION to the Forecasted data
information:
o Link TIME_DIMENSION to INVENTORY_LEVELS_FACT 1.1 to 1.n via
MONTH_KEY
o Link TIME_DIMENSION to SALES_TARGET_FACT 1.1 to 1.n via
MONTH_KEY
o Link TIME_DIMENSION to PRODUCT_FORECAST_FACT 1.1 to 1.n
via MONTH_KEY
 For Regional Inventory Monitoring create this relationship:
o Link SALES_TERRITORY_DIMENSION to
INVENTORY_LEVELS_FACT 1.1 to 1.n
2. Look at Determinants
Notice that by opening up the imported query subjects (by right-clicking them and clicking Edit
Definition), and looking under the “determinants” tab, that existing keys and indexes defined in
the database are accessible to the data modeler.
 Review Determinant information for each imported database table.
There should be no need to modify the determinant information imported by your data
source or to specify additional determinants for all Query Subjects except the
TIME_DIMENSION query subject.
 Set determinants for the TIME_DIMENSION
Here we want to modify the determinants in the TIME_DIMENSION to reflect the new
relationships we created to the Forecasted Information.
Define the levels that exist in the Time Dimension Query Subject:
Detereminant1: Year
Key= Current_Year;
Attributes= none
Group By: False; Uniquely Identified: False
Detereminant2: Quarter
Key= Current_Year, Quarter_Key;
Attributes= Current_Quarter
Group By: False; Uniquely Identified: False
Detereminant3: Month
Key= Current_Year, Quarter_Key, Month_Key;
Attributes= Current_ Month, Month, Days in Month
Group By: TRUE; Uniquely Identified: False
Detereminant4: Day
Key= Current_Year, Quarter_Key, Month_Key, Day_Key;
Attributes= Day_Date, Date_of_Week, Day_of_Month, , Week_of_Month, Week_of_
Quarter, Week_of_ Year, Weekday
Group By: False; Uniquely Identified: True
For each Query item selected, the first determinant that references it either through a
determinant column or through a determined column will be included in the set of required
determinants and that’s why the order in which the determinants are defined is important.
Non-unique keys identify logical groupings in the data. If you use the ‘Merge into Regular
Dimension’ or ‘Convert to Dimension’ tools you will see that each determinant translates to a
level and the order of the determinants is preserved.
Only one ’hierarchy’ is supported in Determinants.
??? pg-3-34
Resolve valid multiple relationships (‘ambiguous join paths’) by
creating multiple query subjects for Role Playing Dimensions.
1. Review the existing time dimension and add 2 more time dimensions for the many dates
attached to the sales data.
To add two more instances for the TIME_DIMENSION to handle the multiple date
relationships, there are two approaches. Whatever method used, in the end we need to
create 2 new query subjects: Time Dimension (Shipto) and Time Dimension (Close).
The following relationships will need to be maintained and/ or created:
o Link TIME_DIMENSION.DAY_KEY to SALES_
FACT.ORDER_DAY_KEY 1.1 to 1.n
o Link TIME_DIMENSION(SHIPTO).DAY_KEY to SALES_
FACT.SHIP_DAY_KEY 1.1 to 1.n
o Link TIME_DIMENSION(CLOSE).DAY_KEY to SALES_
FACT.CLOSE_DAY_KEY 1.1 to 1.n
Create Resolve valid multiple relationships (dimensions with
levels, hierarchies and keys to enable automatic aggregation
capabilities and OLAP query functionality on relational sources.
Create multiple hierarchies within the dimension if desired.
1. Inside the “Performance Layer” namespace, create a new namespace called “Dimensional
View”.
This namespace will be used to create a dimensional layer. This may require creating
complex query subjects to resolve SQL traps before creating dimension objects, or for a
demoralized source dimension objects to be created directly.
With the information provided so far, we are able to create our dimensional query subjects.
2. Save and backup the Framework Manager Model.
3. Create Dimensional Objects for Product Information
 Select the Dimensional View Namespace
 Right click, and then click Create Regular Dimension.
 Create the Product Dimension from the Product Dimension for the query items in
the Product related tables from the Database Layer. Create the hierarchy using the
following query items as businessKeys and memberCaptions:
Level
Query Subject
1
PRODUCT_LINE
2
PRODUCT_TYPE
3
PRODUCT_LOOKUP

businessKey
memberCaption
PRODUCT_LINE
PRODUCT_LINE_CODE
PRODUCT_TYPE
PRODUCT_TYPE_CODE
PRODUCT_NUMBER PRODUCT_NUMBER
Set each level as a unique level.
 Rename the new regular dimension to “Product Dimension”.
4. Create Dimensional Objects for Time.
 Select the Dimensional View Namespace
 Right click, and then click Create Regular Dimension.
 Create the Time Dimension from the Time Dimension in the Database Layer.
Create the hierarchy using the following query items as businessKeys and
memberCaptions:
Level
Query Subject
1
TIME_DIMENSION
2
TIME_DIMENSION
3
TIME_DIMENSION


businessKey
CURRENT_YEAR
CURRENT_MONTH
DAY_DATE
memberCaption
CURRENT_YEAR
CURRENT_MONTH
DAY_DATE
Set each level as a unique level.
Rename the new regular dimension to “Time Dimension”.
5. Save your work.
Create measure dimensions and adjust/ set scope relationships.
1. Create a measure dimension for Sales Information.
 Select the Dimensional View Namespace
 Right click, and then click Create Measure Dimension.
 Select the fact query SALES_FACT from the “GSDWH” namespace.
 Click Next Finish.
 Rename the new measure dimension to “Sales Information”.
2. Save your work.
3. Create a measure dimension for Product Forecast Information.
 Select the Dimensional View Namespace
 Right click, and then click Create Measure Dimension.
 Select the fact query PRODUCT_FORECAST_FACT from the “Dimensional View”
namespace.
 Click Next Finish.
 Rename the new measure dimension to “Product Forecasts”.
4. Save your work.
5. Set the Scope relationships for our measure dimensions.
 Select the Dimensional View Namespace
 Select the Dimension Map View.
??? pg-3-39
 From the View menu, select the Views menu item and select show scope.
??? pg-3-39
 Select the Quantity query item displayed in the dimensional view under the Sales
Information located under the Measure Tab.
??? pg-3-40
 Ensure the scope has been set properly for Sales Information.

Select the EXPECTED_VOLUME query item displayed in the dimensional view
under the Product Forecast located under the Measures tab.
??? pg-3-40
 Ensure the scope has been set properly for Product Forecasts.
 Ensure EXPECTED_VOLUME is set to the right scope for the TIME DIMENSION.
Create Business View with the star-schema Grouping Wizard.
1. Create a star schema grouping for Sales Information.
 In the Dimensional Layer namespace select the Sales Information measure
dimension.
 From the Tools menu, select “Create Star Schema Grouping”.
??? pg-3-41
??? pg-3-41
2. Create a start schema grouping for Product Forecasts.
3. Move the newly created namespaces (Sales Information and Product Forecast) to the
Presentation Layer.
4. Save and backup the Framework Manager Model.