Upload
swarnava-ganguly
View
223
Download
0
Embed Size (px)
Citation preview
7/30/2019 SQL Analysis Services 2008
1/47
SQL Analysis Services 2008
7/30/2019 SQL Analysis Services 2008
2/47
Microsoft SQL Server 2008 Analysis Services providesunified, fully integrated views of your business datato support online analytical processing (OLAP), key
performance indicator (KPI) scorecards, and powerfuldata mining capabilities. It provides reliable businessdecision support solutions
SQL Server 2008 Analysis Services (SSAS) provides
Unified and integrated view of all your business data
Reporting, online analytical processing (OLAP) analysis
Key Performance Indicator (KPI) scorecards
Data mining
7/30/2019 SQL Analysis Services 2008
3/47
Advantages
Microsoft SQL Server 2008 Analysis Services, organizations now have a
single, consistent solution for reporting against either OLTP or OLAP datastores.
Reduces the amount of effort required to provide a consistent view of
data that is integrated from an array of disparate applications and formats
7/30/2019 SQL Analysis Services 2008
4/47
Terminologies
The basic unit of storage and analysis in Analysis Services is the cube.A cube is a collection of data thats been aggregated to allow queriesto return data quickly.
Each cube has one or more dimensions, each based on one or moredimension tables. A dimension represents a category for analyzingbusiness data
A fact tablecontains the basic information that you wish to summarize.
This might be order detail information, payroll records, or anythingelse thats amenable to summing and averaging.
7/30/2019 SQL Analysis Services 2008
5/47
7/30/2019 SQL Analysis Services 2008
6/47
ARCHITECTURE
7/30/2019 SQL Analysis Services 2008
7/47
A relational database schema for representing multidimensional data. It is the simplest form of data warehouse schema that contains one or more
dimensions and fact tables. It is called a star schema because the entity-relationship diagram between dimensions and fact tables resembles a star whereone fact table is connected to multiple dimensions.
The center of the star schema consists of a large fact table and it points towardsthe dimension tables.
The advantage of star schema are slicing down, performance increase and easyunderstanding of data.
http://download-uk.oracle.com/docs/cd/B10501_01/server.920/a96520/glossary.htm7/30/2019 SQL Analysis Services 2008
8/47
A star schema structure normalized through the use of outrigger tables. i.e dimensiontable hierachies are broken into simpler tables.
In OLAP, this snow flake schema approach increases the number of joins and poorperformance in retrieval of data. Since dimension tables hold less space, snow flakeschema approach may be avoided.
7/30/2019 SQL Analysis Services 2008
9/47
In a star schema every dimension will have a primary key.
In a star schema, a dimension table will not have any parent table.
Whereas in a snow flake schema, a dimension table will have one ormore parent tables.
Hierarchies for the dimensions are stored in the dimensional table itselfin star schema.
Whereas hierarchies are broken into separate tables in snow flakeschema. These hierarchies helps to drill down the data from topmosthierarchies to the lowermost hierarchies.
7/30/2019 SQL Analysis Services 2008
10/47
OLAP world, there are mainly 3 different types:
Multidimensional OLAP (MOLAP)
Advantages Excellent performance In MOLAP, data is stored in a multidimensional cube. The storage is not in the relational database, but in proprietary
formats. MOLAP cubes are built for fast data retrieval, and are optimal for
slicing and dicing operations.
Disadvantages:
It is limited in the amount of data it can handle. Because allcalculations are performed when the cube is built, it is not possibleto include a large amount of data in the cube itself.
It requires an additional investment in human and capital resourcesare needed.
7/30/2019 SQL Analysis Services 2008
11/47
Relational OLAP (ROLAP)
This methodology relies on manipulating the data stored in the relational database
Advantages:
It can handle large amounts of data, ROLAP itself places no limitation ondata amount
Disadvantages:
Performance can be slow. Because each ROLAP report is essentially a SQLquery (or multiple SQL queries) in the relational database, the query timecan be long if the underlying data size is large .
It is difficult to perform complex calculations .
7/30/2019 SQL Analysis Services 2008
12/47
Hybrid OLAP (HOLAP) refers to technologies that combine MOLAP andROLAP.
Advantages
For summary-type information, HOLAP leverages cube technology forfaster performance.
When detail information is needed, HOLAP can "drill through" fromthe cube into the underlying relational data.
7/30/2019 SQL Analysis Services 2008
13/47
Advantages of SSAS Cubes
7/30/2019 SQL Analysis Services 2008
14/47
To build a new data cube using BIDS, you needto perform these steps:
Create a new Analysis Services project
Define a data source
Define a data source view
Invoke the Cube Wizard
7/30/2019 SQL Analysis Services 2008
15/47
To create a new Analysis Services project,
follow these steps: Select Microsoft SQL Server 2008 > SQL Server Business Intelligence
Development Studio from the Programs menu to launch Business Intelligence
Development Studio.
7/30/2019 SQL Analysis Services 2008
16/47
To define a Data source for the new cube, follow these steps:
Right-click on the Data Sources folder in Solution Explorer and select New
Data Source.
7/30/2019 SQL Analysis Services 2008
17/47
To create a new data source view, follow these steps:
Right-click on the Data Source Views folder in Solution Explorer and select
New Data Source View.
7/30/2019 SQL Analysis Services 2008
18/47
BIDS will automatically display the schema
of the new data source view
7/30/2019 SQL Analysis Services 2008
19/47
To create the new cube, follow these steps:
Right-click on the Cubes folder in Solution Explorer and select New Cube.
7/30/2019 SQL Analysis Services 2008
20/47
Deploying ,Processing, Browsing a Cube
7/30/2019 SQL Analysis Services 2008
21/47
7/30/2019 SQL Analysis Services 2008
22/47
Aggregations & Aggregation Wizard
Pre calculated summaries of data from
leaf levels
7/30/2019 SQL Analysis Services 2008
23/47
Aggregations
Aggregations provide performance improvements by allowing Microsoft SQLServer 2008 Analysis Services (SSAS) to retrieve pre-calculated totals directlyfrom cube storage instead of having to recalculate data from an underlying datasource for each query.
The Aggregation Design Wizard uses a sophisticated algorithm to selectaggregations for pre calculation so that other aggregations can be quickly
computed from the pre calculated values. This technique saves processing time and reduces storage requirements, with
minimal effect on query response time. After the aggregation has been created, if the structure of a cube ever changes,
or if data is added to or changed in a cube's source tables, it is usually necessaryto review the cube's aggregations and process the cube again.
7/30/2019 SQL Analysis Services 2008
24/47
Aggregation Design Wizard.
Microsoft provides a nice wizard to generate aggregates
on measure groups and partitions
7/30/2019 SQL Analysis Services 2008
25/47
MDX Multidimensional Expressions (MDX) is the query language that you use to work with and
retrieve multidimensional data in Microsoft SQL Server 2008 Analysis Services (SSAS).
MDX is superficially similar in many ways to the SQL syntax that is typically used withrelational databases. However, MDX is not an extension of the SQL language and isdifferent from SQL in many ways.
Basic MDX Select Query :
7/30/2019 SQL Analysis Services 2008
26/47
Calculations
Calculated members are customized measures or dimensionmembers that are defined based on a combination of cubedata, arithmetic operators, numbers, and functions. For
example, you can create a calculated member that calculates
the sum of two physical measures in the cube.
7/30/2019 SQL Analysis Services 2008
27/47
7/30/2019 SQL Analysis Services 2008
28/47
7/30/2019 SQL Analysis Services 2008
29/47
7/30/2019 SQL Analysis Services 2008
30/47
SSAS 2008 Day 2
7/30/2019 SQL Analysis Services 2008
31/47
KPIs KPIs or Key Performance Indicators are one of the most important entities in driving
business decisions. It can be defined as a (quantifiable) measurement used to define and
measure an organization's progress in achieving business goals. SQL Server 2008 Analysis Services, allows for the creation of KPIs on its cubes.
KPI measure the health of a business.
KPI uses graphic displays to display status and trend eg. Traffic light
KPI defines 4 expressions for performance metrics
Actual Value (-1 to 1)
Goal Value Status (-1 to 1)
Trend (-1 to 1)
7/30/2019 SQL Analysis Services 2008
32/47
KPI Terms used in SSAS Value
The value is an MDX expression used to return the actual value of the KPI
Goal Thegoal is an MDX expression used to specify the target value of the KPI.
Status
Ideal values for the status would be a max of 1 (good) to a minimum of -1(bad), while 0 indicates neutral status
Status Indicator
The status indicatoris a visual element which is used to present the status of
the KPI. Eg gauges, traffic lights or smileys. Trend
The trendis an MDX expression that evaluates the value of a KPI across time. Itcan be expressed using any time based criteria. Using this, the business userwill be able to determine how the KPI's value has progressed over time.
Trend Indicator
The trend indicatoris a visual element which is used to present the trend of
the KPI.
7/30/2019 SQL Analysis Services 2008
33/47
7/30/2019 SQL Analysis Services 2008
34/47
7/30/2019 SQL Analysis Services 2008
35/47
The KPIs are done! Next, process the cube. You will be able to view the KPIs using the built-in KPI
Browser under the KPIs tab in BIDS.
7/30/2019 SQL Analysis Services 2008
36/47
Actions Cube supports actions and action taken in basis of data
URL: Go to a specified URL. This type of action supports both directing the user to some URL toobtain further information, and directing the user to some Web-based application that allows anew task to be performed.
For example:For a product, go to the company website describing that product.
Reporting Execute a specified report. For eg: for a given product code the action could execute a
parameterized report providing description and current order status
Drill through User can drill through to the lowest level of detail.
7/30/2019 SQL Analysis Services 2008
37/47
Actions- Drillthrough
7/30/2019 SQL Analysis Services 2008
38/47
The most important aspect of it is that drill
through returns detail level data from within
the cube.
The target can be a cube, dimension,
hierarchy, level, dimension members,
hierarchy members, level members, set,cells, etc. An action that targets cells can
be further restricted to a subspace of the
cube using an MDX expression.
7/30/2019 SQL Analysis Services 2008
39/47
Partitions A database partition is an independent subset of a database that contains its own
data, indexes, configuration files, and transaction logs. A partition group is a logical grouping of one or more database partitions that lets
you control the placement of table spaces and buffer pools within the database
partitions.
7/30/2019 SQL Analysis Services 2008
40/47
Partitions
7/30/2019 SQL Analysis Services 2008
41/47
Security Cube provide role based security. Roles can be defined and permissions
can be granted to the role. Administrative permissions can be granted independently of data access
permissions. Also, separate permissions can be defined for reading the metadataof the object, and for read/write access to the data.
Data can be secured at levels of granularity down to individual cells.
7/30/2019 SQL Analysis Services 2008
42/47
Role based Security
7/30/2019 SQL Analysis Services 2008
43/47
Security
7/30/2019 SQL Analysis Services 2008
44/47
7/30/2019 SQL Analysis Services 2008
45/47
Perspectives
Users engaged on a particular task generally do not haveto see the complete model. To avoid overwhelmingusers with the sheer size of the model, we need theability to define a view that shows a subset of the model
The cube provides such views, called perspectives. A
cube can have many perspectives, each one presentingonly a specific subset of the model (measures,dimensions, attributes, and so on) that is relevant to aparticular group of users. Each perspective can then beassociated with the user security roles that define the
users who are permitted to see that perspective.
7/30/2019 SQL Analysis Services 2008
46/47
Translations
International users frequently have a need to viewmetadata in their local language. To address this, thecube allows translations of metadata to be provided
in any language. A client application that connectsusing a particular locale would receive all metadatain the appropriate language.
The model can also provide translations of data. Anattribute can map to different elements in the data
source, and provide the translations for thoseelements in different languages.
7/30/2019 SQL Analysis Services 2008
47/47