Powerful NoSQL queries as familiar as SQL queries
We used to call it N1QL, but it’s really SQL++
N1QL is an original reference implementation of SQL++, an open source SQL-like JSON query language. 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.
SELECT name, ship_date FROM `orders` WHERE orderno = 1004;
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.
Just want to start?
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.
Learn SQL++ in 10 minutes

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.
N1QL: A practical guideFamiliar 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.
Learn moreRelated features and capabilities
Global Secondary Indexes (GSI)
Global Secondary Indexing (GSI) is a powerful solution that enables low latency queries for interactive applications. GSIs support collection-level processing and are attached to the document collections it has indexed.
Learn moreIndexing innovations
Couchbase also includes Composite indexes, Array indexes, and an advice function that tells the developer what the best index is for the SQL++ query being evaluated.
Learn moreMulti-Dimensional Scaling (MDS)
Scale out the service you need, when you need it. MDS guarantees the predictable performance of individual services deployed under Couchbase by delivering workload isolation of various microservices such as query, full-text search, analytics, and more.
Learn moreFull-text search (FTS)
Liberate your JSON data with language-aware text searching that enables users to quickly obtain the most relevant documents based on scoring. As part of the Couchbase data platform, FTS keeps search indexes up to date in real time as documents change.
Learn moreSolutions

Customer 360
Aggregate data collected from different sources in one platform to build a single view of your customer or business.

Catalog and Inventory
Publish new product and inventory content in real time and scale to millions of products and requests per second to present the right data at the right time.

Field Service
One platform to manage data from different sources, push it to the edge, and ensure it is stored securely and available online and offline.

IoT Data Management
Manage, support, and drive real-time data insights at the edge with embedded and cloud databases, sync, and guaranteed data availability.
"When Couchbase introduced me to N1QL, we quickly realized that N1QL offers the flexibility to search with a language that looks 99 percent the same as SQL. So for all developers, it was an easy transition."