MSDN Documentation

Cube Design in Analysis Services

This section provides comprehensive guidance on designing and implementing effective OLAP cubes within Microsoft SQL Server Analysis Services (SSAS). A well-designed cube is the cornerstone of a successful business intelligence solution, enabling efficient data analysis and reporting.

Understanding the Fundamentals

Before diving into the specifics of cube design, it's crucial to grasp the foundational concepts:

Key Components of Cube Design

Designing a cube involves several critical steps and considerations:

  • Defining the Business Requirements: Start by understanding the analytical needs of your business users. What questions do they need to answer?
  • Selecting Source Data: Identify the appropriate fact and dimension tables from your data warehouse or operational systems.
  • Creating Dimensions: Design dimensions with appropriate hierarchies, attributes, and levels. Consider attribute relationships and display folders for usability.
  • Creating Measures: Define measures accurately, considering aggregation types (SUM, COUNT, AVG, MIN, MAX) and potentially calculated measures.
  • Building the Cube Structure: In SSAS, this involves creating a Cube project, adding the data source view, and then defining the dimensions and measures that will form the cube.
  • Configuring Cube Properties: Fine-tune cube properties such as storage mode, processing options, and security settings.
  • Implementing Advanced Features: Explore features like KPIs, actions, perspectives, and translations to enhance the analytical experience.

Best Practices for Cube Design

Adhering to best practices ensures performance, scalability, and usability of your OLAP cubes.

  • Normalize Dimensions: Use normalized dimension tables to reduce redundancy and improve data integrity.
  • Use Meaningful Names: Employ clear and descriptive names for dimensions, hierarchies, attributes, and measures.
  • Optimize for Performance: Consider partitioning, aggregation designs, and storage modes (MOLAP, ROLAP, HOLAP) to optimize query performance.
  • Design for User Experience: Create intuitive hierarchies, use display folders, and provide user-friendly attribute names.
  • Implement Security: Define row-level and cell-level security to control data access based on user roles.
  • Regularly Review and Refactor: As business needs evolve, periodically review and refactor your cube designs for continued relevance and performance.

Working with Dimensions

Dimensions are crucial for enabling user exploration. Key aspects include:

Example: Designing a 'Geography' dimension with attributes like 'Country', 'State/Province', and 'City', forming a natural hierarchy.

Creating and Managing Measures

Measures are the quantitative data points users analyze. Consider:


-- Example of a calculated measure definition in SSAS MDX
CREATE MEMBER CURRENTCUBE.[Measures].[Profit Margin]
 AS ([Measures].[Profit] / [Measures].[Sales Amount]),
FORMAT_STRING = "Percentagem";
            

Tools and Technologies

The primary tool for designing SSAS cubes is:

For further technical details and advanced scenarios, refer to the specific documentation on Dimension Design and Measure Groups.