7023t - tk1 - w4 - s5 - r1, 20151011_lzt4_team4
TRANSCRIPT
7/23/2019 7023T - TK1 - W4 - S5 - R1, 20151011_lzt4_team4
http://slidepdf.com/reader/full/7023t-tk1-w4-s5-r1-20151011lzt4team4 1/12
Group Assignment 1
Advanced Database Systems
Group Member1. 1701497840 Alexander Gunawan
2. 1701498383 Alpha Epsilon
3. 1701497903 Armandha Aria
4. 1701497885 Ghema Nusa Persada
5. 1701497872 i!o "ali#u
Question / Problem$ne #i% !ompan& has ' depar(men(s su!h as mar)e(in%* in+en(or&* pur!hasin%*
,inan!e* - and / epar(men(s. he !ompan& wan( (o se(up da(a warehouse
en+ironmen( or (heir / epar(men( as (heir 4 depar(men(s su!h as "ar)e(in%*
-n+en(or&* ,inan!e and Pur!hasin% whi!h ha+e #een se(up wi(h da(a warehouse
en+ironmen(.
7/23/2019 7023T - TK1 - W4 - S5 - R1, 20151011_lzt4_team4
http://slidepdf.com/reader/full/7023t-tk1-w4-s5-r1-20151011lzt4team4 2/12
ased on ransa!(ion su!h as dail& a((endan!e and lea+e and o(hers /
epar(men( da(a su!h as lis( o dependen(s su!h as !ouple or !hildren* emplo&ee
posi(ion su!h as mana%er* super+isor or s(a and emplo&ee de%ree su!h as
#a!helor* mas(er or o!(oral de%ree and all lis( o depar(men(s (hen up (here is (he
desi%n o lass dia%ram o $P 6$nline ransa!(ional Pro!essin% P:
6ransa!(ional Pro!essin% :&s(em rom / epar(men(.
1. ;ha( )ind o da(a warehouse implemen(a(ion approa!h will #e sui(a#le or
(his s!heme and %i+e &our reason.
2. ;ha( )ind da(a warehouse ar!hi(e!(ure will #e sui(a#le or (his /
epar(men( and please <%ure ou( (ha( da(a warehouse ar!hi(e!(ure.
3. esi%n s(ar s!hema or (his / epar(men( #ased on 1 o example repor(
whi!h is !rea(ed #& &ou and please explain wha( is inside (he s!hema su!h as
how man& (a#les* wha( )ind o (he name o a#les* how man& primary*
foreign and composite )e& and wha( are (he&=
4. esi%n snow>a)e s!hema or (his / epar(men( #ased on 1 o example
repor( whi!h is !rea(ed #& &ou and please explain wha( is inside (he s!hema
su!h as how man& (a#les* wha( )ind o (he name o a#les* how man&
primary* foreign and composite )e& and wha( are (he&=
7/23/2019 7023T - TK1 - W4 - S5 - R1, 20151011_lzt4_team4
http://slidepdf.com/reader/full/7023t-tk1-w4-s5-r1-20151011lzt4team4 3/12
Answer / Solution
Revised Diagram
Addi(ional <eld is added (o re+ise some unde<ned rela(ion re%ardin% "ana%er oepar(men( and (o ease (he lo%i!al rela(ion amon% Emplo&ee* Posi(ion and
epar(men(.
7/23/2019 7023T - TK1 - W4 - S5 - R1, 20151011_lzt4_team4
http://slidepdf.com/reader/full/7023t-tk1-w4-s5-r1-20151011lzt4team4 4/12
Revised Column ist
o re>e!( rhe re+ision here is (he !olumn lis( (o show (he rela(ion #e(ween (a#les
table column key join key values
Employee Emp_ID PK
Emp_firstName
Emp_lastNameEmp_DOB
Emp_phone
Emp_email SK
Emp_hiredate
Emp_status active, inactive
Emp_Mgr_ID FK Employee.Emp_D
Emp_Dep Emp_ID FK Employee.Emp_D
Dep_ID PK Department.Dep_D
Dep_Start
Dep_finish
Department Dep_ID PK !"#$%, !&#'ar(et in), !*#nventory, !+#Finance, !#Purchasin)
Dep_name $%, 'ar(etin), nventory, Finance, Purchasin)
Dep_Mgr_ID FK Employee.Emp_D
Emp_Pos Emp_ID -K Employee.Emp_D
Pos_Code -KPos_start
Pos_Finish
Pos_salary
Position Pos_code PK !"#'ana)er, !&#Supervisor, !*#Staff
Pos_name 'ana)er, Supervisor. Staff
ttendance Emp_ID -K Employee.Emp_D
Att_Date -K
tt_timeN
tt_timeout
Emp_/eave Emp_ID -K Employee.Emp_D
Leave_code -K
/eave_start
/eave_Finish
/eave Leave_code PK !"#0early, !&#'aternity, !*#%eli)ion, !+#unpaid !#Other
leave_type 0early, 'aternity, %eli)ion, 1npaid, Other
Emp_Depen Emp_ID -K Employee.Emp_DDepen_Code -K Dependent.Depen_-ode
Depen_Name
Depen_DOB
Dependent Depen_code PK !"#Spouse, !&#-hild, !*#Parent, !+#Other
Depen_type Spouse, -hild, Parent, Other
Emp_De)ree Emp_ID -K Employee.Emp_D
Deg_code -K De)ree.De)_-ode
Name_univ
De)_start
De)_finish
De)_2P
De)ree Deg_code PK !"#Bachelor, !&#'aster, !*#Doctoral, !+#other
De)_type Bachelor, 'aster, Doctoral, other
7/23/2019 7023T - TK1 - W4 - S5 - R1, 20151011_lzt4_team4
http://slidepdf.com/reader/full/7023t-tk1-w4-s5-r1-20151011lzt4team4 5/12
Suitable Data !are"ouse #mplementation
he dimensional approa!h reers (o alph ?im#all@s approa!h in whi!h i( is s(a(ed
(ha( (he da(a warehouse should #e modeled usin% a imensional "odels(ar
s!hema. he normalied approa!h* also !alled (he 3N, model 6hird Normal ,ormreers (o ill -nmonBs approa!h in whi!h i( is s(a(ed (ha( (he da(a warehouse should
#e modeled usin% an E modelnormalied model.
-n a dimensional approa!h* (ransa!(ion da(a are par(i(ioned in(o Ca!(sC* whi!h are
%enerall& numeri! (ransa!(ion da(a* and CdimensionsC* whi!h are (he reeren!e
inorma(ion (ha( %i+es !on(ex( (o (he a!(s. ,or example* a sales (ransa!(ion !an #e
#ro)en up in(o a!(s su!h as (he num#er o produ!(s ordered and (he pri!e paid or
(he produ!(s* and in(o dimensions su!h as order da(e* !us(omer name* produ!(
num#er* order ship(o and #ill(o lo!a(ions* and salesperson responsi#le or
re!ei+in% (he order.
A )e& ad+an(a%e
• Dui!) da(a re(rie+al rom da(a warehouse
• Eas& (o unders(and or #usiness users #e!ause s(ru!(ure is di+ided in(o
measuremen(sa!(s and !on(ex(dimensions
7/23/2019 7023T - TK1 - W4 - S5 - R1, 20151011_lzt4_team4
http://slidepdf.com/reader/full/7023t-tk1-w4-s5-r1-20151011lzt4team4 6/12
Suitable Data !are"ouse Arc"itecture
Available Arc"itectures
1. Basic / Single-Layer ArchitectureA sin%lela&er ar!hi(e!(ure is no( reuen(l& used in pra!(i!e. -(s %oal is (o
minimie (he amoun( o da(a s(oredF (o rea!h (his %oal* i( remo+es da(a
redundan!ies. $nl& la&er ph&si!all& a+aila#le (he sour!e la&er. -n (his !ase*
da(a warehouses are +ir(ual. his means (ha( a da(a warehouse is
implemen(ed as a mul(idimensional +iew o opera(ional da(a !rea(ed #&
spe!i<! middleware* or an in(ermedia(e pro!essin% la&er 6e+lin* 1997.
7/23/2019 7023T - TK1 - W4 - S5 - R1, 20151011_lzt4_team4
http://slidepdf.com/reader/full/7023t-tk1-w4-s5-r1-20151011lzt4team4 7/12
2. With a Staging Area / Two-Layer Architecture
he reuiremen( or separa(ion pla&s a undamen(al role in de<nin% (he
(&pi!al ar!hi(e!(ure or a da(a warehouse s&s(em* as shown #elow. Al(hou%h i(
is (&pi!all& !alled a (wola&er ar!hi(e!(ure (o hi%hli%h( a separa(ion #e(ween
ph&si!all& a+aila#le sour!es and da(a warehouses* i( a!(uall& !onsis(s o our
su#seuen( da(a >ow s(a%es 6e!h(en#Hr%er* 2001.
7/23/2019 7023T - TK1 - W4 - S5 - R1, 20151011_lzt4_team4
http://slidepdf.com/reader/full/7023t-tk1-w4-s5-r1-20151011lzt4team4 8/12
3. With a Staging Area and Data Marts
alph ?im#all* on (he o(her hand* ad+o!a(es wha( he !alls a #us ar!hi(e!(ure
da(a warehouse. /is me(hodolo%& spe!i<es !onormed dimensions* where
mul(iple a!( (a#les share !ommon dimensional (a#les. Ea!h o (hese a!(
(a#les represen(s a da(a mar(. he row o dimensional (a#les (ha( all (he a!(
(a#les plu% in(o is (he #us* and #e!ause* or example* (he <nan!e and (hesales da(a mar(s #o(h use (he same produ!( dimension (a#le (here is
in(e%ra(ion #e(ween depar(men(s.
he mos( sui(a#le ar!hi(e!(ure would #e With a Staging Area and Data Marts
i(a(ion
h((psdo!s.ora!le.!om!d10500I01ser+er.920a9'520!on!ep(.h(m
7/23/2019 7023T - TK1 - W4 - S5 - R1, 20151011_lzt4_team4
http://slidepdf.com/reader/full/7023t-tk1-w4-s5-r1-20151011lzt4team4 9/12
Star Sc"ema $or current %R Department
Jsin% :(ar :!hema
:ample epor( epar(men(al "on(hl& A((endan!e 6"Aepor(
Assump(ions
• "on(hl& A((endan!e K 6mon(hl& sum o /ours o A((endan!e L 6mon(hl&
unpaid lea+es M wor) hours
• wor) hoursK8
elow is E Pro!ess rom (ransa!(ional (a#le
&ables/Column #nvolved '()tract* +ew &able '&rans$orm* as Dimension Generate Report 'oad* / ,act table
Employee Emp_ID (mply#n$o (mployee#D 'P-* DMAReport EmployeeID
Emp_firstName EmployeeName EmployeeName
Emp_lastName
Emp_email EmployeeEmail EmployeeEmailEmp_Mgr_ID
Emp_Dep Emp_ID Dept#n$o (mployee#D 'P-*
Dep_ID
Dep_Start Dep_Start
Department Dep_ID
Dep_name DepartmentName DepartmentName
Dep_Mgr_ID ManagerName ManagerName
Emp_Pos Emp_ID Pos#n$o (mployee#D 'P-*
Pos_Code
Pos_start Pos_start
Pos_Finish Pos_Finish
Position Pos_code
Pos_name PositionName PositionName
Attendance Emp_ID Attend#n$o (mployee#D 'P-*
Att_Date Att_Date
.tt_timeN Att_timeIN
.tt_timeout Att_timeout
Emp_Leave Emp_ID
Leave_code
/eave_start Leave_start
/eave_Finish Leave_Finish
Leave Leave_code
leave_type leave_type=04 unpai!"
Atten!#our =sumAtt_timeout $Att_timeIN" inmonthAtt_Date"
Leave#our =Leave_Finish %LeaveStart" inmonthAtt_Date"
&otal#ourInMonth =Atten!#our $ Leave#our
7/23/2019 7023T - TK1 - W4 - S5 - R1, 20151011_lzt4_team4
http://slidepdf.com/reader/full/7023t-tk1-w4-s5-r1-20151011lzt4team4 10/12
wi(h :(ar :!hema* (he repor( will in+ol+ed 4 Dimension and !act Ta"les
ex(ra!(ed rom 8 ori%inal (a#le rom ransa!(ional Pro!essin% :&s(em. Ea!h
imension will ha+e #rimary $ey as a resul( o denormalia(ion pro!ess o (he
ori%inal (a#les
:(ar :!hema ia%ram will #e as ollowDept#n$o Pos#n$o
(mployee#D 'P-* (mployee#D 'P-*
Dep_Start Pos_start
DepartmentName Pos_Finish
ManagerName PositionName
DMAReport
(mployee#D
EmployeeName
EmployeeEmail
'eportMonth
DepartmentName
ManagerName
'eportMonthPositionName
Atten!#our
Leave#our
&otal#ourInMonth
(mply#n$o Attend#n$o
(mployee#D 'P-* (mployee#D 'P-*
EmployeeName Att_Date
EmployeeEmail Att_timeIN
Att_timeout
Leave_start
Leave_Finish
leave_type=04
7/23/2019 7023T - TK1 - W4 - S5 - R1, 20151011_lzt4_team4
http://slidepdf.com/reader/full/7023t-tk1-w4-s5-r1-20151011lzt4team4 11/12
Snow$la.e Sc"ema $or current %R Department
Jsin% :now>a)e :!hema
:ample epor( ependen( oun( o ompan&Bs Emplo&ee in ea!h epar(men(
Assumption
• No de(ailed ino or ea!h emplo&ee 6name* $* e(!
• ex(ra!( onl& small par( o ori%inal (a#le 6or as(er perorman!e
Purposes
-( !an #e use (o oun( o(al ependen( o Emplo&ee as well as oun( o Emplo&eeBs
ependen( %rouped #&
• ependen( (&pe 6:pouse* hild* e(!
• epar(men(
• Emplo&ee Posi(ion
elow is E Pro!ess rom (ransa!(ional (a#le
&ables/Column #nvolved '()tract* +ew &able '&rans$orm* as Dimension Generate Report 'oad* / ,act table
ta3le column ta3le column ta3le column
Employee Emp_ID (P! Employee Emp_ID (P! Dependent-ountDept EmployeeD
Emp_status Emp_status#ctive
Emp_Dep Emp_ID (C! Emp_Dep Emp_ID (C!
Dep_ID (C! Dep_ID (C! Dep_D
Dep_Start Dep_StartDep_finish Dep_finish
Department Dep_ID (P! Department Dep_ID (P!
Dep_name Dep_name
Emp_Pos Emp_ID (C! Emp_Pos Emp_ID (C!
Pos_code (C! Pos_code (C! Pos_-ode
Pos_start Pos_start
Pos_Finish Pos_Finish
Position Pos_code (P! Position Pos_code (P!
Pos_name Pos_name
Emp_Depen Emp_ID (C! Emp_Depen Emp_ID (C!
Depen_Code (C! Depen_Code (C! Depen_-ode
Depen_Name Depen_Name
Depen_DOB Depen_DOB
Dependent Depen_code (P! Dependent Depen_code (P!
Depen_type Depen_type
Depen_-ount
7/23/2019 7023T - TK1 - W4 - S5 - R1, 20151011_lzt4_team4
http://slidepdf.com/reader/full/7023t-tk1-w4-s5-r1-20151011lzt4team4 12/12
wi(h :now>a)es :!hema* (his repor( will in+ol+ed % Dimension and !act Ta"les
ex(ra!(ed rom 7 ori%inal (a#les in ransa!(ional Pro!essin% :&s(em wi(h simpli<ed
!olumn lis( (o )eep (he perorman!e hi%h. Ea!h imension will ha+e :e+eral )e&s o
Primar& )e&s and omposi(e ?e&s as a resul( o minimum denormalia(ion pro!ess
o (he ori%inal (a#les and (o minimie redundan!&
:now>a)es :!hema ia%ram will #e as ollow
4
Employee
Emp_ID (P! Position
Emp_status#.ctive Pos_code (P!
Pos_name
DependentCountDept Emp_Pos
EmployeeD Emp_ID (C!
Dep_D Pos_code (C!
Pos_-ode Pos_start
Depen_-ode Pos_Finish
Depen_-ount
Emp_Dep Emp_Depen
Emp_ID (C! Emp_ID (C!
Dep_ID (C! Depen_Code (C!
Dep_Start Depen_Name
Dep_finish Depen_DOB
Department Dependent
Dep_ID (P! Depen_code (P!
Dep_name Depen_type