Prem Shanker Sr. Software Engineer Credit Suisse Introduction to Business Intelligence.

Slides:



Advertisements
Similar presentations
Dimensional Modeling.
Advertisements

Cubes for Flat Table Land
CHAPTER OBJECTIVE: NORMALIZATION THE SNOWFLAKE SCHEMA.
Introduction to ETL Using Microsoft Tools By Dr. Gabriel.
Copyright © 2005, SAS Institute Inc. All rights reserved. Making the Transition from MDDB-based OLAP Applications to a SAS ® 9 OLAP Solution Ivy Parker.
OLAP Services Business Intelligence Solutions. Agenda Definition of OLAP Types of OLAP Definition of Cube Definition of DMR Differences between Cube and.
Data Warehousing M R BRAHMAM.
Dimensional Modeling CS 543 – Data Warehousing. CS Data Warehousing (Sp ) - Asim LUMS2 From Requirements to Data Models.
Data Warehousing - 3 ISYS 650. Snowflake Schema one or more dimension tables do not join directly to the fact table but must join through other dimension.
CSE6011 Warehouse Models & Operators  Data Models  relations  stars & snowflakes  cubes  Operators  slice & dice  roll-up, drill down  pivoting.
Tanvi Madgavkar CSE 7330 FALL Ralph Kimball states that : A data warehouse is a copy of transaction data specifically structured for query and analysis.
Building a Data Warehouse with SQL Server Presented by John Sterrett.
Online Analytical Processing (OLAP) Hweichao Lu CS157B-02 Spring 2007.
XP Information Information is everywhere in an organization Employees must be able to obtain and analyze the many different levels, formats, and granularities.
SQL Analysis Services Microsoft® SQL Server 2005 Analysis Services provides unified, fully integrated views of your business data to support online.
SharePoint 2010 Business Intelligence Module 6: Analysis Services.
IST722 Data Warehousing Business Intelligence Development with SQL Server Analysis Services and Excel 2013 Michael A. Fudge, Jr.
Copyright © 2003 by Prentice Hall Module 4 Database Management Systems 1.What is a database? Data hierarchy and data organization Field, record, file,
Systems analysis and design, 6th edition Dennis, wixom, and roth
Analysis Services 101 Dave Fackler, MCDBA, MCSE, MCT Director, Business Intelligence Practice Intellinet Corporation.
Copyright © 2003 by Prentice Hall Computers: Tools for an Information Age Chapter 13 Database Management Systems: Getting Data Together.
Chris Testa-O’Neill QA. Who am I Chris Testa-O’Neill Business Intelligence Specialist at QA Technical Author for Microsoft E-Learning Author of the SQL.
IMS 6217: Data Warehousing / Business Intelligence Part 3 1 Dr. Lawrence West, Management Dept., University of Central Florida Analysis.
MSBI online training. MSBI Online Training Course Content : What Is Microsoft BI? Core concept – BI is the cube or UDM Example cube as seen using Excel.
Database Technical Session By: Prof. Adarsh Patel.
Vidas Matelis, Toronto SQL Server User Group November 13, 2008.
OnLine Analytical Processing (OLAP)
Cube Intro. Decision Making Effective decision making Goal: Choice that moves an organization closer to an agreed-on set of goals in a timely manner Goal:
Chapter 6 SAS ® OLAP Cube Studio. Section 6.1 SAS OLAP Cube Studio Architecture.
Discovering Computers Fundamentals Fifth Edition Chapter 9 Database Management.
BI Terminologies.
6.1 © 2010 by Prentice Hall 6 Chapter Foundations of Business Intelligence: Databases and Information Management.
MANAGING DATA RESOURCES ~ pertemuan 7 ~ Oleh: Ir. Abdul Hayat, MTI.
Data resource management
UNIT-II Principles of dimensional modeling
Management Information Systems, 4 th Edition 1 Chapter 8 Data and Knowledge Management.
Data Warehousing Multidimensional Analysis
Business Intelligence Transparencies 1. ©Pearson Education 2009 Objectives What business intelligence (BI) represents. The technologies associated with.
BI Practice March-2006 COGNOS 8BI TOOLS COGNOS 8 Framework Manager TATA CONSULTANCY SERVICES SEEPZ, Mumbai.
Centre of Competence on data warehouse Workshop Helsinki Database Cube and Browsing the Cube Mark Rantala.
June 08, 2011 How to design a DATA WAREHOUSE Linh Nguyen (Elly)
……………………………………………………………………………………… SQL Server Analysis Services Khalid Abu Qtaish Sr. BI Consultant / Solution Designer KhalidBI.wordpress.com
1 Copyright © 2009, Oracle. All rights reserved. Oracle Business Intelligence Enterprise Edition: Overview.
Oracle Business Intelligence Foundation - Commonly Used Features in Repository.
DAT 378 SQL Server 2000 Bringing The Best of Reporting Services and Analysis Services Together Sean Boon Program Manager, BI Systems
Last Updated : 26th may 2003 Center of Excellence Data Warehousing Introductionto Data Modeling.
SQL Server Analysis Services Understanding Unified Dimension Model (UDM)
BISM Introduction Marco Russo
Introduction to Core Database Concepts Getting started with Databases and Structure Query Language (SQL)
1 Database Systems, 8 th Edition Star Schema Data modeling technique –Maps multidimensional decision support data into relational database Creates.
Physical Layer of a Repository. March 6, 2009 Agenda – What is a Repository? –What is meant by Physical Layer? –Data Source, Connection Pool, Tables and.
MSBI ONLINE TRAINING Techverze. Introduction to MSBI Microsoft Business Intelligence delivers quality data and analyst can measure, manage and improve.
Or How I Learned to Love the Cube…. Alexander P. Nykolaiszyn BLOG:
Data Warehousing and OLAP Outline u Models & operations u Implementing a warehouse u Future directions.
Building the Corporate Data Warehouse Pindaro Demertzoglou Data Resource Management.
Advanced Analysis Services Security Chris Webb Crossjoin Consulting Limited.
Building the Corporate Data Warehouse Pindaro Demertzoglou Lally School of Management Data Resource Management.
1 Copyright © 2008, Oracle. All rights reserved. Repository Basics.
Extending and Creating Dynamics AX OLAP Cubes
SQL Server Analysis Services Fundamentals
Chapter 13 Business Intelligence and Data Warehouses
Fundamentals & Ethics of Information Systems IS 201
Data Warehouse.
Implementing Data Models & Reports with Microsoft SQL Server
Enhance BI Applications and Simplify Development
Module 12: Implementing an Analysis Services Tabular Data Model
DataMart (Data Warehouse) Tool:
Building your First Cube with SSAS
Let’s Build a Tabular Model in Azure
Analysis Services Analysis Services vs. the Data Warehouse vs. OLTP DB
Presentation transcript:

Prem Shanker Sr. Software Engineer Credit Suisse Introduction to Business Intelligence

Goals Learn about the concept of Data Warehousing and what BIDS offer. Learn about how to design and implement a Data Warehouse Dimensional database. Learn about what is a cube. Learn about the SQL Server Analysis Services Architecture Learn what is new in Analysis Services 2008 Learn about what is a MDX Language.

What BIDS can do? SQL Server Data Warehouse SourceSystems/OLTP Clients Design the PopulateCreateQuery Data Warehouse Data WarehouseOLAP CubesData Design the PopulateCreateQuery Data Warehouse Data WarehouseOLAP CubesData Query Tools ReportingAnalysis 2 Cubes Analysis Services

Data Warehouse Table and Cube Star Schema and Snowflake Schema Fact Table and Dimension Table

Table vs Cube  A simplified example: ProductRegionSales $ DonutEast1 DonutWest2 MilkEast3 MilkWest4 A typical relational table Make it into a cube Data are organized by rows Data are organized by intersections EastWestTotal Donut 123 Milk 347 Total 4610 Product dim Region dim Sales table

The basic ingredients to make a cube Two kinds of table in a data warehouse DB  fact table  dimension tables. Question:  Which one is a fact table and which one is a dimension table?

Star Schema A Star Schema contains a fact table and one or more dimension tables. 1.A Fact Table: The central fact table store the numeric fact (measures) such as Sales dollars, Costs, Unit Sales etc. 2.Dimension Tables: They surround the central fact table, and they store descriptive information about the measures The shape looks like a Star

Star schema

Snowflake Schema

Review: Data Warehouse Schemas –The Data Warehouse is either a Star Schema or a Snowflake Schema: Fact tables that contain foreign keys and numeric measures Dimension table contains the data describes the measures. The schema is ready for Analysis Services to build a cube.

Analysis Server OLEDB ADOMD.NET AMO IIS TCP HTTP XMLA ADOMD Client Apps BIDS SSMS SSRS Excel Client Server Architecture MOSS

A Logical Cube - Example Product Region West West East East South South North North Milk Donut Sandwich Soda Soda Beer North North South South East East West West Time The Sales$ by Soda by West in Yr of 2001

Tools to connect to Cubes SQL Server Management Studio (SSMS) Business Intelligence Development Studio (BIDS) Query Analyzer (SSMS) – To write MDX Excel 2007 – Uses MDX

Physical Cube- BIDS Analysis Services Database Unified Dimensional Model Data Source connection Data Source View Dimensions Cube Creation Wizard

Analysis Services Database An Analysis Services database is the top level container for other dependent objects: A database includes –Data Source –Data Source View –Cube –Dimension –Security Role

Creating an Analysis Services Database You can use one of the following to create a new empty database on an instance of SQL Server 2005 Analysis Services. –SQL Server Management Studio –Business Intelligence Development Studio.

Unified Dimensional Modeling Common Name: UDM New feature Since AS 2005 Combine all Relational Sources in one single environment. A single data model, called Unified Dimensional Model (UDM) over one or more physical data sources

Unified Dimensional Model - Concept The user needs to understand the particulars of each technology (e.g. the dialect of SQL used) to generate reports. Within one single Analysis Services, you can have more than one data sources to pull the data from.

Data Source Connection The data sources of your AS database is your Data Warehouse databases (SQL). It defines the connection string and authentication information for a database on an OLE DB data provider. You can use the Data Source Wizard to specify one or more data sources (SQLDB) for Analysis Services databases.

The Functions of the Data Sources Integrate your Analysis Services databases with the data warehouses They are used for the following: –Processing the Cubes and dimensions –Data Retrieval if ROLAP or HOLAP is used as the storage. –Write Back

Different Storage types of Cube

Data Sources connection to SQL Server For SQL Server, you can pick from the following providers: –OLE DB provider for SQL Server –SQL Native Client –.NET Provider/SqlClient Data Provider –(Avoid using.NET data sources – OLEDB is faster for processing in practices)

Data Source Views New feature Since AS 2005 A single unified view of the metadata (UDM) from specified tables and views that the data source defines in the project. It hides the physical implementation of the underlying data sources from the reporting users. Basic Data Layout for Cubes Define Data Relationships Can Leverage Multiple Data Sources The key to effective cube design Named Query As Objects – Not only Tables or Views

Demo

Dimension All dimensions are based on tables or views in a data source view. All dimensions are shared since AS 2005 The structure of a dimension is largely driven by the structure of the underlying dimension table or tables. The simplest structure is called a star schema, which is where each dimension is based on a single dimension table that is directly linked to the fact table by a primary key - foreign key relationship.

Dimension Consists of A dimension consists of: –Attributes that describe the entity –User-Defined Hierarchies that organize dimension members in meaningful ways such as Store Name  Store City  Store State  Store Country

Attributes New feature since AS 2005 Containers of dimension members Typically have one-many relationships between attributes in the same dimension: –City  State, –State  Country, etc. –All attributes implicitly related to the key

User Defined Hierarchies User Defined Hierarchies are created from Attributes Tree-like structure City  State  Country  All Provide navigation paths in a cube

Typical Example – Calendar Hierarchy The Year, Quarter, and Month attributes are used to construct a hierarchy, named Calendar, in the time dim. The relationship between the levels and members of the Calendar dimension (a regular dimension) is shown in the following diagram.

Measure Group In a cube, a measure is the set of values, usually numeric, that are based on a column in the fact table in the cube. A measure group contains one or more or all the measures from a single fact table. It can’t contain measures from different fact table.

Measure Group Advantages Measure groups provide the following advantages: –They can be partitioned and processed separately –They allows to include measures from diff fact tables. –They are grouped by granularity: Same measure group same granularity. –Security can be applied to specific measure groups

Cube A cube is defined by its measures and dimensions.

Inside a Cube Measures and Measure Groups Dimensions Relationships Calculations Actions Partitions Perspectives

Demo

Dimension Design Different Dimension Relationships –Regular Dimension Relationship –Reference Dimension Relationship –Fact Dimension Relationship –Role Playing Dimension –Parent-Child Hierarchy

Regular Dimension Relationships A traditional star schema design The Primary Key in the dimension table joins directly to Foreign Key in the fact table.

Reference Dimension Relationships Snowflake schema A Reference dimension using columns from multiple tables, or the dimension table links a dimension that is directly linked to the fact table.

Role Playing Dimension It is used in a cube more than one time, each time for a different purpose. Each role-playing dimension is joined to a fact table on a different foreign key. Example, you might add a Time dimension to a cube three times to track the times that –products are ordered, –products are shipped, –Orders are due..

Parent-Child Hierarchy A parent-child hierarchy is a hierarchy in a standard dimension that contains a parent attribute. A parent attribute describes a self-join, within the same dimension table. Example: Employee Hierarchy  An employee is an employee who reports to his/her manager. His manager is an employee as well  Employee Key self joins to ParentEmployeeKey

Slowly Changing Dimension Some attribute values may change over time. Two basic techniques: –Type 1 change –Type 2 change

Slowly Changing Dimension – Type 1 A Type 1 change, is to simply overwrite the old value with the new one.

Slowly Changing Dimension – Type 2 You create a new dimension row with the new value and a new surrogate key, and mark the old row or timestamp as no longer in effect The fact table will use the new surrogate key to link new fact measurements

Calculated Member A Calculated Members is a member of a dimension or a measure group that is defined based on a MDX expression. The value for the member is calculated at runtime. The result values are not stored in the disk.

Calculated Member Properties

Named Set A named set is a MDX expression that returns a set of dimension members. You can define named sets and save them as part of the cube definition. It allows you to reuse the same named set throughout the cube. Typical example: –Create a list Top 10 customers based on Sales –You can reuse same Top 10 customers in diff queries.

Best practices for Cube Design Use integer or numeric for key columns. Avoid ROLAP storage mode, particular with custom rollup or unary operators. MOLAP is the fastest storage structure in SSAS. Use parent-child dimensions prudently, especially those containing custom rollup and unary operators. No aggregation support in PC dimension.

Best practices for Cube Design (Contd..) Use role playing dimensions (e.g. OrderDate, BillDate, ShipDate) - avoids multiple physical copies. If the dimensions are base from the same physical table(s), use role playing dimensions.

What's New (Analysis Services - Multidimensional Database) New Attribute Relationship designer. The dimension editor has a new Attribute Relationship designer that makes it easier to browse and modify attribute relationships. New AMO Warnings. These new warning messages alert users when they depart from design best practices or make logical errors in database design.

What's New (Analysis Services - Multidimensional Database) Backup and Restore Improvements The backup and restore functionality in Analysis Services has a new storage structure and enhanced performance in all backup and restore scenarios. Improved Storage Structure The new storage structure provides a more robust repository for the archived database. By using the new storage structure, there is no practical limit to the size of the database file, nor is there a limit to the number of files that a database can have. Improved Performance The new backup and restore functionality achieves increased performance. Tests on different sized databases and with various numbers of files have shown significant performance improvements.

What's New (Analysis Services - Multidimensional Database) Dynamic Management Views Monitoring Connections, Sessions, and Commands Discover_Connections, Discover_Sessions, and Discover_Commands. select * from $system.discover_connections

Fetching Data from Cube What Is MDX Testing MDX with the Query Tool in SQL Server Management Studio The Basic Elements of an MDX Query

What Is MDX An Extension of SQL Syntax That: –Queries and manipulates multidimensional data in OLAP cubes –Defines calculations based on information in the cube –Defines and populates local cubes Not a True Extension – –Syntax Deviates Significantly from SQL

Testing MDX with Management Studio

Background Select on axis (x), on axis (y), on axis (z) From [cubeName]

Components Bikes Clothing Sales Cost Units Every cell has a name Measures Time Products

Sales Cost Units (Products.Bikes, Measures.Units, Time.[2000]) Every cell has a name Measures Time Components Bikes Clothing Products

Sales Cost Units (Products.Bikes, Measures.Units, Time.[2000]) (Products.Bikes, Measures.Sales, Time.[1999]) Every cell has a name Measures Time Components Bikes Clothing Products

Sales Cost Units What if I only specify this? (Products.Bikes, Measures.Units) A Cell is referenced by all the dimensions Measures Time Components Bikes Clothing Products

Computer Printer Monitor Sales Cost Units What if I only specify this? (Products.Bikes, Measures.Units) If Time’s default member is [1997] Ans: (Products.Bikes, Measures.Units, Time.[1997]) Default Member Measures Time Products

The Basic Elements of an MDX Query Select {[Ship Date].[Calendar]} on columns, {[Product].[Product Categories]} on rows from [Adventure Works]

Using Braces { } Braces Denote a Set Braces Can be Omitted when the Set is Unambiguous. In SSAS 2005 / 2008: SELECT [Ship Date].[Calendar] ON COLUMNS, [Product].[Product Categories] ON ROWS FROM [Adventure Works] In AS 2000: SELECT {[Ship Date].[Calendar]} ON COLUMNS, {[Product].[Product Categories]} ON ROWS FROM [Adventure Works]

Using Brackets [ ] Brackets Enclose a String Value Necessary for: –Field names with spaces: [New York], [Mary Lo] –Numbers as field names: [2007], [2008] Otherwise, the SSAS will treat them as numerous constants

Default Members Every Dimension has a Default Member –Usually the “All” member is the default member. Default Measures –The measures dimension also has a default measure –In our sample cube [Adventure Works], the default member for the cube is [Reseller Sales Amount]

Members You want to query more than a single cell. Use Members function Members function returns the set of members in a dimension, level, or hierarchy. select [Ship Date].[Calendar] on columns, [Product].[Product Categories].members on rows from [Adventure Works]

Test Yourself: Number 1 [Ship Date].[Calendar] also has a membership; that is, it is made up of more granular information. Modify the query to return the membership of the [Ship Date].[Calendar]dimension. select [Ship Date].[Calendar] on columns, [Product].[Product Categories].members on rows from [Adventure Works] Desired result:

Naming Additional Dimensions NumberName AXIS(0)COLUMNS AXIS(1)ROWS AXIS(2)PAGES AXIS(3)SECTIONS AXIS(4)CHAPTERS

2004 [Ship Date].[Calendar] [Promotion].[Promotions] No Discunt Reseller Retrieving Data from a Cube select [Ship Date].[Calendar].[Calendar Year].[CY 2004] on axis(0), [Promotion].[Promotions].[reseller] on axis(1) from [Adventure Works]

Test Yourself: Number 2 Modify the query to return the sales of Bikes with No Discount select [Ship Date].[Calendar].[Calendar Year].[CY 2004] on axis(0), [Promotion].[Promotions].[reseller] on axis(1) from [Adventure Works] Expect Result

Fully Qualified Names [CY 2001] below could be – [Delivery Date].[Calendar].[CY 2001] or – [Ship Date].[Calendar].[CY 2001] select [CY 2001] on axis(0) from [Adventure Works] [Product].[Product Categories].[bikes] is the same as [Product].[Product Categories].[All Products].[bikes]

2004 [Ship Date].[Calendar] Bikes Components Clothing [Product]. [Product Categories] Two Dimensions with Where Clause select [Ship Date].[Calendar].[Calendar Year].members on axis(0), [Promotion].[Promotions].[reseller] on axis(1) from [Adventure Works] where [Product].[Product Categories].[bikes] [Promotion].[Pr omotions] No Discount Reseller

Demo Lab MDX Query

Few Useful References services.aspx All BI WebCasts - asts&id=all asts&id=all MDX References – msdn.microsoft.com/en-us/library/ms aspx

Thank You