Free Newsletters:
DatabaseDaily  
Database Journal
Search Database Journal:
 
MS SQL Oracle DB2 Access MySQL PostgreSQL Sybase PHP SQL Etc SQL Scripts & Samples Links Database Forum DBA Videos
internet.com

» Database Journal Home
» DBA Videos
» Database Articles
» Database Tutorials
MS SQL
Oracle
MS Access
MySQL
DB2
» RESOURCES
Database Tools
SQL Scripts & Samples
Links
» Database Forum
» DBA Jobs
» Sitemap

News Via RSS Feed



follow us on Twitter

Marketplace Partners
Be a Marketplace Partner

internet.commerce
Be a Commerce Partner


















Mariposa Bot Shipped With Vodafone Smartphone

IT Job Market Heating Up: Report

Bing Makes Strides But Momentum Stalls

internet.com
IT
Developer
Internet News
Small Business
Personal Technology

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers


Database Journal | DBA Support | SQLCourse | SQLCourse2







Related Articles
Dimensional Model Components: Dimensions Part I
Dimensional Model Components: Dimensions Part II
Dimension Attributes: Introduction and Overview, Part I
Attribute Member Keys – Pt 1: Introduction and Simple Keys
Attribute Member Keys – Pt II: Composite Keys

PROGRAMMER ANALYST (IL)
Next Step Systems
US-IL-Chicago

Justtechjobs.com Post A Job | Post A Resume

Featured Database Articles

MS SQL

December 23, 2008

Introduction to Attribute Relationships in MSSQL Server Analysis Services

By William Pearson

Best Practices and Other Considerations Surrounding Attribute Relationships

Best practices dictate that, in designing attribute relationships, we 1) create the most efficient dimension model that 2) best represents the semantics of the business that it represents. Perhaps the most critical element of success we can seek in doing so is a deep familiarity with the organization’s data, together with an extensive understanding of the business requirements that the data must support. Defining attribute relationships incorrectly can cause invalid query results, among other maladies, within our Analysis Services databases.

Anytime the data underlying our Analysis Services UDM support the definition of unique attribute relationships, we should use the Attribute Relationships tab of Dimension Designer to define these unique relationships.

NOTE: We will examine detailed settings that support existing attribute relationships within the sample Adventure Works cube in the hands-on practice section of the article that follows this one.

Any attribute that has an “outbound” relationship must have a unique key relative to its related attribute. In other words, a member in a source attribute must identify one - and only one - member in a related attribute. For example, consider the relationship, City -> State-Province that we used in examples earlier: in this relationship, the source attribute is City and the related attribute is State. The source attribute is the “many” side and the related side is the “one” side of the many-to-one relationship. The key for the source attribute would be City + State. A visual example how this key is established in the Customer dimension of the Adventure Works cube is depicted in Illustration 5.

Establishing a Unique Key for the City Attribute, Relative to the State-Province Attribute
Illustration 5: Establishing a Unique Key for the City Attribute, Relative to the State-Province Attribute

We noted earlier that attributes within a given dimension are always related either directly or indirectly to the key attribute. We also noted that, when we define a dimension based on a star schema (again, typically a scenario where all dimension attributes are derived from the same relational table), an attribute relationship is automatically defined between the key attribute and each non-key attribute of the dimension. Moreover, when we define a dimension based upon a snowflake schema (a scenario where dimension attributes are derived from multiple related tables), an attribute relationship is automatically defined as follows:

  • Between the key attribute and each non-key attribute bound to columns in the main dimension table.
  • Between the key attribute and the attribute associated with the foreign key in the secondary table that links the underlying dimension tables.
  • Between the attribute associated with the foreign key in the secondary table and each non-key attribute bound to columns from the secondary table.

We noted earlier that we might want to modify these default attribute relationships, and cited but one example. Reasons might include the following:

  • To define a natural hierarchy;
  • To define a custom sort order; or
  • To define dimension granularity based upon a non-key attribute.

Natural Hierarchy Relationships

A hierarchy is known as a “natural hierarchy when each attribute included in the user-defined hierarchy has a one-to-many relationship with the attribute immediately below it. For example, consider a Customer dimension (in this case, a “slimmed down” version of the Customer dimension table that underlies the sample Adventure Works cube), based upon a relational source table with these columns:

  • CustomerKey
  • CustomerName
  • Age
  • Gender
  • Email
  • City
  • Country
  • Region

The corresponding Analysis Services dimension has seven attributes:

  • Customer (based on CustomerKey, with CustomerName supplying member names)
  • Age
  • Gender
  • Email
  • City
  • Region
  • Country

Relationships representing natural hierarchies are enforced by creating an attribute relationship between the attribute for a level, and the attribute for the level there under. This specifies a natural relationship and potential aggregation within Analysis Services. In our “slim version” of the Customer dimension, a natural hierarchy exists for the Country, Region, City, and Customer attributes. The natural hierarchy for {Country, Region, City, Customer} is described by adding the following attribute relationships:

  • The Country attribute has an attribute relationship to the Region attribute.
  • The Region attribute has an attribute relationship to the City attribute.
  • The City attribute has an attribute relationship to the Customer attribute.

As we see in other articles of this series, we are not limited to working with natural hierarchies in Analysis Services. We can also create navigational structures via user-defined hierarchies (which represent ad hoc, reporting hierarchies) whose bases reside in logical hierarchical relationships versus associations that exist in the data.

For example, we might create a user-defined hierarchy based on {Age, Gender}. The ultimate information consumer would not see any difference in how the natural and user-defined hierarchies behave, although performance benefits would accrue to the natural hierarchy in terms of aggregating and indexing structures (invisible to the consumer, in this case) based upon the natural associations within the source data.

We will examine the many properties, and their settings that we use in constructing attribute relationships in next month’s column, where we will gain hands-on exposure to these in a working environment.

Conclusion

In this article we introduced attribute relationships in Analysis Services, extending the examination of the dimensional model that we began in Dimensional Model Components: Dimensions Parts I and II. In a manner similar to previous articles within this subseries, we overviewed the general concepts involved and looked ahead to our next article, where we will perform a hands-on, detailed examination of the properties that support attribute relationships existing within a working sample environment. Our focus, we stated, was upon the appropriate use of attribute relationships in providing support for the selection and delivery of enterprise data in a more focused and consumer-friendly manner, without the unwanted effects of system performance degradation, and other unexpected or undesirable results that can accompany the uninformed use of this component of the conceptual model.

Our introduction included a review of the nature of attribute relationships, and their purposes / uses within a containing dimension within Analysis Services, as well as their role in helping to meet the primary objectives of business intelligence. We performed an overview of attribute relationships, and a discussion of their default configurations, and how we can improve upon those configurations to enhance overall processing performance. We then moved into a discussion of other best practices and general considerations surrounding attribute relationships. Finally, we looked ahead to the next article of this series, where we will examine the individual properties underlying attribute relationships, and conduct a review of the respective settings associated with each property, basing our exercise upon the review of a representative dimension attribute within our sample UDM.

About the MSSQL Server Analysis Services Series

This article is a member of the series Introduction to MSSQL Server Analysis Services. The monthly column is designed to provide hands-on application of the fundamentals of MS SQL Server Analysis Services (“Analysis Services”), with each installment progressively presenting features and techniques designed to meet specific real-world needs. For more information on the series, please see my initial article, Creating Our First Cube. For the software components, samples and tools needed to complete the hands-on portions of this article, see Usage-Based Optimization in Analysis Services 2005, another article within this series.

» See All Articles by Columnist William E. Pearson, III

Discuss this article in the MSSQL Server 2000 Analysis Services and MDX Topics Forum.

Introduction to MSSQL Server Analysis Services Series
Part 88: Introduction to Security in Analysis Services
Part 87: Cube Storage: Planning Partitions from a SQL Server Management Studio Perspective
Part 86: Cube Storage: Planning Partitions (Business Intelligence Development Studio Perspective)
Part 85: Cube Storage: Introduction to Partitions
Part 84: Introduction to Cube Storage
Part 83: Attribute Discretization: Customize Grouping Names
Part 82: Attribute Discretization: Using the “Clusters” Method
Part 81: Attribute Discretization: Using the “Equal Areas” Method
Part 80: Attribute Discretization: Using the Automatic Method
Part 79: Introduction to Attribute Discretization
Part 78: More Exposure to Settings and Properties in Analysis Services Attribute Relationships
Part 77: Attribute Relationships: Settings and Properties
Part 76: Introduction to Attribute Relationships in MSSQL Server Analysis Services
Part 75: Attribute Member Values in Analysis Services
Part 74: MSSQL Analysis Services - Attribute Member Names
Part 73: Attribute Member Keys – Pt 2: Composite Keys
Part 72: Attribute Member Keys – Pt 1: Introduction and Simple Keys
Part 71: Dimension Attributes: Introduction and Overview, Part V
Part 70: Dimension Attributes: Introduction and Overview, Part IV
Part 69: Dimension Attributes: Introduction and Overview, Part III
Part 68: Dimension Attributes: Introduction and Overview, Part II
Part 67: Dimension Attributes: Introduction and Overview, Part I
Part 66: Dimensional Model Components: Dimensions Part II
Part 65: Dimensional Model Components: Dimensions Part I
Part 64: Manage Unknown Members in Analysis Services 2005, Part II
Part 63: Manage Unknown Members in Analysis Services 2005, Part I
Part 62: Alternatively Sorting Attribute Members in Analysis Services 2005
Part 61: Introduction to Linked Objects in Analysis Services 2005
Part 60: Distinct Counts in Analysis Services 2005
Part 59: Positing the Intelligence: Conditional Formatting in the Analysis Services Layer
Part 58: Administration and Optimization: SQL Server Profiler for Analysis Services Queries
Part 57: Mastering Enterprise BI: Time Intelligence Pt. II
Part 56: Mastering Enterprise BI: Time Intelligence Pt. I
Part 55: Design and Documentation: Introducing the Visio 2007 PivotDiagram
Part 54: Actions in Analysis Services 2005: The URL Action
Part 53: Actions in Analysis Services 2005: The Drillthrough Action
Part 52: Mastering Enterprise BI: Introducing Actions in Analysis Services 2005
Part 51: Mastering Enterprise BI: Introduction to Translations
Part 50: Mastering Enterprise BI: Introduction to Perspectives
Part 49: Introduction to the Analysis Services 2005 Query Log
Part 48: Mastering Enterprise BI: Working with Measure Groups
Part 47: Mastering Enterprise BI: Introduction to Key Performance Indicators
Part 46: Mastering Enterprise BI: Extend the Data Source with Named Calculations, Pt. II
Part 45: Mastering Enterprise BI: Extend the Data Source with Named Calculations, Pt. I
Part 44: Process Analysis Services Objects with Integration Services
Part 43: Usage-Based Optimization in Analysis Services 2005
Part 42: Named Sets Revisited
Part 41: Migrating an Analysis Services 2000 Database to Analysis Services 2005
Part 40: Introducing Data Source Views
Part 39: Reporting Options for Analysis Services Cubes: MS Excel 2003 and More ...
Part 38: Mastering Enterprise BI: Create Aging "Buckets" in a Cube
Part 37: Mastering Enterprise BI: Relative Time Periods in an Analysis Services Cube, Part II
Part 36: Mastering Enterprise BI: Relative Time Periods in an Analysis Services Cube
Part 35: Process Analysis Services Cubes with DTS
Part 34: Presentation Nuances: CrossTab View - Same Dimension
Part 33: Point-and-Click Cube Schema Simplification
Part 32: Manage Distinct Count with a Virtual Cube
Part 31: Distinct Count Basics: Two Perspectives
Part 30: Semi-Additive Measures and Periodic Balances
Part 29: Performing Incremental Cube Updates - An Introduction
Part 28: Partitioning a Cube in Analysis Services - An Introduction
Part 27: Basic Storage Design
Part 26: Derived Measures vs. Calculated Measures
Part 25: Creating a Dynamic Default Member
Part 24: Another Approach to Local Cube Design and Creation
Part 23: Introduction to Local Cubes
Part 22: Actions in Virtual Cubes
Part 21: Putting Actions to Work in Regular Cubes
Part 20: Reporting Options for Analysis Services Cubes: ProClarity Part II
Part 19: Reporting Options for Analysis Services Cubes: ProClarity Professional, Part I
Part 18: Using Calculated Cells in Analysis Services , Part II
Part 17: Using Calculated Cells in Analysis Services, Part I
Part 16: MSAS Administration and Optimization: Toward More Sophisticated Analysis
Part 15: MSAS Administration and Optimization: Simple Cube Usage Analysis
Part 14: Build a Web Site Traffic Analysis Cube: Part II
Part 13: Build a Web Site Traffic Analysis Cube: Part I
Part 12: Reporting Options for Analysis Services Cubes: Cognos PowerPlay
Part 11: Reporting Options for Analysis Services Cubes: MS FrontPage 2002
Part 10: Reporting Options for Analysis Services Cubes: MS Excel 2002
Part 9: Drilling Through to Details: From Two Perspectives
Part 8: Custom Cubes: Financial Reporting - Part II
Part 7: Custom Cubes: Financial Reporting
Part 6: Exploring Virtual Cubes
Part 5: Working with the Cube Editor
Part 4: Parent-Child Dimensions
Part 3: Handling Time Dimensions
Part 2: Working with Dimensions
Part 1: Creating Our First Cube


Go to page: Prev  1  2  3  

Tools:
Add databasejournal.com to your favorites
Add databasejournal.com to your browser search box
IE 7 | Firefox 2.0 | Firefox 1.5.x
Receive news via our XML/RSS feed

MS SQL Archives








Latest Forum Threads
MS SQL Forum
Topic By Replies Updated
Dropping database yogesphu 2 March 18th, 02:11 PM
shrinking a Database tkatende 1 March 18th, 12:19 PM
Inner and outer select mussab 3 March 17th, 11:05 AM
Help with Getting Started jozepeter 1 March 15th, 11:03 AM









The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers