N1QL for Analytics demo

"(SQL++) can handle additional kinds of data, with additional expressive power."
Learn more about N1QL for Analytics

Don Chamberlin
Co-Inventor of SQL

Querying complex JSON data made easy

JSON data access

JSON data is ubiquitous: information exchange, object representation, API responses, and microservices all use JSON. Modern NoSQL databases, like Couchbase, also support JSON as a flexible data model.

agile sync seamless data sharing
Scalable, always-on mobile experience

Extension of SQL standard

SQL++ allows you to shorten development cycles by using existing SQL database skills to easily query and manage JSON data. Your knowledge of SQL is transferrable and easily applied to JSON querying with the familiar syntax used by SQL++.

Flexible schema support

Relational models use SQL query standards but JSON databases have more flexible schemas and require additional query syntax to access more advanced data structures. Future-proof application development by using an open standard.
 

Secure, manage, and develop with ease

SQL++ query examples

 

Couchbase is leading the way in the early adoption of the SQL++ specification, using it to unlock analytical JSON data interaction in Couchbase Server. By using SQL++ as a standardized base for querying, users benefit by easily transferring their skills from traditional relational databases into the NoSQL domain. Lowering the barrier to querying NoSQL databases is essential to empowering enterprises to extract value from their JSON data holdings. N1QL for Analytics is the Couchbase query language built on SQL++.

                                                      SELECT  c.custid,
            c.name,
            c.orderno,
            o.order_date,
            o.ship_date,
    FROM orders o 
    JOIN customers c ON o.custid = c.custid
    WHERE o.orderno = 1004;
									        
                                                      [
      {
       "custid": "C35",
       "name": "J. Roberts",
       "orderno": 1004,
       "order_date": "2017-07-10",
       "ship_date": "2017-07-15"
      }
    ]
									        
                                                      [
        {
         "orderno": 1004,
         "custid": "C35",
         "order_date": "2017-07-10",
         "ship_date": "2017-07-15",
         "items": [ { "itemno": 680, "qty": 6, "price": 9.99 },
                    { "itemno": 195, "qty": 4, "price": 35.00} 
                  ]
        }
    ]
									        
                                                      [
      { 
        "custid": "C31",
         "name": "B. Pitt",
         "address":
           { "street": "360 Mountain Ave.", "city": "St. Louis, MO", "zipcode": "63101" } 
      }, 
      {
         "custid": "C35",
         "name": "J. Roberts",
         "address":
           { "street": "420 Green St.", "city": "Boston, MA", "zipcode": "02115" },
         "rating": 565
      }
    ]