🤖 AI Summary
Existing SQL lacks native support for efficient, composable, and semantically closed multidimensional analysis in business intelligence (BI), hindering query reusability, maintainability, and expressive power.
Method: This paper introduces a SQL-native “measure column” mechanism that embeds context-sensitive expressions and dynamically scoped evaluation contexts directly into relational table structures. Leveraging syntactic extensions and compile-time expansion, it enables composability, expandability, and strict adherence to standard SQL semantics—every measure invocation compiles losslessly into equivalent standard SQL without runtime interpretation.
Contribution/Results: This is the first approach to support semantically closed multidimensional computation natively within standard SQL. It bridges the flexibility of multidimensional languages with the precision and engineering robustness of SQL, significantly enhancing BI query reuse, maintainability, and expressiveness while preserving full compatibility with existing SQL tooling and execution engines.
📝 Abstract
SQL has attained widespread adoption, but Business Intelligence tools still use their own higher level languages based upon a multidimensional paradigm. Composable calculations are what is missing from SQL, and we propose a new kind of column, called a measure, that attaches a calculation to a table. Like regular tables, tables with measures are composable and closed when used in queries. SQL-with-measures has the power, conciseness and reusability of multidimensional languages but retains SQL semantics. Measure invocations can be expanded in place to simple, clear SQL. To define the evaluation semantics for measures, we introduce context-sensitive expressions (a way to evaluate multidimensional expressions that is consistent with existing SQL semantics), a concept called evaluation context, and several operations for setting and modifying the evaluation context.