1 / 75

Introduction to Business Intelligence

Introduction to Business Intelligence. Prem Shanker Sr. Software Engineer Credit Suisse. 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.

ralph
Download Presentation

Introduction to Business Intelligence

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


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

  2. 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.

  3. What BIDS can do? Cubes Source Systems/OLTP Clients SQL ServerData Warehouse Analysis Services Query Tools Reporting Analysis 2 1 3 4 Design the Populate Create Query Data Warehouse Data Warehouse OLAP Cubes Data

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

  5. Table vs Cube • A simplified example: A typical relational table Make it into a cube Data are organized by rows Data are organized by intersections Sales table Region dim Product dim

  6. 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?

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

  8. Star schema

  9. Snowflake Schema

  10. 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.

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

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

  13. 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

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

  15. 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

  16. 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.

  17. 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

  18. 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.

  19. 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.

  20. 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

  21. Different Storage types of Cube

  22. 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)

  23. 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

  24. Demo

  25. 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.

  26. 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

  27. 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

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

  29. 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.

  30. 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.

  31. 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

  32. Cube A cube is defined by its measures and dimensions.

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

  34. Demo

  35. Dimension Design • Different Dimension Relationships • Regular Dimension Relationship • Reference Dimension Relationship • Fact Dimension Relationship • Role Playing Dimension • Parent-Child Hierarchy

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

  37. 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.

  38. 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..

  39. 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

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

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

  42. 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

  43. 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.

  44. Calculated Member Properties

  45. 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.

  46. 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.

  47. 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.

  48. 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.

  49. 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.

More Related