Skip to main content
QUICK REVIEW

[论文解读] The SQL++ Semi-structured Data Model and Query Language: A Capabilities Survey of SQL-on-Hadoop, NoSQL and NewSQL Databases.

Kian Win Ong, Yannis Papakonstantinou|arXiv (Cornell University)|May 14, 2014
Advanced Database Systems and Queries被引用 53
一句话总结

本文提出 SQL++,一种统一的、与 SQL 兼容的查询语言,用于半结构化数据,通过最小的语法变更扩展 SQL 以支持 JSON 和 NoSQL 风格的查询。它通过可配置选项的形式化定义语义,使 SQL++ 能够对现有系统(如 MongoDB、Cassandra、Couchbase 和 AsterixDB)的查询进行建模与执行,并实现形式等价性。

ABSTRACT

NoSQL databases support semi-structured data, typically modeled as JSON. They also provide limited (but expanding) query languages. Their idiomatic, non-SQL language constructs, the many variations, and the lack of formal semantics inhibit deep understanding of the query languages, and also impede progress towards clean, powerful, declarative query languages. This paper specifies the syntax and semantics of SQL++, which is applicable to both JSON native stores and SQL databases. The SQL++ semi-structured data model is a superset of both JSON and the SQL data model. SQL++ offers powerful computational capabilities for processing semi-structured data akin to prior non-relational query languages, notably OQL and XQuery. Yet, SQL++ is SQL backwards compatible and is generalized towards JSON by introducing only a small number of query language extensions to SQL. Recognizing that a query language standard is probably premature for the fast evolving area of NoSQL databases, SQL++ includes configuration options that formally itemize the semantics variations that language designers may choose from. The options often pertain to the treatment of semi-structuredness (missing attributes, heterogeneous types, etc), where more than one sensible approaches are possible. SQL++ is unifying: By appropriate choices of configuration options, the SQL++ semantics can morph into the semantics of existing semi-structured database query languages. The extensive experimental validation shows how SQL and four semi-structured database query languages (MongoDB, Cassandra CQL, Couchbase N1QL and AsterixDB AQL) are formally described by appropriate settings of the configuration options. Early adoption signs of SQL++ are positive: Version 4 of Couchbase's N1QL is explained as syntactic sugar over SQL++. AsterixDB will soon support the full SQL++ and Apache Drill is in the process of aligning with SQL++.

研究动机与目标

  • 为解决 NoSQL 查询语言中缺乏标准化和形式化语义的问题,这些问题阻碍了互操作性与深层次的语言理解。
  • 设计一种原生支持半结构化数据且与 SQL 完全向后兼容的查询语言。
  • 通过配置选项提供一个形式化框架,将现有半结构化查询语言(例如 N1QL、AQL)映射到共同的语义基础。
  • 将 NoSQL 系统中多样的惯用查询构造统一为一种单一的、声明式的、形式化指定的语言。
  • 通过展示与 Couchbase、AsterixDB 和 Apache Drill 等现有系统的兼容性,推动实际应用。

提出的方法

  • 将 SQL++ 定义为 SQL 和 JSON 数据模型的超集,实现对结构化与半结构化数据的无缝处理。
  • 引入少量语言扩展以支持嵌套数据、动态类型和基于路径的属性访问。
  • 使用配置选项形式化语言语义,以捕获设计选择,例如缺失属性的处理方式和异构类型的支持。
  • 通过配置设置将 SQL++ 语义转换为现有查询语言的语义,实现与 MongoDB、Cassandra CQL、Couchbase N1QL 和 AsterixDB AQL 等系统的正式等价性。
  • 通过大量实验性映射,将现有查询语言转换为 SQL++ 配置,验证该方法的有效性。
  • 通过展示 Couchbase N1QL v4 实际上是 SQL++ 的语法糖,以及 Apache Drill 正在与 SQL++ 对齐,证明其在现实世界中的应用。

实验结果

研究问题

  • RQ1如何通过单一查询语言统一现有 NoSQL 和 NewSQL 查询语言在半结构化数据上的多样化惯用法与语义?
  • RQ2对 SQL 的最小扩展量是多少,才能支持对类似 JSON 的半结构化数据进行强大且声明式的查询?
  • RQ3形式化配置系统是否能够捕获现有半结构化查询语言之间的关键语义差异?
  • RQ4SQL++ 在多大程度上能够正式建模并与其他系统(如 MongoDB、Cassandra、Couchbase 和 AsterixDB)互操作?
  • RQ5有哪些证据支持 SQL++ 在真实世界数据库系统中的实际可行性与采用潜力?

主要发现

  • SQL++ 通过极小的语法变更成功扩展了 SQL,以支持半结构化数据,同时保持了完整的 SQL 兼容性。
  • 基于配置的方法使 SQL++ 能够正式建模四种主要半结构化查询语言的语义:MongoDB、Cassandra CQL、Couchbase N1QL 和 AsterixDB AQL。
  • Couchbase N1QL 版本 4 在语法糖下与 SQL++ 形式等价,证实了其实际对齐性。
  • Apache Drill 正在积极与 SQL++ 对齐,表明行业兴趣日益增长,具备广阔的应用潜力。
  • 形式化配置系统捕获了关键语义差异,如缺失属性的处理方式和异构类型的支持,从而实现精确的语言映射。
  • SQL++ 提供了一个统一基础,既支持 OQL 和 XQuery 的计算能力,又具备 SQL 的声明式简洁性。

更好的研究,从现在开始

从论文设计到论文写作,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。