MSDN Documentation

Designing Databases for SQL Server Analysis Services Multidimensional Models

This document provides comprehensive guidance on designing databases that serve as the foundation for your SQL Server Analysis Services (SSAS) multidimensional models. A well-designed database schema is crucial for performance, scalability, and ease of use of your analytical solutions.

Key Considerations for Database Design

When designing a relational database intended for use with SSAS multidimensional models, several factors should be taken into account:

Best Practices and Recommendations

Adhering to these best practices will ensure a robust and performant SSAS multidimensional solution:

  1. Use Surrogate Keys: Always use surrogate keys (system-generated, unique integer identifiers) as primary keys in dimension tables and as foreign keys in fact tables. This decouples the SSAS model from the operational system's keys and handles changes in natural keys gracefully.
  2. Denormalize Dimension Attributes (Slightly): While dimensions are generally normalized, consider denormalizing attributes that are frequently queried together to avoid additional joins within the dimension itself.
  3. Granularity of Fact Tables: Define the lowest level of detail for your fact tables. This granularity dictates what kind of analysis can be performed.
  4. Pre-Aggregation: While SSAS handles aggregations, consider if some high-level aggregations can be pre-calculated in the relational source for performance gains, especially for complex calculations.
  5. Data Cleansing and Validation: Ensure data quality in the relational source. SSAS models inherit the quality of the underlying data.
  6. Naming Conventions: Adopt clear and consistent naming conventions for tables and columns to make the database schema understandable.

Example Schema Design (Star Schema)

Consider a simple sales scenario:

Dimension Tables:

Fact Table:

In this star schema:

Further Reading