{"id":482,"date":"2015-10-06T23:34:10","date_gmt":"2015-10-06T23:34:09","guid":{"rendered":"https:\/\/www.couchbase.com\/blog\/declarative-query-for-json\/"},"modified":"2015-10-06T23:34:10","modified_gmt":"2015-10-06T23:34:09","slug":"declarative-query-for-json","status":"publish","type":"post","link":"https:\/\/www.couchbase.com\/blog\/declarative-query-for-json\/","title":{"rendered":"Couchbase 4.0: declarative query for JSON is here!"},"content":{"rendered":"\n<p>Before the relational model, databases worked like large linked lists; whether hierarchical or peer-to-peer, data retrieval was a matter of link-walking until the right record showed-up.<\/p>\n\n\n\n<p>SQL and the relational model changed that. With their advent it was possible to describe the data required and then have the DBMS do the work of finding it. Importantly, both the data model and the declarative nature of SQL meant that querying was open ended rather than something that\u00a0<strong>had<\/strong>\u00a0to be set in stone at design time.<\/p>\n\n\n\n<p>With the NoSQL movement,\u00a0database system creators\u00a0made deliberate design decisions that generally favoured scale, uptime and\u00a0redundancy at the expense of querability. For a while it looked as though there was a stark choice between querability and scalability.<\/p>\n\n\n\n<p><img decoding=\"async\" src=\"https:\/\/www.couchbase.com\/wp-content\/uploads\/sites\/5\/2026\/05\/why-not-both.jpg\"><\/p>\n\n\n\n<p>\u00a0<\/p>\n\n\n\n<p>Today&#8217;s release of\u00a0<a href=\"https:\/\/www.couchbase.com\/get-started-developing-nosql\/\">Couchbase 4.0<\/a>, with\u00a0<a href=\"https:\/\/n1ql.couchbase.com\">N1QL<\/a>,\u00a0means we get to have both. Not only do we continue to get the scale and speed of a clustered document databse with in-built caching, but for the first time we get a generally applicable declarative query language for those JSON documents.<\/p>\n\n\n\n<p>It&#8217;s true, there are other JSON query languages but they&#8217;ve either been limited to one particular database system or they&#8217;ve not been implemented in a production-ready database.<\/p>\n\n\n\n<p>The beauty of N1QL is that we all know it already: it&#8217;s\u00a0just SQL with some additions to handle semi-structured, nested\u00a0data. It is also backed by <a href=\"https:\/\/arxiv.org\/abs\/1405.3631\">academic research<\/a>\u00a0and already in production use. So, there&#8217;s very little new to learn and you retain the full ad-hoc querability of SQL, including JOINs!<\/p>\n\n\n\n<p><a href=\"https:\/\/www.couchbase.com\/get-started-developing-nosql\/\">Download Couchbase Server 4.0<\/a> and try it for yourself.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Before the relational model, databases worked like large linked lists; whether hierarchical or peer-to-peer, data retrieval was a matter of link-walking until the right record showed-up. SQL and the relational model changed that. With their advent it was possible to describe the data required and then have the DBMS do the work of finding it. [&hellip;]<\/p>\n","protected":false},"author":18,"featured_media":18,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[1],"tags":[],"ppma_author":[27],"class_list":["post-482","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.6 (Yoast SEO v27.6) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Couchbase 4.0: declarative query for JSON is here! - The Couchbase Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.couchbase.com\/blog\/declarative-query-for-json\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Couchbase 4.0: declarative query for JSON is here!\" \/>\n<meta property=\"og:description\" content=\"Before the relational model, databases worked like large linked lists; whether hierarchical or peer-to-peer, data retrieval was a matter of link-walking until the right record showed-up. SQL and the relational model changed that. With their advent it was possible to describe the data required and then have the DBMS do the work of finding it. [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.couchbase.com\/blog\/declarative-query-for-json\/\" \/>\n<meta property=\"og:site_name\" content=\"The Couchbase Blog\" \/>\n<meta property=\"article:published_time\" content=\"2015-10-06T23:34:09+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/05\/couchbase-nosql-dbaas.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1800\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Matthew Revell, Lead Developer Advocate, EMEA, Couchbase\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Matthew Revell, Lead Developer Advocate, EMEA, Couchbase\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/declarative-query-for-json\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/declarative-query-for-json\\\/\"},\"author\":{\"name\":\"Matthew Revell, Lead Developer Advocate, EMEA, Couchbase\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#\\\/schema\\\/person\\\/6c3060a94353df62a71d4672b3454555\"},\"headline\":\"Couchbase 4.0: declarative query for JSON is here!\",\"datePublished\":\"2015-10-06T23:34:09+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/declarative-query-for-json\\\/\"},\"wordCount\":274,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/declarative-query-for-json\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/5\\\/2026\\\/05\\\/couchbase-nosql-dbaas.png\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/declarative-query-for-json\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/declarative-query-for-json\\\/\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/declarative-query-for-json\\\/\",\"name\":\"Couchbase 4.0: declarative query for JSON is here! - The Couchbase Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/declarative-query-for-json\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/declarative-query-for-json\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/5\\\/2026\\\/05\\\/couchbase-nosql-dbaas.png\",\"datePublished\":\"2015-10-06T23:34:09+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/declarative-query-for-json\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/declarative-query-for-json\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/declarative-query-for-json\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/5\\\/2026\\\/05\\\/couchbase-nosql-dbaas.png\",\"contentUrl\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/5\\\/2026\\\/05\\\/couchbase-nosql-dbaas.png\",\"width\":1800,\"height\":630},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/declarative-query-for-json\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Couchbase 4.0: declarative query for JSON is here!\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/\",\"name\":\"The Couchbase Blog\",\"description\":\"Couchbase, the NoSQL Database\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#organization\",\"name\":\"The Couchbase Blog\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/5\\\/2026\\\/06\\\/logo.svg\",\"contentUrl\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/5\\\/2026\\\/06\\\/logo.svg\",\"width\":\"1024\",\"height\":\"1024\",\"caption\":\"The Couchbase Blog\"},\"image\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#\\\/schema\\\/person\\\/6c3060a94353df62a71d4672b3454555\",\"name\":\"Matthew Revell, Lead Developer Advocate, EMEA, Couchbase\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3b38ea45b78371f0008a765ea828bfed91aa97c25981ebf214226402a510b39b?s=96&d=mm&r=gb1bc555cd9166b46d6063003c3b92317\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3b38ea45b78371f0008a765ea828bfed91aa97c25981ebf214226402a510b39b?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3b38ea45b78371f0008a765ea828bfed91aa97c25981ebf214226402a510b39b?s=96&d=mm&r=g\",\"caption\":\"Matthew Revell, Lead Developer Advocate, EMEA, Couchbase\"},\"description\":\"Matthew Revell is a Lead Dev Advocate, EMEA Couchbase. He developed a global strategy for putting Couchbase front in the minds of the product's developers.\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/author\\\/matthew-revell\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Couchbase 4.0: declarative query for JSON is here! - The Couchbase Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.couchbase.com\/blog\/declarative-query-for-json\/","og_locale":"en_US","og_type":"article","og_title":"Couchbase 4.0: declarative query for JSON is here!","og_description":"Before the relational model, databases worked like large linked lists; whether hierarchical or peer-to-peer, data retrieval was a matter of link-walking until the right record showed-up. SQL and the relational model changed that. With their advent it was possible to describe the data required and then have the DBMS do the work of finding it. [&hellip;]","og_url":"https:\/\/www.couchbase.com\/blog\/declarative-query-for-json\/","og_site_name":"The Couchbase Blog","article_published_time":"2015-10-06T23:34:09+00:00","og_image":[{"width":1800,"height":630,"url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/05\/couchbase-nosql-dbaas.png","type":"image\/png"}],"author":"Matthew Revell, Lead Developer Advocate, EMEA, Couchbase","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Matthew Revell, Lead Developer Advocate, EMEA, Couchbase","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.couchbase.com\/blog\/declarative-query-for-json\/#article","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/declarative-query-for-json\/"},"author":{"name":"Matthew Revell, Lead Developer Advocate, EMEA, Couchbase","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/6c3060a94353df62a71d4672b3454555"},"headline":"Couchbase 4.0: declarative query for JSON is here!","datePublished":"2015-10-06T23:34:09+00:00","mainEntityOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/declarative-query-for-json\/"},"wordCount":274,"commentCount":0,"publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/declarative-query-for-json\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/05\/couchbase-nosql-dbaas.png","inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.couchbase.com\/blog\/declarative-query-for-json\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.couchbase.com\/blog\/declarative-query-for-json\/","url":"https:\/\/www.couchbase.com\/blog\/declarative-query-for-json\/","name":"Couchbase 4.0: declarative query for JSON is here! - The Couchbase Blog","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/declarative-query-for-json\/#primaryimage"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/declarative-query-for-json\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/05\/couchbase-nosql-dbaas.png","datePublished":"2015-10-06T23:34:09+00:00","breadcrumb":{"@id":"https:\/\/www.couchbase.com\/blog\/declarative-query-for-json\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.couchbase.com\/blog\/declarative-query-for-json\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/declarative-query-for-json\/#primaryimage","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/05\/couchbase-nosql-dbaas.png","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/05\/couchbase-nosql-dbaas.png","width":1800,"height":630},{"@type":"BreadcrumbList","@id":"https:\/\/www.couchbase.com\/blog\/declarative-query-for-json\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.couchbase.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Couchbase 4.0: declarative query for JSON is here!"}]},{"@type":"WebSite","@id":"https:\/\/www.couchbase.com\/blog\/#website","url":"https:\/\/www.couchbase.com\/blog\/","name":"The Couchbase Blog","description":"Couchbase, the NoSQL Database","publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.couchbase.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.couchbase.com\/blog\/#organization","name":"The Couchbase Blog","url":"https:\/\/www.couchbase.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/06\/logo.svg","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/06\/logo.svg","width":"1024","height":"1024","caption":"The Couchbase Blog"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/6c3060a94353df62a71d4672b3454555","name":"Matthew Revell, Lead Developer Advocate, EMEA, Couchbase","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/3b38ea45b78371f0008a765ea828bfed91aa97c25981ebf214226402a510b39b?s=96&d=mm&r=gb1bc555cd9166b46d6063003c3b92317","url":"https:\/\/secure.gravatar.com\/avatar\/3b38ea45b78371f0008a765ea828bfed91aa97c25981ebf214226402a510b39b?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/3b38ea45b78371f0008a765ea828bfed91aa97c25981ebf214226402a510b39b?s=96&d=mm&r=g","caption":"Matthew Revell, Lead Developer Advocate, EMEA, Couchbase"},"description":"Matthew Revell is a Lead Dev Advocate, EMEA Couchbase. He developed a global strategy for putting Couchbase front in the minds of the product's developers.","url":"https:\/\/www.couchbase.com\/blog\/author\/matthew-revell\/"}]}},"acf":[],"authors":[{"term_id":27,"user_id":18,"is_guest":0,"slug":"matthew-revell","display_name":"Matthew Revell, Lead Developer Advocate, EMEA, Couchbase","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g","0":null,"1":"","2":"","3":"","4":"","5":"","6":"","7":"","8":""}],"_links":{"self":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/482","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/users\/18"}],"replies":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/comments?post=482"}],"version-history":[{"count":0,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/482\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/media\/18"}],"wp:attachment":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/media?parent=482"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/categories?post=482"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/tags?post=482"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=482"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}