Dimension
Table
Dimension table is one that describes the business
entities of an enterprise, represented as hierarchical, categorical information
such as time, departments, locations, and products. Dimension tables are
sometimes called lookup or reference tables.
Location
Dimension
In a relational data modeling, for normalization purposes,
country lookup, state lookup, county
lookup, and city lookups
are not merged as a single table. In a dimensional data modeling (star schema),
these tables would be merged as a single table called LOCATION DIMENSION for performance and slicing data requirements.
This location dimension helps to compare the sales in one region with another
region. We may see good sales profit in one region and loss in another region.
If it is a loss, the reasons for that may be a new competitor in that area, or
failure of our marketing strategy etc.
Example
of Location Dimension:
Country
Lookup
Country
Code Country Name DateTimeStamp
USA United
States Of America 1/1/2005 11:23:31 AM
State
Lookup
State Code
State Name DateTimeStamp
NY New York 1/1/2005
11:23:31 AM
FL Florida 1/1/2005
11:23:31 AM
CA California 1/1/2005
11:23:31 AM
NJ New Jersey 1/1/2005 11:23:31 AM
County Lookup
County Code
County Name DateTimeStamp
NYSH Shelby 1/1/2005 11:23:31
AM
FLJE Jefferson 1/1/2005 11:23:31 AM
CAMO Montgomery 1/1/2005
11:23:31 AM
NJHU Hudson 1/1/2005 11:23:31
AM
City
Lookup
City Code
City Name DateTimeStamp
NYSHMA Manhattan 1/1/2005
11:23:31 AM
FLJEPC Panama City 1/1/2005
11:23:31 AM
CAMOSH
San Hose 1/1/2005 11:23:31 AM
NJHUJC Jersey City 1/1/2005
11:23:31 AM
Location
Dimension
Location
Dimension
Id Country
Name State
Name County
Name City
Name
DateTime
Stamp
1 USA New York Shelby Manhattan
1/1/2005 11:23:31 AM
2 USA Florida
Jefferson Panama City
1/1/2005 11:23:31 AM
3 USA California Montgomery San Hose
1/1/2005 11:23:31 AM
4 USA New Jersey Hudson Jersey
City 1/1/2005 11:23:31 AM
Product Dimension
In a
relational data model, for normalization purposes, product category lookup,
product sub-category lookup, product lookup, and and product feature lookups
are are not merged as a single table. In a dimensional data modeling(star
schema), these tables would be merged as a single table called PRODUCT
DIMENSION for performance and slicing data requirements.
Example
of Product Dimension: Figure 1.9
Product
Category Lookup
Product
Category Code Product Category Name DateTimeStamp
1 Apparel
1/1/2005 11:23:31 AM
2 Shoe
1/1/2005 11:23:31 AM
Product
Sub-Category Lookup
Product
Sub-Category
Code Product
Sub-Category
Name DateTime
Stamp
11 Shirt
1/1/2005 11:23:31 AM
12
Trouser 1/1/2005 11:23:31 AM
13 Casual
1/1/2005 11:23:31 AM
14 Formal
1/1/2005 11:23:31 AM
Product
Lookup
Product
Code Product Name DateTimeStamp
1001 Van
Heusen 1/1/2005 11:23:31 AM
1002
Arrow 1/1/2005 11:23:31 AM
1003 Nike
1/1/2005 11:23:31 AM
1004
Adidas 1/1/2005 11:23:31 AM
Product
Feature Lookup
Product
Feature Code Product Feature Description DateTimeStamp
10001
Van-M 1/1/2005 11:23:31 AM
10002
Van-L 1/1/2005 11:23:31 AM
10003
Arr-XL 1/1/2005 11:23:31 AM
10004
Arr-XXL 1/1/2005 11:23:31 AM
10005
Nike-8 1/1/2005 11:23:31 AM
10006
Nike-9 1/1/2005 11:23:31 AM
10007
Adidas-10 1/1/2005 11:23:31 AM
10008
Adidas-11 1/1/2005 11:23:31 AM
Product
Dimension
Product Dimension
Id Product Category Name Product Sub-Category Name Product Name Product Feature
Desc DateTime
Stamp
100001
Apparel Shirt Van Heusen Van-M 1/1/2005 11:23:31 AM
100002
Apparel Shirt Van Heusen Van-L 1/1/2005 11:23:31 AM
100003
Apparel Shirt Arrow Arr-XL 1/1/2005 11:23:31 AM
100004
Apparel Shirt Arrow Arr-XXL 1/1/2005 11:23:31 AM
100005
Shoe Casual Nike Nike-8 1/1/2005 11:23:31 AM
100006
Shoe Casual Nike Nike-9 1/1/2005 11:23:31 AM
100007
Shoe Casual Adidas Adidas-10 1/1/2005 11:23:31 AM
100008
Shoe Casual Adidas Adidas-11 1/1/2005 11:23:31 AM
Organization Dimension
In a
relational data model, for normalization purposes, corporate office lookup,
region lookup, branch lookup, and employee lookups are not merged as a single
table. In a dimensional data modeling(star schema), these tables would be
merged as a single table called ORGANIZATION DIMENSION for performance and
slicing data.
This
dimension helps us to find the products sold or serviced within the
organization by the employees. In any industry, we can calculate the sales on
region basis, branch basis and employee basis. Based on the performance, an
organization can provide incentives to employees and subsidies to the branches
to increase further sales.
Example
of Organization Dimension: Figure 1.10
Corporate
Lookup
Corporate
Code Corporate Name DateTimeStamp
CO
American Bank 1/1/2005 11:23:31 AM
Region
Lookup
Region
Code Region Name DateTimeStamp
SE South
East 1/1/2005 11:23:31 AM
MW Mid
West 1/1/2005 11:23:31 AM
Branch
Lookup
Branch
Code Branch Name DateTimeStamp
FLTM
Florida-Tampa 1/1/2005 11:23:31 AM
ILCH
Illinois-Chicago 1/1/2005 11:23:31 AM
Employee
Lookup
Employee
Code Employee Name DateTimeStamp
E1 Paul
Young 1/1/2005 11:23:31 AM
E2 Chris
Davis 1/1/2005 11:23:31 AM
Organization
Dimension
Organization
Dimension Id Corporate Name Region Name Branch Name Employee Name DateTime
Stamp
1
American Bank South East Florida-Tampa Paul Young 1/1/2005 11:23:31 AM
2
American Bank Mid West Illinois-Chicago Chris Davis 1/1/2005 11:23:31 AM
Time Dimension
In a
relational data model, for normalization purposes, year lookup, quarter lookup,
month lookup, and week lookups are not merged as a single table. In a
dimensional data modeling(star schema), these tables would be merged as a
single table called TIME DIMENSION for performance and slicing data.
This
dimensions helps to find the sales done on date, weekly, monthly and yearly
basis. We can have a trend analysis by comparing this year sales with the
previous year or this week sales with the previous week.
Example
of Time Dimension: Figure 1.11
Year
Lookup
Year Id
Year Number DateTimeStamp
1 2004
1/1/2005 11:23:31 AM
2 2005
1/1/2005 11:23:31 AM
Quarter
Lookup
Quarter
Number Quarter Name DateTimeStamp
1 Q1
1/1/2005 11:23:31 AM
2 Q2
1/1/2005 11:23:31 AM
3 Q3
1/1/2005 11:23:31 AM
4 Q4
1/1/2005 11:23:31 AM
Month
Lookup
Month
Number Month Name DateTimeStamp
1 January
1/1/2005 11:23:31 AM
2
February 1/1/2005 11:23:31 AM
3 March
1/1/2005 11:23:31 AM
4 April
1/1/2005 11:23:31 AM
5 May
1/1/2005 11:23:31 AM
6 June
1/1/2005 11:23:31 AM
7 July
1/1/2005 11:23:31 AM
8 August
1/1/2005 11:23:31 AM
9
September 1/1/2005 11:23:31 AM
10
October 1/1/2005 11:23:31 AM
11
November 1/1/2005 11:23:31 AM
12
December 1/1/2005 11:23:31 AM
Week
Lookup
Week
Number Day of Week DateTimeStamp
1 Sunday
1/1/2005 11:23:31 AM
1 Monday
1/1/2005 11:23:31 AM
1 Tuesday
1/1/2005 11:23:31 AM
1
Wednesday 1/1/2005 11:23:31 AM
1
Thursday 1/1/2005 11:23:31 AM
1 Friday
1/1/2005 11:23:31 AM
1
Saturday 1/1/2005 11:23:31 AM
2 Sunday
1/1/2005 11:23:31 AM
2 Monday
1/1/2005 11:23:31 AM
2 Tuesday
1/1/2005 11:23:31 AM
2
Wednesday 1/1/2005 11:23:31 AM
2
Thursday 1/1/2005 11:23:31 AM
2 Friday
1/1/2005 11:23:31 AM
2
Saturday 1/1/2005 11:23:31 AM
Time
Dimension
Time Dim
Id Year No Day of Year Quarter No Month No Month Name Month Day No Week No Day
of Week Cal Date DateTime
Stamp
1 2004 1
Q1 1 January 1 1 5 1/1/2004 1/1/2005 11:23:31 AM
2 2004 32
Q1 2 February 1 5 1 2/1/2004 1/1/2005 11:23:31 AM
3 2005 1
Q1 1 January 1 1 7 1/1/2005 1/1/2005 11:23:31 AM
4 2005 32
Q1 2 February 1 5 3 2/1/2005 1/1/2005 11:23:31 AM
Comments
Post a Comment