슬라이드 1

Download Report

Transcript 슬라이드 1

온라인 분석처리(OLAP)의 이해
순서
OLAP 개요
OLAP 종류와 구현방식
OLAP 사례: ROLAP
OLAP 사례: MOLAP
OLAP 사례: BMT(Bench Mark Test)
OLAP의 개요
OLAP 정의
• 의사결정과 기업정보시스템 등에 필요한 정보를 이용, 저장, 조작 하는데 사용하는 다차원 도구로써
대용량의 데이터베이스나 데이터웨어하우스에 정보요구자가 직접 접근하여 다차원적 질의를 통해 대
화식으로 정보를 탐색해나가는 과정
• (or) 사용자들에 의해서 이해되는 기업의 실제 차원을 반영하기 위해 원래의 데이터(raw data)로 부터
변환된 정보의 모든 가능한뷰 들의 다양성을 제공하고 빠르고 일관된 대화식 접근을 통하여, 분석가,
관리자, 그리고 임원이 데이터에 대해서 통찰력을 얻도록 가능하게 해주는 소프트웨어 기술의 한 범주
임
FASMI (Fast Analysis of Shared Multidimensional Information) 정의
● FAST : 사용자의 쿼리에 대한 반응속도가 5초 이내인 것
● ANALYSIS : 시스템이 사용자에게 임의의 비즈니스 로직과 통계적 분석 기능을 쉽게 제공해야 함
● SHARED : 동일한 데이터에 대해 다중 사용자가 동시에 공유하여 분석할 수 있어야 함
● MULTIDIMENSIONAL : 시스템은 데이터를 다차원적으로(일단, 데이터를 바라보는 다양한 관점으로
이해하자. 나중에 개념을 다시 다룰 것이다.) 보여 줄 수 있어야 하며 여기에는 계층구조(hierarchy)
와 다중 계층구조(multi‐hierarchy)에 대한 지원 포함
● INFORMATION : 얻을 수 있는 데이터와 필요에 의해 파생된 모든 정보
OLAP의 개요
3계층 데이터웨어하우징의 구조
OLAP의 개요
3계층 데이터웨어하우징의 구조
• OLTP:
데이터베이스 시스템에서 매출전표기록이나 재고 관리 등의 기본데이터를 수
집하고 관리하는 운영시스템
• OLAP : 분석이나 관리목적으로 다차원 테이블을 수집하고 관리하고, 처리하고 보여주
기 위한 응용과 기술들의 집합도구
• OLAP이 적용될 수 있는 환경은 데이터가 저장되어있는 기업 단위의 데이터웨어하우스
또는 특정부서에서 관리하는 데이터마트가 존재해야 되는 것
• OLAP의 목적 : 최종사용자가 기업의 전반적인 상황을 이해할 수 있게 하고 의사결정을
지원
• OLTP는 매일 매일의 기업운영을 가능하게 하는 반면 OLAP은 기업이 나이가야 할 방향
을 설정할 수 있게 한다.
차원(dimension)의 수준(level)
• Dimensions typically contain a natural hierarchy of levels or
attributes.
• Part of the value of OLAP is to provide analysts a fast and easy
capability to “drill down” from a higher, more-summarized level of
the dimension to a lower, more-detailed level — such as drilling
from year to quarter.
– “Drill-down” fixes the other dimensional attributes of a particular cell
(those not constituting the “drill path”) and carries these into the new
view.
– For example, drilling down the time dimension from a cell representing
some unique occurrence of “sales by product, city, and year” (say,
widgets in Boston during 2008) would yield a composite view of four
cells representing widgets in Boston during 1Q08o 4Q08.
• A key design issue is what levels of the hierarchy to populate.
– For example, monthly sales could be calculated by summing just four
weekly sales measures, but in general the higher levels of a dimension
are accessed more frequently and cost less to store.
– The cost of storing lower levels of detail is higher levels of storage and
administration (to load and maintain the larger data store).
Dimensional Hierarchy
Increasing
data
size
detail
Yr2008
1Q00
Wk
27
출처: Gartner
Wk
28
2Q00
3Q00
4Q00
Jul 2008
Aug 2008
Sep 2008
Wk
29
Wk
30
Wk
31
큐브(Cube)와 이의 조작
• A ”cube” is the conceptual model of measures that
share dimensions and the hierarchies in those
dimensions.
• Users work with this virtual cube by selecting which
measures to analyze, then choosing which of the
dimensions to show simultaneously (from left to right in
the cross-tab and from top to bottom).
• The combination of slice and dice, pivoting, and drilling
provides the user vocabulary of OLAP.
• In a cube with three dimensions, each dimension with a
hierarchy of three levels (an overly simple example),
there are 27 different cross-tabs that can be produced.
• A phenomenon known as “cube explosion” describes
cube growth as a factorial function of its dimensions
and levels.
• Cube design involves a trade-off between level of detail
within the cube and user requirements for most (not all)
potential queries.
Multidimensionality
Year
Quarter
Month
Total
Region
Customer
Total Grou
p
Product
Three dimensions, each with three levels =
27 different flexible cross-tabs
출처: Gartner
OLAP에 의한 데이터 접근의 예
OLAP에 의한 데이터 접근의 예(계속)
OLAP에 의한 데이터 접근의 예(계속)
OLAP에 의한 데이터 접근의 예(계속)
OLAP의 개요
OLAP의 특성
• 다차원성 : 사용자들이 실질적인 차원에서 정보를 분석하도록 한다. 정보란 본질적으로
비교를 통해 얻어진다. 다양한 각도를 정보를 구성하는 차원으로 생각할 수 있다. 정보
는 본질적으로 다차원적이며, 다차원 모델은 비즈니스를 표현하는 가장 자연스러운 형
태이다(다양한 뷰 제공).
• 직접접근 : 다차원 정보는 사용자의 관점에서 구축되어 사용자는 필요한 시점에 정보 매
개자 없이 정보원에 직접 접근하여 다양한 각도에서 분석을 수행할 수 있다.
• 대화식 분석 : OLAP 환경에서 사용자는 시스템과의 상호작용을 통해 정보를 분석하며
원하는 결과를 얻을 때까지 계속해서 분석을 수행하게 된다. OLAP 시스템은 대화식 분
석과정에서 사용자의 사고 흐름이 중간에 끊어지지 않도록 사용자 질의에 신속한 답을
제공해야 한다(drill-down, drill-up, slice, dice 등).
• 의사결정에 활용 : OLAP 시스템은 이렇게 수집된 데이터를 의사결정에 활용하는 측면을
담당하여 '왜(Why)'에 초점이 맞추어진다. 즉 OLTP 시스템이 일상적인 기업의 운영을
지원하는 반면, OLAP 시스템은 기업의 방향을 설정하는 역할을 한다(시계열 분석(yearto-date, 기간)).
OLAP의 개요
OLAP의 특성-OLTP와 OLAP 비교
구분
OLTP
OLAP
데이터의 구조
복잡(운영 시스템 계산에 적합)
단순(사업 분석에 적합)
데이터의 갱신
순간적/동적
주기적/정적
응답시간
2, 3 초 ~ 몇 초 이내
수 초 ~ 몇 분까지도 가능
데이터의 범위
과거 30 일 ~ 90 일
과거 5 년 ~ 10 년
데이터 성격
정규/핵심 업무 데이터,
mission critical 데이터
비정규/read‐only 데이터,
index 에 의존
데이터의 크기
수 Giga Byte
수 Tera Byte
데이터의 내용
현재 데이터
기록 보관된, 요약/계산 데이터
데이터 특성
거래 중심
주제 중심
데이터 액세스 빈도
높음
보통 혹은 낮음
데이터의 사용법
고도로 구조화된 연속 처리
고도로 비구조화된 분석처리
질의어의 성격
예언 가능, 주기적
예측하기 어렵고, 특수하다
OLAP 종류와 구현방식
•OLAP 서버는 사업사용자에게 데이터웨어하우스나 데이터마트로부터 다차원 데이터를
제공한다.
•OLAP서버의 종류: MOLAP (Multi‐dimensional OLAP), ROLAP(Relational OLAP),
HOLAP(Hybrid OLAP) 및 DOLAP(Database OLAP)
Business Uses for OLAP
Use OLAP for:
Granularity
Functionality
Analyzing
aggregated/derived
multidimensional
data
Complex preprogrammed
analysis
Don’t use OLAP for:
Browsing through
detail data
Operational
reporting
Flexibility
Multidimensional
analysis (drill down,
exceptions, trends)
Examples
Financial budgeting, Canned reporting,
sales forecast, ABC, accrual overview,
risk analysis
heavy data entry
출처: Gartner
Ad hoc query,
forms, spreadsheet
size analysis
OLAP의 사용 용도
• OLAP provides an optimized environment for
multidimensional analysis.
– This intuitive style mirrors the complexity of the business world.
– OLAP organizes data by dimensions, supplying multiple interrelated points of view of the same data.
– Dimensions represent basic business structures and put data
into context.
• Typical questions OLAP is meant to answer include:
– How high are revenues, broken down per region and offices
within each region, year-to-date and what is the difference with
the same period last year?
– Which products within division A jointly constitute 80 percent of
overall profitability of that division, based on the sales and
associated direct and indirect costs of the last three years?
– How much has the Internet as a customer contact medium
grown for our company the last 13 months and what is the
cannibalization effect on other distribution channels?
– What do patterns of credit card fraud reveal about the interaction
of high-risk merchants, products, locations and times?
Traditional Reporting vs. Multidimensional Analysis
Customer
Location
Order
Date
Order
Number
Product
ID
Amt.
Due
Ship Date
Sales
Person
Discount
Acme
NYC
12/1/99
5002A
SKU022
$1,250
12/31/99
AE034
.10
Westwind
BOS
11/21/99
7621C
SKU009
$390
2/1/00
AE017
0
Acme
CHI
12/1/99
5002A
SKU101
$500
01/12/00
AE034
.05
Zephyr
LA
01/07/00
3022Z
SKU019
$3,800
01/08/00
AE077
.20
Amt.Due
per
Customer
per Week
per Product
출처: Gartner
Number of Queries by Hour byDiscount
Day
per
Salesperson
per Product
per Month
1,200
기존 보고서와 차이점
• Traditional reports and forms and spreadsheets are a fixed, list type
view of the business.
– Common terminology: rows, columns, tables and forms.
• To describe multidimensional views, a whole other terminology is used.
• Measures contain the things we want to know: variables like revenue,
costs, variances or growth rates.
– Some measures contain sums or counts, others contain calculated values
(Variance = Actual - Budget).
– They are typically measured in units, amounts or percentages, and
represented as columns in a report.
• Dimensions provide business context by organizing measures into the
available points of view and break-points, represented as rows in a
report.
– Dimensions can contain hierarchies when the dimension contains more than
one aggregation level.
• While reports can be rendered in three dimensions, by using graphics
packages or embedding one dimension within another in column
headings, this is not true multidimensionality.
• The difference is not data visualization (OLAP tools face the same
limitations of flat computer screens), but traditional reporting files and
database structures that lock users into discrete views of an ndimensional data universe
OLAP 활용 사례 - 신용등급별 성별 혼인관계별 순보험료 분석
데이터웨어하우스 도구 (9장에서)
MOLAP (MDB-based OLAP)
다차원 데이터베이스를 중심으로 다차원적인 분석을 하도록 만들어진 OLAP의 구현 방식이다. 즉
MOLAP은 다양하고 신속한 분석을 위해 특수하게 만들어진 솔루션이다. 그러나 원시 데이터(raw data)
를 볼 수 없고 대용량의 데이터를 취급하기에는 역부족이며 데이터를 로딩하는 데 시간이 너무 많이 걸
리는 단점이 있다.
ROLAP(Relational OLAP, RDB-based OLAP)
관계형 데이터베이스 내에서 사실 테이블과 차원 테이블을 서로 조인(join)시켜서 원하는 다차원 분석
이 가능하도록 한 것이다. ROLAP은 관계형 데이터베이스를 근간으로 하기 때문에 확장성이 좋다. 대용
량 데이터를 잘 다룰 수 있어서 특히 전사적 데이터웨어하우스(enterprise data warehouse)를 구축하
는 데는 반드시 ROLAP 솔루션을 채택하는 것이 좋다. 또한 원시 데이터를 볼 수 있다는 장점이 있다.
그리고 기초적인 분석기능, 즉 합계(sum), 수(count), %, 평균편차, 표준편차 정도만 제공한다. 그러나
회귀분석과 같은 고급 통계분석 기능은 사용할 수 없다.
HOLAP(Hybrid OLAP)
최근 들어 MOLAP의 단점을 보강하기 위해서 여러 MOLAP 회사들이 MOLAP의 근간이 되는 다차원 데
이터베이스에서 관계형 데이터베이스에 있는 데이터를 액세스할 수 있는 기능을 추가했다. 여기서 주목
할 점은 ROLAP 회사들이 ROLAP의 단점을 보강하기 위해 MOLAP의 좋은 점을 채택한 것이 아니라,
MOLAP 회사들이 MOLAP의 단점을 보강하기 위해서 ROLAP의 장점을 일부 수용한 것이라는 점이다.
데이터웨어하우스 도구(9장에서)
여러 가지 OLAP 방식 비교
ROLAP
MOLAP
Hybrid OLAP
기준구조
관계형데이터베이스
다차원데이터베이스
다차원 데이터베이스
관계형 데이터베이스
대용량 데이터
○
×
○
원시 데이터
액세스
○
×
○
분석 기능
×
○
○
구축 시간
6개월 이상
3개월 내외
3개월 내외
핵심 기술
다차원 모델링
다차원 데이터베이스
다차원 데이터베이스와 다차원
모델링
적용
전사적데이터웨어하우스
데이터 마트, EIS
데이터 마트, EIS
예
Oracle Discoverer,
Microstrategy DSS
Agent,
Informix Metacube,
BrioqueryPlatinum,
InfoBeacon
Cognos Powerplay
Oracle Express
Arbor Essbase
Simple OLAP (SOLAP)
• Most commonly found form of OLAP
• Data cache is limited in size, portable
• Useful for personal productivity –
downloading slices from MDDBMS or
RDBMS
• Disposable, cannot be updated or
modified
• Not a DBMS
• Mandates end user environment – No API
SOLAP의 장단점
• While OLAP tools and underlying architectures become increasingly
complex, a new area re-emerges: Simple OLAP.
– It is reinvented, because it was what OLAP used to be about —
empowering users to set up their own analytic environment.
– Simple OLAP is positioned right in the middle of spreadsheets and the
heavy-duty OLAP engines.
– In terms of storage, SOLAP is a subcategory of MOLAP, making use of
proprietary multidimensional storage mechanism.
– The amount of data that needs to be stored is usually bigger than a
spreadsheet could handle efficiently, but smaller that an OLAP data mart.
– Effective Simple OLAP provides a strong compression mechanism, so it
is possible to download cubes to a notebook, so it can be used while
not connected to a network.
• The trade-off here is that the compression mechanism usually
makes the cube very closed, a binary file instead of a MDDBMS.
– This means cube files cannot be updated or modified.
– When changes need to be made (adding to or modifying a hierarchy),
the whole cube needs to be regenerated, taking anywhere from a few
minutes to a few hours.
– Typically, the multidimensional file has a tight fit with the user interface,
making it a proprietary yet very functional solution.
The Cube Continuum
H
MOLAP
Performance
MDDBMS with
RDBMS detail
M/HOLAP
RDBMS detail
with aggregates
R/HOLAP
출처: Gartner
Flexibility
H
SQL
RDBMS normalized
ROLAP
schema
L
API
MDDBMS Only
MOLAP vs. ROLAP
•
•
•
•
•
•
•
Enhancements in RDBMS technology are allowing ROLAP designs to
behave more like MDDBMSs — in the sense of defining and storing
precalculated data points to support faster multidimensional queries.
Materialized views (MV) are pre-joined, prebuilt aggregate tables (unlike
traditional views which are a virtual table only, instantiated dynamically at
query time).
MVs are understood by the RDBMS optimizer as effectively a compressed
subset of larger underlying tables, so that the optimizer can transparently
and automatically substitute the smaller and faster MV in choosing a query
execution plan.
The MV can be indexed like any regular table; but it can also be maintained
automatically by the RDBMS as the underlying detail tables change.
The selective use of specialized constructs which trade storage and
administration costs in return for faster performance of multi-dimensional
queries now describes hybrids of both MOLAP and ROLAP.
In M/HOLAP, the trade-off is expressed in cube design as a function of
levels of detail contained in the cube vs. RDBMS detail accessed by
reach-through.
In R/HOLAP, the trade-off is expressed in schema design as specialized
relational objects (conventional and MV aggregate tables and indexes) to
complement existing data warehouse detail and dimension tables.
Underlying OLAP Storage
Constructs
MOLAP
ROLAP
MDDBMS
SQL engine
Fast
RDBMS
ETL
ETL
RDBMS
Big
출처: Gartner
• Detail Tables
• Summary Tables
• Materialized
Views
• Indexes
각각의 장단점 있음
•
MOLAP cubes are specialized storage constructs, optimized for
multidimensional analysis and housed in purpose-built MDDBMS.
– The internal structure of the cube represents each vendor’s own technique for
improving performance of OLAP queries.
– Most cubes are based on indexed bit-arrays, providing short access paths to
precalculated cells of the underlying data model.
– Sparse arrays are a technique for compressing empty cells.
– Advantages of MOLAP are performance and strong data calculator functionality
(MDX).
– Drawbacks: scaling and flexibility.
•
The ROLAP approach does not employ physical cubes, but instead stores
data in relational objects such as traditional tables (which can be indexed),
along with new object types e.g., materialized views.
– The relational schema may employ a mix of detail and summary tables to support
the same data model as MOLAP — the virtual cube.
– However, there is not the equivalent presumption that all cells will be
precalculated and physically stored in advance.
– This gives ROLAP its advantage in scaling and flexibility, but also accounts for its
primary drawback — performance.
– A specialized ROLAP design known as star schema helps performance for
multidimensional queries, but trades off some of the advantages of a normalized
relational schema, referential integrity.
Combining Constructs
Year
Quarter
Cube
Month
Week
Reach-through
Day
출처: Gartner
RDBMS
Hybrid OLAP
• The need to limit detail levels for manageable cube size led to a
capability called “reach-through,”
– where drill-down requests unsupported by detail within the cube
could invoke a SQL generation engine to build the appropriate
relational query and pass this to a back-end RDBMS.
– This is typically the same data source that provided the data for the
cube.
– Reach-through enables drill-down to lower levels of detail in the
form of a simple list.
• Reach-through and other hybrid techniques are an important
step that help mitigate the inherent constraints of MOLAP cubes
with regard to scaling and flexibility.
– In this context, flexibility means the ability for an analyst to drill in
any direction (down or across) without being limited to the data
points actually built into the cube.
MDDBMS vs. RDBMS
Data:
Structure:
Administration:
Access:
Multidimensional
Relational
Pre-calculated
Detail &
Aggregates
Compressed
Array
Indexed Tables
Specialist
DBA
API
SQL
Metadata Abstraction
출처: Gartner
MOLPA과 ROLAP의 기술적 차이와 변화 추이
•
•
Apart from underlying storage models, key differences remain between MOLAP and
ROLAP - including the administration of those specialized storage constructs.
Routine tasks such as schema/cube design, loading, maintenance, backup/recovery,
security, and performance tuning are invisible to the user analyst, but essential to the
OLAP experience.
–
•
•
•
MDDBMS administration is a specialist role with its own product-specific tools and
issues.
ROLAP structures are maintained and accessed with SQL, MOLAP with their own
vendor-specific APIs.
However, Microsoft’s OLE-DB for OLAP (ODBO) object model with MDX
(Multidimensional Expression Language) is gaining increasing support as the de facto
standard API.
–
–
•
Aggregate tables and indexes are a normal and familiar part of the DBA’s domain, and are
administered with standard tools-of-the-trade like SQL scripts and native RDBMS utilities.
We expect ODBO to become more widely supported, although some vendors (such as Oracle)
will support its own APIs.
We expect OLAP suppliers (including the RDBMS leaders) to provide more streamlined
interoperability between cubes and relational databases.
In this way, MDDBMS will extend — but not rival — relational data marts and the
enterprise data warehouse as primary platforms for the broad spectrum of business
intelligence applications.
ROLAP과 SQL
다차원 모델 만들기: Cube 작성
SQL vs. MDX
Report: Count
create table ZZMD00 unrecoverable as
select
a22.CUSTOMER_ID CUSTOMER_ID,
sum(a21.ORDER_AMT) DOLLARSALES
from
ORDER_FACT a21,
LU_ORDER a22
where
a21.ORDER_ID = a22.ORDER_ID
group by
a22.CUSTOMER_ID
create table ZZMD01 unrecoverable as
select
sum(a21.TOT_DOLLAR_SALES) ALLCUSTOMER
from
YR_CATEGORY_SLS a21
select
a21.CUSTOMER_ID CUSTOMER_ID,
sum(NVL((a21.DOLLARSALES /
LTRIM(a22.ALLCUSTOMER, 0)), 0)) over(order by
NVL((a21.DOLLARSALES / LTRIM(a22.ALLCUSTOMER, 0)), 0)
desc rows unbounded preceding) DOLLARSALES
from
ZZMD00 a21,
ZZMD01 a22
create table ZZMQ02 (
CUSTOMER_ID NUMBER(10),
DA47
NUMBER)
insert into ZZMQ02
values ([DummyInsertValue])
select
a32.DA47 DA47,
count(a32.CUSTOMER_ID) CUSTOMERCOU
from
LU_CUSTOMER a31,
ZZMQ02 a32
where
a31.CUSTOMER_ID = a32.CUSTOMER_ID
group by
a32.DA47
drop table ZZMD00
drop table ZZMD01
drop table ZZMQ02
Source: Microstrategy
출처: Gartner
With Member Measures.[Budget
offset] as ‘Measures.Actual –
Measures.Budget’
Select {Measures.Actual,
Measures.Budget,
Measures.[Budget Offset]}
on Columns,
Time.[2000].Children on rows
From [Sales vs Budget]
Where Geography.[East Coast]
Source: Microsoft
SQL vs. MDX
• SQL is best at expressing data relationships between rows and
columns within tables — basically set mathematics.
– However, as a language for multidimensional analysis, it leaves much
to be desired.
• ROLAP has evolved purpose-built engines to automate SQL
generation and allow a far greater degree of sophistication and
complexity than is feasible with hand-coded queries.
– Generated SQL streams often include subqueries and multiple
statements passing intermediate results through temporary tables.
– In this way, ROLAP overcomes some but not all of the inherent
limitations of SQL as a multidimensional language.
• One advantage of SQL is that even the most-complex queries can
be understood (albeit with some effort) and debugged by Database
Administrators (DBA), who may also use SQL history and statistics
as a guide to tuning the data warehouse.
• MOLAP depends on a vendor-specific API to invoke
multidimensional access to the MDDBMS cube.
– At a lower level, MDDBMS-specific Data Manipulation Language (DML)
is used to define physical access to the cube.
– In most cases this is transparent to the MOLAP developer, unless they
need to extend the basic set features with custom functionality.
Microsoft’s MDX is an example.
OLAP 연산 ① - Drill-up
• Drill-Up(Roll-Up)
– 한 차원의 계층구조를 따라 단계적으로 구체적인 내용의 상세
데이터로부터 요약된 형태의 데이터로 접근하는 기능
Chicago 440
New York 1560
Toronto
395
Vancouver
Q1
605
825
14
USA 2000
Canada
400
Q2
Q3
Q4
roll-up
on location
(from cities
to countries)
Q1
1000
Q2
Q3
Q4
computer security
home
phone
entertainment
item(type)
computer security
home
phone
entertainment
item(type)
OLAP 연산 ② - Drill-down
• Drill-Down
– 한 차원의 계층구조를 따라 단계적으로 요약된 형태의 데이터
수준에서 보다 구체적인 내용의 상세 데이터로 접근하는 기능
Chicago
New York
Toronto
Vancouver
Chicago 440
New York 1560
Toronto
395
Vancouver
Q1
605
825
14
400
Q2
Q3
Q4
computer security
home
phone
entertainment
item(type)
drill-down
on time
(from quarters
to months)
Jan
Feb
150
100
Mar
Apr
May
Jun
Jul
Aug
150
Sep
Oct
Nov
Dec
computer security
home
phone
entertainment
item(type)
OLAP 연산 ③ - Slice
• Slice
– 사용자가 큐브의 일부분(큐브의 한 면)을 자신이 원하는 형태
로 절단하여 살펴보는 기능(하나의 페이지 차원 선택)
Chicago 440
New York 1560
Toronto
395
Vancouver
Q1
605
825
14
400
Q2
Q3
slice
for
time = “Q1”
Chicago
New York
Toronto
Vancouver 605
Q4
computer security
home
phone
entertainment
item(type)
825
14
400
computer security
home
phone
entertainment
item(type)
OLAP 연산 ④ - Dice
• Dice
– 사용자가 큐브의 일부분(서브 큐브)을 자신이 원하는 형태로
절단하여 살펴보는 기능(2개 이상의 차원 선택)
Chicago 440
New York 1560
Toronto
395
Vancouver
Q1
605
825
14
400
dice for
(location=“Toronto” or “Vancouver”
and (time = “Q1” or “Q2”) and
(item = “home entertainment” or “computer”)
Q2
Q3
Q4
computer security
home
phone
entertainment
Toronto
Vancouver
Q1
395
605
Q2
item(type)
computer
home
entertainment
item(type)
OLAP 연산 ⑤ - Pivot
• Pivot(Rotate)
– 사용자에게 최종적으로 보여지는 결과 화면을 리포트라고 할
때, 리포트에 보여지는 축(행, 열, 페이지 차원)을 서로 바꾸는
기능
Chicago
New York
pivot
Toronto
Vancouver 605
825
14
400
computer security
home
phone
entertainment
item(type)
home
entertainment
computer
605
phone
14
security
825
400
Vancouver
New York
Chicago Toronto
location(cities)
OLAP 연산 ⑥ - Drill-across,through
• Drill-Across
– 2개 이상의 큐브(사실테이블)를 포함하여 다차원 연산을 수행
하는 것
• Drill-Through
– OLAP 시스템에 존재하지 않는 데이터가 추가적으로 필요할
경우, OLAP 시스템으로부터 데이터웨어하우스나 OLTP 시스
템에 존재하는 상세데이터에 접근하는 것
Data
Warehouse
drill-across
drill-through
OLTP
BioQuery 사용 예
BioQuery 사용 예 - 시간차원 Drill down
BioQuery 사용 예 - 지역차원 Drill down
BioQuery 사용 예 - Chart
OLAP 종류와 구현방식
다차원 OLAP(MOLAP)
•다차원 DB를 중심으로 다차원적인 분석을 하도록 만들어진 OLAP 구현방식으로서
MOLAP에서는 DB가 물리적으로 여러 개의 차원을 갖고, 이 공간에 데이터를 저장하여
사용자가 각각의 차원 축들에 대한 값들을 지정하여 필요한 데이터를 검색할 수 있도록
한다.
•MOLAP에서는 비어 있는 셀들이 많이 생기게 되므로, 대용량의 시스템에 적합하지 않은
반면에, 셀 단위의 데이터 비교가 가능하다는 장점이 있다.
구현방식
OLAP 종류와 구현방식
다차원 OLAP(MOLAP)-아키텍처
•MOLAP 1 Tier 구조(MOLAP 클라이언트 + 개인용 MDB)
•MOLAP 2 Tier 구조(MOLAP 클라이언트 + MOLAP 서버)
•MOLAP 3 Tier 구조(MOLAP 클라이언트 + MOLAP 서버 + DWH 서버)
•MOLAP 4 Tier 구조(웹 브라우저 + 웹 서버 + MOLAP 서버 + DWH 서버로 분류된다.
4 Tier 구조
OLAP 종류와 구현방식
관계형 OLAP(ROLAP)-아키텍처
• 관계형 DB를 그대로 이용하되 다차원적 데이터 모델링을 통해서 다차원적인 분석이 가능하도
록 하는 방식이며 MOLAP과는 달리 기존의 RDBMS를 기반으로 한 성형 스키마(star schema)
혹은 눈송이 스키마(snowflake schema)를 이용하여, 사용자에게 다차원 시야를 제공한다.
• ROLAP은 MOLAP에 비해 훨씬 적은 공간으로 유지가 가능하여 대용량의 데이터를 처리하는데
유리하다. 그러나 데이터는 RDBMS에 의해 레코드 단위로 관리가 되어 셀 단위의 비교가 불가
능하다. 사용자와 관계형 DBMS사이에 위치하여 사용자를 대신해서 복잡한 SQL을 생성하고
다차원 연산을 수행한다.
구현방식
OLAP 종류와 구현방식
관계형 OLAP(ROLAP)-구조
Step
Step
Step
Step
Step
Step
Step
Step
1
2
3
4
5
6
7
8
:
:
:
:
:
:
:
:
메타 데이터를 입력
메타 데이터의 생성과 보관
사용자간 ROLAP 사용자 버전으로 액세스
ROLAP 엔진이 메타데이터 엑세스
메타 데이터에서 원하는 정보를 추출
ROLAP 엔진에서 다이나믹하게 SQL 프로세싱
데이터웨어하우스에서 SQL 프로세싱
사용자가 원하는 형식으로 포맷
OLAP 종류와 구현방식
관계형 OLAP(ROLAP)-아키텍처
•ROLAP 1 Tier 구조(ROLAP 클라이언트 + 개인용 관계형 DB)
•ROLAP 2 Tier 구조(ROLAP 클라이언트 + DWH 서버)
•ROLAP 3 Tier 구조(ROLAP 클라이언트 + ROLAP 서버 + DWH 서버)
•ROLAP 4 Tier 구조(웹 브라우저 + 웹 서버 + ROLAP 서버 + DWH 서버)
4 Tier 구조
OLAP 종류와 구현방식
ROLAP과 MOLAP 비교
OLAP 종류와 구현방식
하이브리드 OLAP(HOLAP)
•HOLAP은 다차원 데이터의 저장 공간으로 다차원 데이터베이스와 관계형 데이터 베이스
가 함께 사용될 수 있는 제품이다.
•빠른 응답성능을 제공하는 MOLAP의 장점과 보다 확장성이 뛰어난 ROLAP의 장점을 결
합하여 보다 나은 솔루션을 제공하고 있다.
구현방식
[1] 데이터를 SAM이나 관계형 DB테이블을 이용해서 MOLAP서버에 로딩한다. 이때 관계형DB는
ER 모델링이 아니라 다차원 모델링으로 되어있다.
[2] MOLAP 서버내의 관리자용 소프트웨어가 차원테이블과 사실테이블에 대한 정보를 입력한다.
[3] MOLAP client가 MOLAP서버에 있는 데이터를 ACCESS 할 때 데이터가 있으면 그대로 보여주고
없으면 관계형 DB에서 가지고 온다.
OLAP 종류와 구현방식
데스크탑 OLAP(DOLAP)
•DOLAP에서는 OLAP 엔진의 기능이 DBMS 엔진에 내장되는 형태로서, DB로부터 레코드
들을 가져온 후에 OLAP 엔진이 다차원 형태로 변환하여 사용자에게 전달하던 기존의 방
식을 개선하여, DB에서 곧바로 다차원 형태로 전달하는 기술이다.
웹 OLAP(Web OLAP)
•ROLAP, MOLAP에도 모두 다 존재 하는 것으로, OLAP을 과거 클라이언트/서버에서만 구
현하는 것이 아니라 웹에서 구현하자는 것으로 Web OLAP의 구현 방식은 다이나믹한
HTML 방식과 Active-X 방식이 있다.
•Dynamic HTML 생성방식 : 웹서버 내에 있는 웹 인터페이스(OLAP 벤더 제출)가 OLAP서
버에 데이터를 요구하면 OLAP서버가 SQL을 만들어 데이터웨어하우스에 전송하는 방식
•Active-X 방식 : 웹서버 내에 있는 자바 프로그램은 다이나믹하게 SQL을 만들어 DWH에
보내고, DWH는 이를 처리하여 나온 데이터를 웹 서버에 보내준다. 그리고 자바로 만든
OLAP 프로그램이 다이나믹하게 자바 애플릿(Java applet)을 사용자의 웹 브라우저로 보
낸다.
OLAP 사례 : ROLAP
Power*Si Light 란? Power*Si Light는 저렴한 비용으로 고도의 정보를 손쉽게 분석할 수
있도록 제작된 중소규모 단위 업무 혹은 개인용 BI(Business Intelligence) 구축 도구로써
DW나 DM에 대한 전문지식이 없더라도 본 도구를 사용하면 텍스트, 엑셀, DB테이블의 자
료가 OLAP의 구조에 맞게 자동으로 변형, 적재됨으로 Power*Si Expert를 활용하여 다차
원의 정보를 손쉽게 분석할 수 있다.
구성단계별 내용
•DB 연결 : ODBC 통한 MS-SQL, MS-ACCESS, Oracle 연결
•추출 : File Load (Excel, TXT, CSV File) , DB Load(Table)
•변형 또는 정제 Meta Table 생성 업무, 모델, 요소, 항목함수 등 설정. 요소 테이블, 요소
컬럼 생성, 추가, 삭제 - 값 올림 번호 자동 입력. (Sequence Number)
•전송 : Insert Row at a time / Bulk Insert
OLAP 사례 : ROLAP
Power*Si의 구성
OLAP 사례 : MOLAP
PowerPlay 기본 설명
•강력한 e-Business BPM 보고서 작성 및 분석 기능 제공
•완벽한 Managed Reporting
•다차원 분석 및 웹, 윈도우, 엑셀, 모바일 웹환경에서의 완벽한 OLAP구현
•Cognos Portal 제품인 Upfront로 모든 정보 Publish 하여 최적의 e-Biz 실현
•High Application Value를 통한 전략적 시스템 구축
OLAP 사례 : MOLAP
PowerPlay Managed Reporting 생성 OLAP 기능
•다이나믹 보고서 생성
•전사적 차원의 활용
•단일 보고서로 다양한 사용자층 사용
•Balanced, Unbalanced/Nested Crosstab 생성
•열 또는 행의 다차원 정보 카테고리 포함
•손익계산서와 같은 보고서용 포멧 데이터
•모든 변경 사항을 큐브 구조에 적용
•매크로를 통한 자동화 기능
OLAP 사례 : BMT(Bench Mark Test)
'Bench Mark'란 어떤 것을 측정할 때 참조하는 것으로, 측량술에서의 벤
치마크는 이미 알려진 높이 위에 세워진 푯말이나 영구적인 표시를 말하
는데, 이것은 다른 지형의 고도를 측정하는 기준으로 사용된다.
•어떤 제품이나 시스템에 대해 측정되는 일련의 조건들. 'PC 매거진'의 실험실에서는 주기
적으로 몇몇 새로운 컴퓨터들이나 장치들을 동일한 응용프로그램이나 사용자 반응 및 상
황에서 시험하고 비교한다. 측정되고 비교되는 모든 제품에 대해 종합상황을 벤치마크라
고 부른다. 그 외에도 많은 상용 잡지는 자신들만의 벤치마크 테스트를 개발하여 제품들
의 등급을 검토할 때 사용한다. 단일 보고서로 다양한 사용자층 사용
•특정한 운영체계나 응용프로그램의 성능을 측정하기 위해 특별히 설계된 프로그램
•다른 새로운 제품들과 비교할 수 있도록, 사용자들이 이미 친숙한 기존의 제품
•어떤 상품이 만족시켜야만 할 성능 기준 표
•하드웨어나 소프트웨어의 성능을 비교 평가하기 위한 테스트
An OLAP Scorecard
Online Analytical
MOLAP (MDDBMS)
Processing (OLAP)
Traits
ROLAP (Relational SOLAP
(Simple, or Desktop
OLAP)
Cost
C-
C
B+
Analytical
Robustness
B
C
D
Scalability: Data
B-
A
C-
Scalability: Users
B
C-
A-
User Performance
A
C
A
Best Suited for:
Trending, planning,
forecasting, ABC
Consumer,
detailed analyses
Reporting
출처: Gartner
OLAP – i.e.,
“cubes”)
어떤 OLAP을 골라야 하나?
• There is no such thing as the overall ideal OLAP architecture,
offering the most efficient solution for each organization and
functional need.
– Different user needs call for different solutions.
– It is perfectly logical for organizations to buy and use more than one
OLAP tool, e.g., a low-end and a high-end tool.
• Since BI is increasingly part of total application offerings, this is
another reason why organizations use more than one tool.
– Although each organization has its own unique set of needs, it is
possible to compare various architectures as a first step towards tool
selection.
– If price is the key question, SOLAP tools should be considered.
• Traditionally, the MOLAP-based tools offer the most analytic value.
• In terms of data scalability, ROLAP tools present a strong case.
• If there are a large number of users that also need to work off-line,
they might need a SOLAP tool, downloading information from a
more centralized ROLAP environment.
• Go for MOLAP or SOLAP if user performance is the primary issue.
Positioning the Vendors
MOLAP
(MDDBMS)
ROLAP
SOLAP
EBIS
Computer
Associates
Applix
Hyperion
Microstrategy
Microsoft
Oracle
Pilot
Sagent
SAP
Seagate (Holos)
SAS
출처: Gartner
Whitelight
BI Platforms
Brio
Business
Objects
Cognos
Seagate (Info)
EBIS and Platforms
BI Infrastructure
BI Platforms and
Applications
OLAP is not a market, per se.
• The various forms of OLAP can be found across multiple BI
market segments – including BI platforms, enterprise BI suites,
BI infrastructure and BI applications.
• MOLAP functionality is most closely associated with BI
Platforms — environments used to develop custom, BI
applications.
• ROLAP can be within BI platforms and also within packaged
applications – especially where large volumes of attribute-rich
data must be analyzed.
• And SOLAP is most often found within enterprise BI suites –
aimed at the masses of potential users.
• All of these can complement each other. For instance, most
Enterprise BI Suites support access to MOLAP and some ROLAP
engines – to enhance scale and analytical functions.
OLAP 정리
• OLAP의 다차원분석, 빠른 접근, 강력한 계산능력이 다른
분석방법보다 뛰어남
• OLAP 특성은 데이터의 다차원 뷰, 대화식이고 복잡한 분
석편의성, 복잡한 계산을 수행하는 능력, 빠른 응답시간
포함
• 다차원 분석은 물리적 큐브에 의해서 표현될 수 있는 3차
원에 국한되지 않음
– 하이퍼큐브 들은 더 많은 차원을 가진 뷰들을 표현하는 방법을
제공 함
• ROLAP 과 MOLAP 차이점은 기본데이터가 저장되는 방
식에 있으므로, 사용자는 자신의 환경에 적합한지 확인
해야 함
• OLAP 도구들은 계속 성숙되어 가고 있음.