SQL++: Couchbase Database Query Language

Get the familiarity of SQL with the flexibility of JSON

Powerful NoSQL queries as familiar as SQL queries

We used to call it N1QL, but it’s really SQL++

SQL++ is a SQL-based query language for JSON. Multiple Couchbase database services support SQL++ for executing industry-standard ANSI SQL syntax upon JSON structured data. There are many advantages to this approach including no learning curve for developers, familiar structure and common concepts like ACID transactions, hierarchical schema called “scopes,” joins across documents and collections, cost-based query optimization, and high-performance indexing alternatives. Couchbase SQL++ is supported by the Couchbase Query Service, Full-Text Search Service, and Analytics Service and can be embedded in applications via Couchbase SDKs. SQL++ is the easiest way for SQL developers to transition to NoSQL. In many cases, simple copy and paste of SQL queries will run as SQL++ queries. Take the tutorial to learn more.

×

Solve your toughest adoption and production challenges with an intuitive NoSQL query language, SQL++

High coding and migration cost

Most other JSON databases have limited SQL support, or none at all. To make matters worse, their languages are “imperative,” so the developer must specifically tell the database “how” to gather the data. This makes the migration of applications very expensive because you must rewrite the data access layer and retrain developers. It makes maintenance worse, too. SQL and SQL++, on the other hand, is a “declarative” language. Simply ask SQL++ what to gather, and the database does all the work.

Unpredictable performance

Application performance changes with volume, and when the database lacks a sophisticated query optimizer. The Couchbase Query Service includes cost-based optimization to ensure the best performance, and collection-level processing queries of indexing, sharding, and more. You will notice a speed difference as you scale.

Data complexity

When you use multiple databases, such as key-value for session caching and documents for product catalogs, you create unnecessary complexity that can lead to expensive trouble. Data can become inconsistent and overly duplicated. It’s a maintenance and cost nightmare to manage multiple databases for one application.

Innovate, iterate, and scale apps faster

Unparalleled technology, from cloud to the edge

SQL++: SQL-like queries with the flexibility of JSON

Develop engaging applications with ease using a comprehensive and declarative JSON query language. Developers can rapidly adapt to changing business requirements using a schemaless JSON document store.

Query without compromise, with capabilities you expect from SQL queries

SQL++ is a high-performance NoSQL query language with built-in optimizers and indexer enablers to support millions of concurrent interactions with sub-millisecond latencies. Couchbase’s multi-dimensional architecture leverages SQL++ across its query, index, search, and analytics services, partitioning to elastically scale data capacity and deliver accelerated query performance.

Familiar tooling makes query development and optimization a breeze

SQL++ is accessed through the Query Workbench, and has a built-in index advice feature that tells the developer what indexes are needed to optimize their query. Flex Index uses the inverted search index from the Full-Text Search Service for complicated query predicates. Couchbase also includes a cost-based optimizer and JavaScript-based user-defined functions to manipulate the resulting data.

“Developers simply write a declarative query language and the query engine decides the optimal path, and gives the answers they want.”

Keshav Murthy, Senior Director of Research and Development, Couchbase

Customer success spotlight