SQL中的度量
Measures in SQL
AI总结:
本文针对SQL缺乏可组合多维计算的问题,提出“度量”列及求值上下文机制,使SQL在保留原有语义的同时获得多维语言的简洁性与复用性。
摘要:
SQL已获得广泛采用,但商业智能工具仍使用基于多维范式的自有高级语言。可组合计算正是SQL所缺失的能力,因此我们提出一种新型列,称为“度量”(measure),它将计算附加到表上。与普通表类似,带度量的表具有可组合性,并在查询中使用时保持封闭性。带度量的SQL兼具多维语言的表达能力、简洁性和可重用性,同时保留SQL语义。度量调用可就地展开为简单、清晰的SQL。为定义度量的求值语义,我们引入了上下文相关表达式(一种与现有SQL语义一致的多维表达式求值方式)、一个称为求值上下文的概念,以及若干用于设置和修改求值上下文的操作。
英文摘要:
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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。