Skip to main content
QUICK REVIEW

[Paper 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 QueriesComputer Science53 citations
TL;DR

This paper introduces SQL++, a unified, SQL-compatible query language for semi-structured data that extends SQL with minimal syntax changes to support JSON and NoSQL-style queries. It formalizes semantics through configurable options, enabling SQL++ to model and execute queries from existing systems like MongoDB, Cassandra, Couchbase, and AsterixDB with formal equivalence.

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++.

Motivation & Objective

  • To address the lack of standardization and formal semantics in NoSQL query languages, which hinders interoperability and deep language understanding.
  • To design a query language that supports semi-structured data natively while remaining fully backward compatible with SQL.
  • To provide a formal framework for mapping existing semi-structured query languages (e.g., N1QL, AQL) to a common semantic foundation via configuration options.
  • To unify diverse idiomatic query constructs across NoSQL systems into a single, declarative, and formally specified language.
  • To enable practical adoption by demonstrating compatibility with existing systems like Couchbase, AsterixDB, and Apache Drill.

Proposed method

  • Define SQL++ as a superset of both the SQL and JSON data models, enabling seamless handling of structured and semi-structured data.
  • Introduce a small set of language extensions to SQL to support nested data, dynamic typing, and path-based access to attributes.
  • Formalize language semantics using configuration options that capture design choices such as handling missing attributes and heterogeneous types.
  • Use configuration settings to morph SQL++ semantics into those of existing query languages, enabling formal equivalence with systems like MongoDB, Cassandra CQL, Couchbase N1QL, and AsterixDB AQL.
  • Validate the approach through extensive experimental mapping of existing query languages to SQL++ configurations.
  • Demonstrate real-world adoption by showing that Couchbase N1QL v4 is syntactic sugar over SQL++, and Apache Drill is aligning with SQL++.

Experimental results

Research questions

  • RQ1How can a single query language unify the diverse idioms and semantics of existing NoSQL and NewSQL query languages for semi-structured data?
  • RQ2What minimal extensions to SQL are sufficient to support powerful, declarative querying of JSON-like semi-structured data?
  • RQ3Can a formal configuration system capture the essential semantic variations across existing semi-structured query languages?
  • RQ4To what extent can SQL++ formally model and interoperate with existing systems like MongoDB, Cassandra, Couchbase, and AsterixDB?
  • RQ5What evidence supports the practical viability and adoption potential of SQL++ in real-world database systems?

Key findings

  • SQL++ successfully extends SQL with minimal syntax changes to support semi-structured data while preserving full SQL compatibility.
  • The configuration-based approach enables SQL++ to formally model the semantics of four major semi-structured query languages: MongoDB, Cassandra CQL, Couchbase N1QL, and AsterixDB AQL.
  • Couchbase N1QL version 4 is formally equivalent to SQL++ under syntactic sugar, confirming practical alignment.
  • Apache Drill is actively aligning with SQL++, indicating growing industry interest and adoption potential.
  • The formal configuration system captures key semantic variations such as handling of missing attributes and heterogeneous types, enabling precise language mapping.
  • SQL++ provides a unifying foundation that supports both the computational power of OQL and XQuery and the declarative simplicity of SQL.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.