Anda di halaman 1dari 32

Pertemuan-2

Data warehouse ­­ terintegrasi

Data perlu distandarkan :

Sales Inventori Transaksi Penjualan


Format Key: Key: Key:
Text Integer Yes/No
Description Nama pelanggan: Nama pelanggan: Nama pelanggan:
U.P.N. UPN Universitas Pembangunan
Nasional
Unit Tinggi: Tinggi: Tinggi:
centimeter Meter Inch
Encoding Sex: Sex: Sex:
Yes = Laki-laki L = laki-laki 1 = Laki-laki
No = Perempuan P = Perempuan 0 = Perempuan
Data Warehouse — Non­Volatile
OLAP (on­line analitical processing)

• OLAP adalah operasi basis data untuk 
mendapatkan data dalam bentuk kesimpulan 
dengan menggunakan agregasi sebagai 
mekanisme utama. 
• Ada 3 tipe:
– Relational OLAP (ROLAP):
– Multidimensional OLAP (MOLAP) 
– Hybrid OLAP (HOLAP)  membagi data antara tabel 
relasional dan tempat penyimpanan khusus. 
Data Warehouse vs. Operational DBMS

• OLTP (on­line transaction processing)
– Major task of traditional relational DBMS
– Day­to­day operations: purchasing, inventory, banking, 
manufacturing, payroll, registration, accounting, etc.
• OLAP (on­line analytical processing)
– Major task of data warehouse system
– Data analysis and decision making
• Distinct features (OLTP vs. OLAP):
– User and system orientation: customer vs. market
– Data contents: current, detailed vs. historical, consolidated
– Database design: ER + application vs. star + subject
– View: current, local vs. evolutionary, integrated
– Access patterns: update vs. read­only but complex queries
OLTP vs. OLAP

  OLTP  OLAP 
users  clerk, IT professional  knowledge worker 
function  day to day operations  decision support 
DB design  application­oriented  subject­oriented 
data  current, up­to­date  historical,  
detailed, flat relational  summarized, multidimensional 
isolated  integrated, consolidated 
usage  repetitive  ad­hoc 
access  read/write  lots of scans 
index/hash on prim. key 
unit of work  short, simple transaction  complex query 
# records accessed  tens  millions 
#users  thousands  hundreds 
DB size  100MB­GB  100GB­TB 
 

 
Dari tabel dan spreadsheet 
ke Kubus Data
• Data warehouse didasarkan pada model data multidimensional, 
dimana data dipandang dalam bentuk kubus data

• Kubus data, seperti sales, memungkinkan data dipandang dan 
dimodelkan dalam banyak dimensi
– Tabel dimensi, seperti item (item_name, brand, type), or time(day, week, 
month, quarter, year) 

– Tabel fakta mengandung measures (seperti dollars_sold) dan merupakan 
kunci untuk setiap tabel­tabel dimensi terkait.

• n­D base cube dinamakan base cuboid. 0­D cuboid merupakan 
cuboid pada level paling tinggi, yang menampung ringkasan data dalan 
level paling tinggi, dinamakan apex cuboid. Lattice dari cuboid­cuboid 
membentuk sebuah data cube.
Cube: A Lattice of 
Cuboids
all
0­D(apex) cuboid

time item location supplier


1­D cuboids

time,item time,location item,location location,supplier


2­D cuboids
time,supplier item,supplier

time,location,supplier
time,item,location 3­D cuboids
time,item,supplier item,location,supplier

4­D(base) cuboid
time, item, location, supplier
Pemodelan Konseptual Data Warehouse

• Star schema: Sebuah tabel fakta di tengah­tengah 
dihubungkan dengan sekumpulan tabel­tabel dimensi. 
• Snowflake schema:  perbaikan dari skema star ketika 
hirarki dimensional dinormalisasi ke dalam sekumpulan 
tabel­tabel dimensi yang lebih kecil
• Fact constellations:  Beberapa tabel fakta dihubungkan ke 
tabel­tabel dimensi yang sama, dipandang sebagai 
kumpulan dari skema star, sehingga dinamakan skema 
galaksi atau fact constellation. 
Contoh Skema Star
time
time_key     item
day item_key
day_of_the_week Sales Fact Table item_name
month brand
quarter            time_key type
year supplier_type
              item_key
           branch_key
branch location
         location_key
branch_key location_key
branch_name             units_sold street
branch_type city
         dollars_sold province_or_street
country
             avg_sales
Measures
Contoh skema Snowflake
time
time_key item
day item_key supplier
day_of_the_week Sales Fact Table item_name supplier_key
month brand supplier_type
quarter            time_key type
year               item_key supplier_key

           branch_key
location
branch          location_key
location_key
branch_key
            units_sold street
branch_name
city_key city
branch_type
         dollars_sold
city_key
             avg_sales city
province_or_stree
Measures country
Contoh Fact Constellation
time
time_key item Shipping Fact Table
day item_key
day_of_the_week Sales Fact Table item_name time_key
month brand
quarter time_key type          item_key
year supplier_type      shipper_key
         item_key
      branch_key   from_location

branch     location_key location       to_location


branch_key location_key      dollars_cost
branch_name         units_sold
street
branch_type      dollars_sold city    units_shipped
province_or_street
         avg_sales country shipper
Measures shipper_key
shipper_name
location_key
shipper_type
Hirarki Konsep: Dimensi (Lokasi)

all all

region Europe ... North_America

country Germany ... Spain Canada ... Mexico

city Frankfurt ... Vancouver ... Toronto

office L. Chan ... M. Wind


Tampilan datawarehouse dan 
hirarki

Specification of hierarchies
• Schema hierarchy
day < {month < quarter; 
week} < year
• Set_grouping hierarchy
{1..10} < inexpensive
Data Multidimensional

• Sales volume sebagai fungsi dari product, 
month, dan region
Dimension: Product, Location, Time
on Hierarchical summarization paths
gi
Re Industry   Region         Year

Category   Country  Quarter

Product      City     Month    Week
Product
                   Office         Day

Month
Contoh Kubus Data

Total annual sales
t Date of  TV in U.S.A.
uc 1Qtr 2Qtr   3Qtr 4Qtr sum
TV
od U.S.A
Pr PC
VCR
sum
Canada

Mexico Country

sum
Cuboid yang terkait dengan 
kubus

all
0­D(apex) cuboid
product date country
1­D cuboids

product,date product,country date, country


2­D cuboids

3­D(base) cuboid
product, date, country
Browsing kubus data

• Visualization
• OLAP capabilities
• Interactive manipulation
Operasi­operasi OLAP

• Roll up (drill­up): summarize data
– by climbing up hierarchy or by dimension reduction
• Drill down (roll down): reverse of roll­up
– from higher level summary to lower level summary or detailed 
data, or introducing new dimensions
• Slice and dice: 
– project and select 
• Pivot (rotate): 
– reorient the cube, visualization, 3D to series of 2D planes.
Operasi­operasi OLAP
Contoh Tabel Pivoting
Hierarki Dimensi untuk
Roll-up/Drill-down
Rancangan Data Warehouse: Business 
Analysis Framework

• Four views regarding the design of a data warehouse 
– Top­down view
• memungkinkan pemilihan informasi yang relevan yang diperlukan
untuk data warehouse

– Data source view
• memperlihatkan informasi yang diambil, disimpan, dan
  dikelola oleh sistem operasional

– Data warehouse view
• terdiri dari tabel fakta dan tabel dimensi
– Business query view 
• melihat perspektif data di gudang dari sudut pandang pengguna
akhir
Proses Perancangan Data Warehouse

• Top­down, bottom­up approaches or a combination of both
– Top­down: Starts with overall design and planning (mature)
– Bottom­up: Starts with experiments and prototypes (rapid)
• From software engineering point of view
– Waterfall: structured and systematic analysis at each step before 
proceeding to the next
– Spiral:  rapid generation of increasingly functional systems, short 
turn around time, quick turn around
• Typical data warehouse design process
– Choose a business process to model, e.g., orders, invoices, etc.
– Choose the grain (atomic level of data) of the business process
– Choose the dimensions that will apply to each fact table record
– Choose the measure that will populate each fact table record
Multi­Tiered Architecture

Monitor
Metadata & OLAP Server
other
source Integrator
s Analysis
Operational  Extract Query
Transform Data Serve Reports
DBs Load
Refresh
Warehouse Data mining

Data Marts

Data Sources Data Storage OLAP Engine Front­End Tools


Data Warehouse Back­End Tools and 
Utilities

• Data extraction:
– get data from multiple, heterogeneous, and external sources
• Data cleaning:
– detect errors in the data and rectify them when possible
• Data transformation:
– convert data from legacy or host format to warehouse format
• Load:
– sort, summarize, consolidate, compute views, check integrity, 
and build indicies and partitions
• Refresh
– propagate the updates from the data sources to the warehouse
Three Data Warehouse 
Models

• Enterprise warehouse
– collects all of the information about subjects spanning the entire 
organization
• Data Mart
– a subset of corporate­wide data that is of value to a specific 
groups of users.  Its scope is confined to specific, selected 
groups, such as marketing data mart
• Independent vs. dependent (directly from warehouse) data mart
• Virtual warehouse
– A set of views over operational databases
– Only some of the possible summary views may be materialized
Data Warehouse Development: A 
Recommended Approach
Multi­Tier Data 
Warehouse
Distributed 
Data Marts

Enterprise 
Data  Data 
Data 
Mart Mart
Warehouse

Model refinement Model refinement

Define a high­level corporate data model
OLAP Server Architectures

• Relational OLAP (ROLAP) 
– Use relational or extended­relational DBMS to store and manage 
warehouse data and OLAP middle ware to support missing pieces
– Include optimization of DBMS backend, implementation of 
aggregation navigation logic, and additional tools and services
– greater scalability
• Multidimensional OLAP (MOLAP) 
– Array­based multidimensional storage engine (sparse matrix 
techniques)
– fast indexing to pre­computed summarized data
• Hybrid OLAP (HOLAP)
– User flexibility, e.g.,  low level: relational, high­level: array
• Specialized SQL servers
– specialized support for SQL queries over star/snowflake schemas
Data Warehouse Usage
• Three kinds of data warehouse applications
– Information processing
• supports querying, basic statistical analysis, and reporting 
using crosstabs, tables, charts and graphs
– Analytical processing
• multidimensional analysis of data warehouse data
• supports basic OLAP operations, slice­dice, drilling, 
pivoting
– Data mining
• knowledge discovery from hidden patterns 
• supports associations, constructing analytical models, 
performing classification and prediction, and presenting the 
mining results using visualization tools.
• Differences among the three tasks
From On­Line Analytical Processing 
to On Line Analytical Mining (OLAM)

• Why online analytical mining?
– High quality of data in data warehouses
• DW contains integrated, consistent, cleaned data
– Available information processing structure surrounding data 
warehouses
• ODBC, OLEDB, Web accessing, service facilities, reporting 
and OLAP tools
– OLAP­based exploratory data analysis
• mining with drilling, dicing, pivoting, etc.
– On­line selection of data mining functions
• integration and swapping of multiple mining functions, 
algorithms, and tasks.
• Architecture of OLAM
An OLAM Architecture
Mining query Mining result Layer4
User Interface
User GUI API
Layer3
OLAM OLAP
Engine Engine OLAP/OLAM

Data Cube API

Layer2
MDDB
MDDB
Meta 
Data
Filtering&Integration Database API Filtering
Layer1
Data cleaning Data 
Databases Data 
Data integration Warehouse
Repository
Referensi

• Data Mining: Concepts and Techniques by Jiawei 
Han and Micheline Kamber, 2001
• Introduction to Data Mining by Tan, Steinbach, 
Kumar, 2004

Anda mungkin juga menyukai