EducationSoftwareStrategy.com
StrategyCommunity

Knowledge Base

Product

Community

Knowledge Base

TopicsBrowse ArticlesDeveloper Zone

Product

Download SoftwareProduct DocumentationSecurity Hub

Education

Tutorial VideosSolution GalleryEducation courses

Community

GuidelinesGrandmastersEvents
x_social-icon_white.svglinkedin_social-icon_white.svg
Strategy logoCommunity

© Strategy Inc. All Rights Reserved.

LegalTerms of UsePrivacy Policy
  1. Home
  2. Topics

KB19585: Is Theta Join supported by MicroStrategy?


Community Admin

• Strategy


This article describes how theta joins are not supported in MicroStrategy

BACKGROUND:
 
Theta joins are not supported by Strategy. Slowly Changing Dimensions (SCD) or report filters should be used in order to address the need for Theta joins.
The only joins supported by Strategy use the = operator. When talking about Theta joins the following operators are used < , ≤ , > , ≥ , ≠. Theta join is an expression used in Relational Algebra and SQL language and is based on the theory of Relational Algebra. When an = operator is used in Relational Algebra the term Equijoin is used.
 
THETA JOIN (θ-join):
 
The Theta join operation defines a relation that contains rows satisfying the predicate F from the Cartesian product of R and S. The predicate F is of the form R.aj θ S.bj where θ may be one of the comparison operators < , ≤ , > , ≥ , ≠.
 

ka04W000000OhlNQAS_0EM440000002ElG.jpeg

Theta join can be rewritten in terms of basic Selection and Cartesian product operations in Relational Algebra:
 

ka04W000000OhlNQAS_0EM440000002ElE.jpeg

As with Cartesian product the degree of a Theta join is the sum of the degrees of the operand relations R and S.
 
THETA JOIN AND SCD:
 
Theta Joins might be desired because the need with a change in the underlying dimensional model. The need for a change in the dimensional model might be unexpected and it might occur after a period of time the model has been in use. This is not because the original data model was designed incorrectly, but because the data model has been changing slowly over time.
To proactively tackle the issue with changing Dimensions, the Data Modeller should determine the appropriate change handling strategy in co-operation with the Business Users. Within Strategy the method is to use SCD. SCD is not only Strategy terminology; it is widely in use in Business Intelligence world.
 
EXAMPLE:
 
An employee is assigned for a certain department. In this example the Employee data is saved to a denormalized lookup table.
 


Employee KeyEmployee NameDepartmentNational Insurance Number1234JohnTech SupportABCD 1234Employee KeyEmployee NameDepartmentNational Insurance Number1234JohnInformation SystemsABCD 1234


Employee KeyEmployee NameDepartmentNational Insurance Number1234JohnTech SupportABCD 1234Employee KeyEmployee NameDepartmentNational Insurance Number1234JohnInformation SystemsABCD 1234


Employee KeyEmployee NameDepartmentNational Insurance Number1234JohnTech SupportABCD 1234Employee KeyEmployee NameDepartmentNational Insurance Number1234JohnInformation SystemsABCD 1234


Employee KeyEmployee NameDepartmentNational Insurance Number1234JohnTech SupportABCD 1234Employee KeyEmployee NameDepartmentNational Insurance Number1234JohnInformation SystemsABCD 1234


Employee KeyEmployee NameDepartmentNational Insurance Number1234JohnTech SupportABCD 1234Employee KeyEmployee NameDepartmentNational Insurance Number1234JohnInformation SystemsABCD 1234


Employee KeyEmployee NameDepartmentNational Insurance Number1234JohnTech SupportABCD 1234Employee KeyEmployee NameDepartmentNational Insurance Number1234JohnInformation SystemsABCD 1234


Employee KeyEmployee NameDepartmentNational Insurance Number1234JohnTech SupportABCD 1234Employee KeyEmployee NameDepartmentNational Insurance Number1234JohnInformation SystemsABCD 1234


Employee KeyEmployee NameDepartmentNational Insurance Number1234JohnTech SupportABCD 1234Employee KeyEmployee NameDepartmentNational Insurance Number1234JohnInformation SystemsABCD 1234

Before 2008, this employee was a part of Tech Support department, but starting from 2009 the employee is a part of IS department.
 


Employee KeyEmployee NameDepartmentNational Insurance Number1234JohnTech SupportABCD 1234Employee KeyEmployee NameDepartmentNational Insurance Number1234JohnInformation SystemsABCD 1234


Employee KeyEmployee NameDepartmentNational Insurance Number1234JohnTech SupportABCD 1234Employee KeyEmployee NameDepartmentNational Insurance Number1234JohnInformation SystemsABCD 1234


Employee KeyEmployee NameDepartmentNational Insurance Number1234JohnTech SupportABCD 1234Employee KeyEmployee NameDepartmentNational Insurance Number1234JohnInformation SystemsABCD 1234


Employee KeyEmployee NameDepartmentNational Insurance Number1234JohnTech SupportABCD 1234Employee KeyEmployee NameDepartmentNational Insurance Number1234JohnInformation SystemsABCD 1234


Employee KeyEmployee NameDepartmentNational Insurance Number1234JohnTech SupportABCD 1234Employee KeyEmployee NameDepartmentNational Insurance Number1234JohnInformation SystemsABCD 1234


Employee KeyEmployee NameDepartmentNational Insurance Number1234JohnTech SupportABCD 1234Employee KeyEmployee NameDepartmentNational Insurance Number1234JohnInformation SystemsABCD 1234


Employee KeyEmployee NameDepartmentNational Insurance Number1234JohnTech SupportABCD 1234Employee KeyEmployee NameDepartmentNational Insurance Number1234JohnInformation SystemsABCD 1234


Employee KeyEmployee NameDepartmentNational Insurance Number1234JohnTech SupportABCD 1234Employee KeyEmployee NameDepartmentNational Insurance Number1234JohnInformation SystemsABCD 1234

Imagine that the Department row would be just simply overwritten with new department information to the lookup table. Now when the expenses are calculated for Information Systems department there is no method to see what has caused the sudden increase in expenses between the years 2008 and 2009. SCD are providing the means of tackling the issue with information that is changing over time in Strategy dimensional data model. KB11286 discusses about how to implement SCD in Strategy.
 
ACTION 1:
 
Slowly Changing Dimensions should be used instead of Theta join concept within Strategy dimensional data model. Consult the following document for more information about SCD KB11286.
 
ACTION 2:
 
In some circumstances theta join might be needed when implementing Slowly Changing Dimensions. In most of the cases this need can be addressed by using report filters instead.
 
ADDITIONAL NOTES:
 
For more information about how to implement Slowly Changing Dimensions, refer to the following Strategy Knowledge Base technical note:
 
KB11286  - How to implement slowly-changing dimensions using logical views in Strategy
 
Literature references:
 

  • (Slowly Changing Dimensions) - "The Data Warehouse Toolkit" by Ralph Kimball and Margy Ross, Second Edition 2002
  • (Theta Join) - "Database Systems" by Thomas Connolly and Carolyn Begg, Fourth Edition 2005

Comment

0 comments

Details

Knowledge Article

Published:

April 14, 2017

Last Updated:

April 14, 2017