You are on page 1of 10

Case Study of Building a Data Warehouse with Analysis

Services (Part One)


Date: Feb 10, 2006 By Baya Pavliashvili.
In the first of a two-part series, Baya Pavliashvili, database adinistration e!pert, offers sol"tions to yo"r
b"siness proble "sin# a data wareho"se.
Data wareho"sin# has been aro"nd for de$ades. %et, any b"sinesspeople and &"ite a few te$hni$al fol's
don(t 'now what it ta'es to b"ild a wareho"se. )ost people thin' that a wareho"se is a data store that
$ontains all data within the enterprise, is b"ilt within a $o"ple of wee's, and tho"sands of people $an "se it
for years to $oe witho"t any additional effort or e!pense. *nfort"nately, this view is in$orre$t.
In this series of arti$les, I #ive yo" a very siplisti$ e!aple s$enario and show yo" how yo" $an #o abo"t
resolvin# a b"siness proble "sin# a data wareho"se. I also des$ribe the efforts involved in b"ildin# a
wareho"se for te$hni$al as well as non-te$hni$al individ"als.
+he first of this two-part arti$le #ives yo" an overview of steps involved in b"ildin# a data wareho"se and
introd"$es the e!aple s$enario. It also tea$hes yo" how to $reate and pop"late a diensional odel. +he
se$ond arti$le #oes into detail abo"t ,nalysis -ervi$es, )D., and analyti$al views that are #enerated fro
the data wareho"se.
Data Warehouse Lifecycle
, Data /areho"se 0D/1 life$y$le $an be s"ari2ed as follows:
1. Deterine the reports that D/ is s"pposed to s"pport.
2. Identify data so"r$es.
3. 4!tra$t data fro their transa$tional so"r$es.
5. Pop"late the sta#in# area with the data e!tra$ted fro transa$tional so"r$es.
6. B"ild and pop"late a diensional database.
6. B"ild 4!tra$tion +ransforation and 7oadin# 04+71 ro"tines to pop"late the diensional database
re#"larly.
8. B"ild and pop"late ,nalysis -ervi$es $"bes.
9. B"ild reports and analyti$al views by:
o *sin# a third-party appli$ation.
o :reatin# a $"sto analyti$al appli$ation and writin# )"lti-Diensional e.pressions 0)D.1
&"eries a#ainst $"bes.
;. )aintain the wareho"se by addin#<$han#in# s"pported feat"res and reports.
=eadin# thro"#h these points, yo" sho"ld be ass"red that:
, D/ is never >finished.> It is an entity that 'eeps #rowin# alon# with the or#ani2ation(s reportin#
needs.
+here is no s"$h thin# as a free l"n$h. If yo" want additional reports to $oe o"t of the wareho"se,
yo" need to spend additional tie 0and oney1 to e!tend the wareho"se.
?otwithstandin#, what I said th"s far, yo" $an have D/ f"n$tionin# and available for "se with a
liited set of feat"res as yo" b"ild it.
The Sa!le Scenario
-"ppose I wor' for ?orthwind trader(s $opany. +his hypotheti$al $opany sells prod"$ts aro"nd the world
and re$ords data into the saple database that is $reated when yo" install -@7 -erver 2000. 7et(s f"rther
s"ppose that b"siness owners wo"ld li'e to have analyti$al views, in$l"din# #raphs and $harts that display
the $opany(s perforan$e bro'en down by $"stoer, eployee, s"pplier, and prod"$t. Aavin# s"$h a tool
wo"ld help sta'eholders to proote the prod"$ts that fall short of sellin# in hot tradin# areas.
,s I entioned before, the e!aple in this arti$le is very siplisti$ and therefore $onsiderably easier to b"ild
than a "s"al wareho"se. 7et e #ive yo" a few reasons why this is the $ase.
First, we have a set of reports in ind to be s"pported by the wareho"se. +hat(s better than what a D/
ar$hite$t typi$ally #ets at the be#innin# of the proBe$t. *s"ally b"siness "sers 'now they need a D/ b"t
$an(t really #ive yo" a $on$rete idea of what the wareho"se will do for the. It i#ht ta'e at least a few
interviews to fi#"re o"t e!a$tly what type of reports and analyti$al views "sers wo"ld li'e to see.
Be$a"se data is already in a -@7 -erver database that has a fairly siple str"$t"re, the first few steps of a
typi$al wareho"se proBe$t are already done for "s. In reality, yo" don(t always #et this l"$'y: +he D/
ar$hite$t "s"ally has to identify "ltiple data so"r$es that will be "sed to pop"late the wareho"se. +he
or#ani2ation(s data $o"ld be stored in vario"s relational database ana#eent systes 0Cra$le, -@7
-erver, DB2, and )- ,$$ess bein# the ost $oon1, spreadsheets, eail systes, and even in paper
forat. Cn$e yo" identify all data so"r$es, yo" need to $reate data e!tra$tion ro"tines to transfer data fro
its so"r$e to a -@7 -erver database. F"rtherore, dependin# on so"r$es yo"(re wor'in# with, yo" i#ht not
be able to anip"late the data "ntil it is in -@7 -erver forat.
+he ?orthwind database has int"itive obBe$t naesD for e!aple, the orders table tra$'s $"stoer orders,
eployees table for re$ords data abo"t eployees, and order details table tra$'in# details of ea$h order.
,#ain, in the real world this i#ht not be the $aseEyo" i#ht have to fi#"re o"t what $rypti$ obBe$t naes
ean and e!a$tly whi$h data eleents yo"(re after. +he D/ ar$hite$t often needs to $reate a list of data
appin#s and $lean the data as it is loaded into the wareho"se. For e!aple, $"stoer naes i#ht not
always be stored in the sae forat in vario"s data so"r$es. +he Cra$le database i#ht re$ord a prod"$t
nae as >-leeveless +ee for )en,> whereas in ,$$ess yo" $o"ld have the sae prod"$t referred to as
>)en(s +--hirt 0sleeveless1.> -iilarly, the field "sed to re$ord prod"$t naes $o"ld be $alled >prod"$t> in
one so"r$e, >prod"$tFnae,> in another and >pd$t> in the other.
Cn$e yo" have deterined whi$h data yo" need, yo" $an $reate and pop"late a sta#in# database and then
the diensional data odel. Dependin# on the proBe$t, yo" ay or i#ht not have to have a sta#in#
database. If yo" have "ltiple data so"r$es and yo" need to $orrelate data fro these so"r$es prior to
pop"latin# a diensional data str"$t"re, then havin# a sta#in# database is $onvenient. F"rtherore, sta#in#
database will be a handy tool for testin#. %o" $an $opare a n"ber of re$ords in the ori#inal data so"r$e
with the n"ber of re$ords in the sta#in# tables to ens"re that yo"r 4+7 ro"tines wor' $orre$tly. ?orthwind
database already has all data I need in easily a$$essible foratD therefore, I won(t $reate a sta#in#
database.
Diensional "odeling
Dimensional modeling is soewhat different fro its relational $o"nterpart. I won(t #o into details of
diensional odelin# here be$a"se s"$h $on$epts have fine $overa#e in several boo's that ea$h D/
ar$hite$t sho"ld read. )ost $oonly referen$ed diensional odelin# a"thors are Bill Inon and =alph
Giball.
For the p"rposes of this arti$le, I(ll s"ffi$e to say that diensional odels $onsist of the fa$t and diension
tables. +ypi$al fa$t tables $ontain n"ero"s forei#n 'eys referen$in# diension tables. Diension tables,
on the other hand, "s"ally $ontain very few $ol"nsEdiension 'ey, val"e, $reate, and "pdate date, and
perhaps an obsolete date. Fa$t tables re$ord o$$"rren$es of a eas"rable fa$t, s"$h as $"stoer orders.
Diension tables provide a way to sli$e b"siness data a$ross vario"s dia#onals of $opany(s operationsD
for e!aple, we $an e!aine orders by $"stoer or by prod"$t.
%o" $an "se the >obsolete_date> $ol"n within diension tables to tra$' the history of val"es that
$han#e over tie. +his $on$ept is 'nown as slowly changing dimension. For e!aple, $ons"ers of yo"r
prod"$ts i#ht $han#e their last naes d"e to arria#e, divor$e, or for another personal reason. -iilarly
"ltiple departents within yo"r or#ani2ation $an be $obined into one, or one departent $an be divided.
In soe $ases, yo" $are to 'eep B"st the $"rrent val"e. If so, $onsider yo"rself l"$'yEyo" $an siply
override the e!istin# val"e with the new val"e in the diension table. In other $ases, yo" "st 'eep tra$' of
the old val"e as well as the new val"e. +his is when yo" "se the re$ord obsolete date to tra$' the tiefrae
d"rin# whi$h the re$ord was valid.
?orthwind trader(s diensional odel will be very siple, $onsistin# of fo"r-diension tables and a fa$t
table. ?oti$e that be$a"se this is B"st a stati$ database and I won(t have any new data to pop"late it
re#"larly, I won(t add the obsolete_date $ol"n to the diensions. %o" $an $reate fa$t and diension
tables "sin# the followin# s$ript:
CREATE TABLE dbo.dim_supplier(
supplier_ident INT IDENTITY(1, 1,
supplier_id INT N!T N"LL,
supplier_name #ARC$AR(%&& N!T N"LL,
supplier_'it( #ARC$AR (%&& N"LL,
'ountr( #ARC$AR(%&& N"LL

CREATE TABLE dbo.dim_produ't (


produ't_ident INT IDENTITY(1, 1,
produ't_id INT N!T N"LL,
produ't_name #ARC$AR(%&& N!T N"LL,
dis'ontinued BIT N!T N"LL

CREATE TABLE dbo.dim_'ustomer (


'ustomer_ident INT IDENTITY(1, 1,
'ustomer_id #ARC$AR(%) N!T N"LL,
'ustomer_name #ARC$AR(%&& N!T N"LL,
'ustomer_'it( #ARC$AR(%&& N"LL,
'ustomer_'ountr( #ARC$AR(%&& N"LL

CREATE TABLE dbo.dim_emplo(ee (


emplo(ee_ident INT IDENTITY(1, 1,
emplo(ee_id INT N!T N"LL,
emplo(ee_name #ARC$AR(*& N!T N"LL,
emplo(ee_'it( #ARC$AR(%&& N"LL,
emplo(ee_'ountr( #ARC$AR(%&& N"LL

CREATE TABLE dbo.dim_time (


time_member_+e( INT N!T N"LL ,
'alendar_date_dt DATETI,E N!T N"LL ,
'alendar_da(_o-_.ee+_num INT N!T N"LL ,
'alendar_da(_o-_.ee+_name #ARC$AR(1& N!T N"LL ,
'alendar_da(_o-_mont/_num INT N!T N"LL ,
'alendar_da(_o-_(ear_num INT N!T N"LL ,
'alendar_.ee+_num INT N!T N"LL ,
'alendar_mont/_num INT N!T N"LL ,
'alendar_mont/_name #ARC$AR (1& N!T N"LL ,
'alendar_0uarter_num INT N!T N"LL ,
'alendar_(ear_num INT N!T N"LL

CREATE TABLE -a't_sales (
'ustomer_ident INT N!T N"LL,
produ't_ident INT N!T N"LL,
emplo(ee_ident INT N!T N"LL,
supplier_ident INT N!T N"LL,
total_sale 1,ALL,!NEY N!T N"LL,
time_member_+e( INT N!T N"LL

?e!t let(s pop"late these tables "sin# the followin# &"eries:


22 supplier dimension3
IN1ERT dim_supplier (
supplier_id ,
supplier_name ,
supplier_'it( ,
'ountr(
1ELECT
supplierid,
'ompan(name,
'it(,
'ountr(
4R!, suppliers
22 produ't dimension3
IN1ERT dim_produ't (
produ't_id,
produ't_name,
dis'ontinued
1ELECT
produ'tid,
produ'tname,
dis'ontinued
4R!, produ'ts
22 'ustomer dimension3
IN1ERT dim_'ustomer (
'ustomer_id,
'ustomer_name,
'ustomer_'it(,
'ustomer_'ountr(
1ELECT
'ustomerid,
'ompan(name,
'it(,
'ountr(
4R!, 'ustomers
22 emplo(ee dimension3
IN1ERT dim_emplo(ee (
emplo(ee_id,
emplo(ee_name,
emplo(ee_'it(,
emplo(ee_'ountr(
1ELECT
emplo(eeid,
TItle!-Courtes( 5 6 6 5 4irstName 5 6 6 5 LastName A1 emplo(ee_name,
'it(,
'ountr(
4R!, emplo(ees
?oti$e that dim_time is a spe$ial diension. It isn(t pop"lated by data that is already in the wareho"se.
Instead we pop"late it with $alendar dates and date parts 0day, onth, &"arter, year, and so forth1 so that we
$an a##re#ate wareho"se data as needed. %o" $an $oe "p with a ro"tine that pop"lates yo"r own tie
diensionD here is a saple store pro$ed"re that I "se to pop"late the tie diension:
CREATE 7R!CED"RE load_dim_time (
8dim_table_name #ARC$AR(%&&,
8start_date_dt 1,ALLDATETI,E,
8end_date_dt 1,ALLDATETI,E

A1
1ET N!C!"NT !N
DECLARE
8s0l_strin9 N#ARC$AR(1)%:
, 8time_member_+e( INT
, 8'alendar_date_dt 1,ALLDATETI,E
, 8'alendar_da(_o-_.ee+_num INT
, 8'alendar_da(_o-_.ee+_name #ARC$AR(1)
, 8'alendar_da(_o-_mont/_num INT
, 8'alendar_da(_o-_(ear_num INT
, 8'alendar_.ee+_num INT
, 8'alendar_mont/_num INT
, 8'alendar_mont/_name #ARC$AR(1)
, 8'alendar_0uarter_num INT
, 8'alendar_(ear_num INT
1ET 8'alendar_date_dt ; 8start_date_dt
<$ILE (8'alendar_date_dt =; 8end_date_dt
BE>IN
I4 N!T E?I1T1
(
1ELECT time_member_+e(
4R!, dim_time
<$ERE 'alendar_date_dt ; 8'alendar_date_dt

BE>IN
1ELECT
8'alendar_da(_o-_.ee+_num ; DATE7ART(d., 8'alendar_date_dt
, 8'alendar_da(_o-_.ee+_name ; DATENA,E(<EE@DAY,
8'alendar_date_dt
, 8'alendar_da(_o-_mont/_num ; DATE7ART(DD, 8'alendar_date_dt
, 8'alendar_da(_o-_(ear_num ; DATE7ART(DY, 8'alendar_date_dt
, 8'alendar_.ee+_num ; DATE7ART(<@, 8'alendar_date_dt
, 8'alendar_mont/_num ; DATE7ART(,, 8'alendar_date_dt
, 8'alendar_mont/_name ; DATENA,E(,!NT$, 8'alendar_date_dt
, 8'alendar_0uarter_num ; DATE7ART(AA, 8'alendar_date_dt
, 8'alendar_(ear_num ; DATE7ART(YYYY, 8'alendar_date_dt
, 8time_member_+e( ;
CA1T(
CA1T(8'alendar_(ear_num A1 #ARC$AR 5
RI>$T(6))6 5 CA1T(8'alendar_da(_o-_(ear_num A1 #ARC$AR, B
A1 INT
1ELECT 8s0l_strin9 ;
6IN1ERT INT! 6 5 8dim_table_name 5
6 (6 5
6time_member_+e(, 6 5
6'alendar_date_dt, 6 5
6'alendar_da(_o-_.ee+_num,6 5
6'alendar_da(_o-_.ee+_name,6 5
6'alendar_da(_o-_mont/_num,6 5
6'alendar_da(_o-_(ear_num,6 5
6'alendar_.ee+_num,6 5
6'alendar_mont/_num,6 5
6'alendar_mont/_name,6 5
6'alendar_0uarter_num, 6 5
6'alendar_(ear_num6 5
6 6 5
6#AL"E1 6 5
6(6 5
C$AR(BC 5 CA1T(8time_member_+e( A1 #ARC$AR 5 C$AR(BC 5 6,6 5
C$AR(BC 5 CA1T(8'alendar_date_dt A1 #ARC$AR 5 C$AR(BC 5 6,6 5
CA1T(8'alendar_da(_o-_.ee+_num A1 #ARC$AR 5 6,6 5
C$AR(BC 5 8'alendar_da(_o-_.ee+_name 5 C$AR(BC 5 6,6 5
CA1T(8'alendar_da(_o-_mont/_num A1 #ARC$AR 5 6,6 5
CA1T(8'alendar_da(_o-_(ear_num A1 #ARC$AR 5 6,6 5
CA1T(8'alendar_.ee+_num A1 #ARC$AR 5 6,6 5
CA1T(8'alendar_mont/_num A1 #ARC$AR 5 6,6 5
C$AR(BC 5 8'alendar_mont/_name 5 C$AR(BC 5 6,6 5
CA1T(8'alendar_0uarter_num A1 #ARC$AR 5 6,6 5
CA1T(8'alendar_(ear_num A1 #ARC$AR 5 66
E?EC sp_eDe'utes0l 8s0l_strin9
END
1ET 8'alendar_date_dt ; 8'alendar_date_dt 5 1
END
EF no. use load_dim_time pro'edure to populate dim_time table .it/
needed dates FE
E?EC load_dim_time dim_time, 61E1ECG6, 61E1ECC6
-@7 -erver has a fine 4+7 toolEData +ransforation -ervi$es 0D+-1Ewhi$h yo" $an levera#e to e!e$"te
and s$hed"le D/ pop"lation ro"tines. , typi$al D+- pa$'a#e deterines whi$h data rows need to be
e!tra$ted fro their so"r$e and inserts s"$h rows into appropriate diension and fa$t tables. Be$a"se this is
a saple appli$ation, I won(t need to $reate any D+- pa$'a#es, b"t 'eep in ind that real-world 4+7
ro"tines $an #et &"ite $opli$ated and i#ht ta'e several wee's to develop.
Suary
In this first arti$le of the series, I introd"$ed yo" to the steps involved in b"ildin# a typi$al data wareho"se.
%o" learned how to $reate and pop"late a diensional data odel whi$h will be a $ornerstone of yo"r
wareho"se and analyti$al reports. +he ne!t arti$le fo$"ses on presentin# wareho"se data to the "sers.
In Part +wo of his series, database adinistration e!pert Baya Pavliashvili e!plores the $hallen#es
involved in b"ildin# and aintainin# a wareho"sin# sol"tion "sin# a siple database wareho"se.
+he first arti$le in this series introd"$ed yo" to steps involved in b"ildin# a data wareho"se. It also presented
an e!aple s$enario of solvin# b"siness probles with a data wareho"se. +his arti$le $ontin"es e!plorin#
$hallen#es involved in b"ildin# and aintainin# a wareho"sin# sol"tion.
Analysis Services Cu#es
-o far we have diension and fa$t tables in the wareho"se. ?ow we $an $reate diensions and $"bes
within )- ,nalysis -ervi$es. Plenty of t"torials and arti$les e!ist, showin# yo" step-by-step wi2ards that
,nalysis -ervi$es s"pplies for $reatin# diensions and $"bes, so I won(t repeat the here. Instead, Fi#"re
1 shows yo" the final view of the data within ,nalysis )ana#er.
Fi#"re 1 Hiew of the $"be data within ,nalysis )ana#er.
?C+4
+his saple appli$ation re&"ires no spe$ial treatent within ,nalysis -ervi$es. %o" $an easily follow
Diension /i2ard and :"be /i2ard steps to b"ild a reasonable $"be. B"t in the real-world yo" need to
define $al$"lated ebers, treat ebers on ea$h level within diension hierar$hy differently, and "$h
ore. I will show soe tips and tri$'s within ,nalysis -ervi$es in y "p$oin# arti$le.
If we had a data so"r$e that was $ontin"o"sly "pdated by ?orthwind eployees, we wo"ld also have to
repro$ess the $"be to a'e s"re it had "p-to-date data. %o" $an pro$ess $"bes an"ally thro"#h ,nalysis
)ana#er or "se ,nalysis -ervi$es Pro$essin# +as' within D+-.
Analytical $iews
Cn$e yo" have b"ilt $"bes, yo" are ready to $reate $"sto reports for displayin# the data to yo"r "sers. %o"
have several options for the D/ presentation layer. )i$rosoft 4!$el pivot tables are a fine way to analy2e
data if yo" B"st need basi$ f"n$tionality. In fa$t, be$a"se ost or#ani2ations "se 4!$el as a spreadsheet
ana#eent tool, yo" are li'ely to $reate any of yo"r reports in 4!$el. %et another option that $oes with
)- Cffi$e is "sin# Cffi$e /eb :oponents to $reate siple web pa#es for viewin# the wareho"se data.
-everal third-party vendors s"pply advan$ed analyti$s( tools for a $onsiderable pri$e. Perhaps the ost
$oonly 'nown b"siness intelli#en$e vendors in$l"de :o#nos, Pro:larity, )i$ro-trate#y, and B"siness
CbBe$ts. ,ltho"#h yo" $o"ld write a $"sto reportin# tool for yo"r own $opany(s needs, rest ass"red that
third-party vendors have e!$ellent offerin#s that yo" won(t at$h with a sall effort.
7et(s ta'e a brief loo' at a $o"ple of analyti$al views in Pro:larity to see the f"n$tionality available in this
tool. Fi#"re 2 shows the top five prod"$ts that ?orthwind sold in 1;;6.
Fi#"re 2 Pro:larity view of top five prod"$ts sold in 1;;6.
%o" $an easily $han#e the diensions and eas"res presented on the report, siply by dra##in# and
droppin# the diensions and eas"res yo" wish to see on rows and $ol"nsD yo" $an also $hoose fro a
variety of $hart types to eet the spe$ifi$ needs of yo"r "sers.
Pro:larity also allows yo" $reate a >de$oposition tree> to see the brea'down of yo"r b"siness operations.
For e!aple, the de$oposition tree in Fi#"re 3 shows the top five $"stoer $o"ntries where ?orthwind
sold prod"$ts in 1;;9. It f"rther infors "s we sold in 16 other $o"ntries in 1;;9, and these botto 16
$o"ntries a$$o"nt for appro!iately 36 per$ent of sales.
Fi#"re 3 Brea'down of 1;;9 sales by $"stoer on $o"ntry level.
?e!t we $an e!pand one of the top nodes, perhaps Ierany, to find o"t whi$h $ities a$$o"nted for ost
sales there 0see Fi#"re 51.
Fi#"re 5 Brea'down of sales in Ierany.
+he de$oposition shows that :"newalde was the top $ity for sales a$$o"ntin# for alost half of all sales in
Ierany. Cn the other hand, the botto si! $ities a$$o"nted for only 12 per$ent of all sales. If we drill down
"nder Bra2il(s =io de Janeiro, we see that all sales in this $ity $ae fro three stores 0see Fi#"re 61.
Fi#"re 6 -ales in =io de Janeiro.
,s yo" $an see, Pro:larity enables yo"r b"siness "sers to browse the data and $reate very int"itive and
inforative reports witho"t any pro#rain#. ,red with this tool and the $"bes yo" desi#n, e!e$"tives $an
a'e strate#i$ de$isions for iprovin# the b"siness.
"D% &ueries
Dis$"ssion of data wareho"sin# and b"siness intelli#en$e wo"ldn(t be $oplete witho"t a brief overview of
)D. &"eries. MDX is a lan#"a#e for &"eryin# ,nalysis -ervi$es $"bes. *nfort"nately, )D. is poorly
do$"ented and has $opli$ated #raar. Aowever, if yo" wish to b"ild yo"r own front-end D/ tools or
even $"stoi2e views prod"$ed by third-party tools, yo" "st learn )D.. /ritin# very siple )D. &"eries
is easyD in fa$t, s"$h &"eries reseble -@7 to a de#ree. +he )D. shown in Fi#"re 6 ret"rns 1;;9 sales by
$o"ntry.
1ELECT HCustomer.I'ustomer 'ountr(J .membersK on ro.s,
Hmeasures.Itotal saleJ K on 'olumns
4R!, sales
<$ERE (ItimeJ.I1CC*J
Fi#"re 6 +otal sales by $o"ntry in 1;;9.
Aowever, don(t e!pe$t to see "$h siilarity between -@7 and )D. on$e yo" #et past the basi$ &"eries.
For e!aple, let(s see what it wo"ld ta'e to report an avera#e of all sales on I'ustomer 'it(J level if
yo" also wanted to report the total sales within ea$h *.-. $ity. Ieneratin# s"$h a report in +ransa$t--@7 is a
20-se$ond tas' for any reasonable pro#raerD however, in )D. it is &"ite a $hallen#e. , &"ery wo"ld loo'
li'e what is shown in Fi#"re 8.
<IT$ 1ET bla/ A1 6HDE1CENDANT1('ustomer. usa , 1K6
1ET ro.set A1 6$IERARC$ILE(H bla/ , >ENERATE( bla/ ,
HANCE1T!R('ustomer.Current,ember, 1 KK6
,E,BER measures. aMera9e A1 6aM9(
INTER1ECT( bla/ , DE1CENDANT1('ustomer.Current,ember, 'ustomer.
'ustomer 'it( , measures. total sale 6
1ELECT Hmeasures. aMera9e K !N C!L",N1,
H ro.set K !N R!<1
4R!, sales
Fi#"re 8 ,vera#e sales in the *- and total sales in ea$h $ity.
I( not an opponent of )D.D on the $ontrary, I believe )D. is an e!treely powerf"l lan#"a#e, b"t d"e to
la$' of #ood do$"entation and a rather liited s"pply of )D. boo's it is diffi$"lt to aster. Indeed, there
are very few pro#raers who $an write advan$ed )D.. +he #ood news is that any front-end tools
0in$l"din# 4!$el and Pro:larity1 will write )D. for yo". +he not-so-#ood news is that )D. written by s"$h
tools isn(t always what yo" need on yo"r reports. In a n"tshell, if yo"r b"siness "sers wo"ld li'e the
f"n$tionality that isn(t s"pported by tools s"$h as :o#nos or Pro:larity, they sho"ld e!pe$t to spend top
dollar on an )D. reso"r$e 0and #ood l"$' findin# a #ood one1.
DW "aintenance
)"$h li'e any database syste, data wareho"se re&"ires $onsiderable aintenan$e that sho"ldn(t be
overloo'ed. ,s the wareho"se #rows, the database adinistrator "st deterine the optial physi$al layo"t
for data files, file #ro"ps, tables, and inde!es. +his is an e!aple of operational aintenan$e.
Data so"r$es pop"latin# the wareho"se tend to $han#eD therefore, yo" will li'ely have to $han#e the D+-
pa$'a#es as well. For e!aple, if ?orthwind a$&"ires another $opany 0perhaps -o"thwind1, yo"r "sers
will probably want to e!aine -o"thwind(s orders "sin# the e!istin# tools. -iilarly, if yo"r boss de$ides that
he wo"ld li'e a report showin# ?orthwind orders by shippers to see whi$h shipents #et to their destination
on tie, yo"(ll have to add new diensions and eas"res to yo"r wareho"se.
Suary
+his series of arti$les showed a very siple e!aple of b"ildin# a data wareho"sin# sol"tion. 4ven with this
saple, n"ero"s steps "st be ta'en to b"ild an a$$"rate, f"n$tionin# wareho"se. /hat(s ore iportant,
the wareho"se is never >finished>Eit $ontin"es to evolve and #row alon# with $opany(s reportin#
re&"ireents. +herefore, before "nderta'in# a D/ initiative, ens"re that yo" have appropriate s"pport fro
the b"siness owners. ,ltho"#h yo"r boss i#ht re&"est a data wareho"se overni#ht, he<she isn(t #oin# to rip
any benefits fro s"$h syste. Be s"re to entor and ed"$ate yo"r sta'eholders so that their
e!pe$tations are appropriate fro the #et-#o

You might also like