{"id":8478,"date":"2020-04-25T12:51:59","date_gmt":"2020-04-25T19:51:59","guid":{"rendered":"https:\/\/www.couchbase.com\/blog\/?p=8478"},"modified":"2025-06-13T23:42:43","modified_gmt":"2025-06-14T06:42:43","slug":"introduction-to-couchbase-for-mongodb-developers-and-experts","status":"publish","type":"post","link":"https:\/\/www.couchbase.com\/blog\/introduction-to-couchbase-for-mongodb-developers-and-experts\/","title":{"rendered":"Couchbase Intro for MongoDB Developers and NoSQL Experts"},"content":{"rendered":"<blockquote>\n<h4>Six thousand years ago, the Sumerians invented writing for transaction processing &#8212; <a href=\"https:\/\/www.amazon.com\/Transaction-Processing-Concepts-Techniques-Management\/dp\/1558601902\">Gray &amp; Reuter<\/a><\/h4>\n<\/blockquote>\n<p><span style=\"font-weight: 400\">By any measure, MongoDB is a popular document-oriented JSON database. In the last dozen years, it has grown from its humble beginnings of a single lock per database to a modern multi-document transaction with snapshot isolation.\u00a0 MongoDB University has trained a large number of developers to develop on the MongoDB database.<\/span><\/p>\n<p>There are many JSON databases now. <span style=\"font-weight: 400\">While it\u2019s easy to start with MongoDB to learn NoSQL and flexible JSON schema, many customers choose Couchbase for performance, scale, and SQL. <\/span><span style=\"font-weight: 400\">As you progress in your database evaluation and evolution, you should learn about other JSON databases. We\u2019re working on an online training course for MongoDB experts to learn Couchbase easily.\u00a0 Until we publish that, you\u2019ll have to read this article. :-)\u00a0 <\/span><\/p>\n<p><span style=\"font-weight: 400\">If you know RDBMS like Microsoft SQL Server and Oracle, we have easy to follow courses to learn do the mapping of your database knowledge to Couchbase with these two courses:<\/span><\/p>\n<ol>\n<li style=\"font-weight: 400\"><a href=\"https:\/\/learn.couchbase.com\/store\/404716-cb116m-intro-to-couchbase-for-mssql-experts\"><span style=\"font-weight: 400\">CB116m &#8211; Intro to Couchbase for MSSQL Experts<\/span><\/a><\/li>\n<li style=\"font-weight: 400\"><a href=\"https:\/\/learn.couchbase.com\/store\/400375-cb116o-introduction-to-couchbase-for-oracle-experts\"><span style=\"font-weight: 400\">CB116o &#8211; Introduction to Couchbase for Oracle Experts<\/span><\/a><\/li>\n<\/ol>\n<p><strong>SUMMARY<\/strong><\/p>\n<p>MongoDB and Couchbase have many things in common. Both are NoSQL <a href=\"https:\/\/www.couchbase.com\/blog\/distributed-databases-overview\/\">distributed databases<\/a>; Both use JSON model; Both have high-level query languages with support for select-join-project operations; Both have secondary indexes; both have an optimizer that chooses the query plan automatically. Both support intra- and inter-cluster replication.<\/p>\n<p>As you&#8217;d expect, there are differences.\u00a0 Some are more significant than others.\u00a0 Couchbase is designed to be distributed from the get-go.\u00a0 For example, the data container Bucket is always distributed &#8212; with nothing to shard.\u00a0 Simply add new nodes and the system will automatically distribute. Intra cluster replication requires no new servers &#8212; simply set the number of replicas and you&#8217;re all set. From the developer interaction perspective, the big difference is the query language itself &#8212; MongoDB has a <a href=\"https:\/\/docs.mongodb.com\/manual\/tutorial\/query-documents\/\">proprietary query language<\/a> and Couchbase has <a href=\"https:\/\/docs.couchbase.com\/server\/6.5\/n1ql\/n1ql-language-reference\/selectintro.html\">N1QL &#8211; SQL for JSON<\/a>. MongoDB uses its B-Tree based index for search as well and recently released <a href=\"https:\/\/docs.atlas.mongodb.com\/reference\/atlas-search\/query-syntax\/\">$searchbeta<\/a> for the Atlas service using Apache Lucene; Couchbase has a built-in <a href=\"https:\/\/docs.couchbase.com\/server\/current\/fts\/fts-supported-queries.html\">Full-Text Search<\/a>.<\/p>\n<p>Hopefully, the differences in Couchbase are the ones that make your life easier.\u00a0 Let&#8217;s deep dive.<\/p>\n<p><span style=\"color: #0000ff\"><b>HIGH-LEVEL TOPICS<\/b><\/span><\/p>\n<ol>\n<li>Resources<\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Architecture<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Database Objects<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Data Types<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Data Model<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">SDK<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Query Language<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Indexes<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Optimizer<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Transactions<\/span><\/li>\n<li>Analytics<\/li>\n<\/ol>\n<h4 role=\"presentation\"><span style=\"color: #0000ff\"><strong>RESOURCES<\/strong><\/span><\/h4>\n<div dir=\"ltr\" align=\"left\">\n<table>\n<tbody>\n<tr>\n<td><\/td>\n<td>\n<h4><strong>MongoDB<\/strong><\/h4>\n<\/td>\n<td>\n<h4><strong>Couchbase<\/strong><\/h4>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p dir=\"ltr\">Docs<\/p>\n<\/td>\n<td>\n<p dir=\"ltr\"><a href=\"https:\/\/docs.mongodb.com\/\">https:\/\/docs.mongodb.com\/<\/a><\/p>\n<\/td>\n<td>\n<p dir=\"ltr\"><a href=\"https:\/\/docs.couchbase.com\/home\/index.html\">https:\/\/docs.couchbase.com\/home\/index.html<\/a><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p dir=\"ltr\">Forums<\/p>\n<\/td>\n<td>\n<p dir=\"ltr\"><a href=\"https:\/\/developer.mongodb.com\/community\/forums\/\">https:\/\/developer.mongodb.com\/community\/forums\/<\/a><\/p>\n<\/td>\n<td>\n<p dir=\"ltr\"><a href=\"https:\/\/www.couchbase.com\/forums\/\">https:\/\/www.couchbase.com\/forums\/<\/a><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p dir=\"ltr\">Latest Version <span style=\"font-family: inherit;font-size: inherit\">(April 2020)<\/span><\/p>\n<\/td>\n<td>\n<p dir=\"ltr\">4.2.6<\/p>\n<\/td>\n<td>\n<p dir=\"ltr\">6.5.1<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p dir=\"ltr\">License<\/p>\n<\/td>\n<td>\n<p dir=\"ltr\"><a href=\"https:\/\/www.mongodb.com\/licensing\/server-side-public-license\/faq\">https:\/\/www.mongodb.com\/licensing\/server-side-public-license\/faq<\/a><\/p>\n<\/td>\n<td>\n<p dir=\"ltr\"><a href=\"https:\/\/www.couchbase.com\/licensing-and-support-faq\/\">https:\/\/www.couchbase.com\/licensing-and-support-faq<\/a><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p dir=\"ltr\">Query Language<\/p>\n<\/td>\n<td>\n<p dir=\"ltr\"><a href=\"https:\/\/docs.mongodb.com\/manual\/tutorial\/query-documents\/\">MongoDB query language<\/a><\/p>\n<\/td>\n<td>\n<p dir=\"ltr\"><a href=\"https:\/\/www.couchbase.com\/products\/n1ql\/\">N1QL &#8211; SQL for JSON<\/a><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h4 role=\"presentation\"><span style=\"color: #0000ff\"><strong>ARCHITECTURE<\/strong><\/span><\/h4>\n<p dir=\"ltr\"><strong>Laptop Version:\u00a0<\/strong><\/p>\n<p><a href=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2020\/04\/Screen-Shot-2020-04-22-at-7.17.08-PM.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-8487 alignleft\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2020\/04\/Screen-Shot-2020-04-22-at-7.17.08-PM.png\" alt=\"\" width=\"208\" height=\"300\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/04\/Screen-Shot-2020-04-22-at-7.17.08-PM.png 208w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/04\/Screen-Shot-2020-04-22-at-7.17.08-PM-14x20.png 14w\" sizes=\"auto, (max-width: 208px) 100vw, 208px\" \/><\/a><\/p>\n<p><strong>MongoDB:<\/strong> \u00a0Simply install and use the Mongodb on your laptop with the right parameters; you\u2019re up and running.\u00a0 Single process to deal with the whole database.\u00a0 This has changed a little bit in 4.2 where you\u2019d need mongos to run your transactions. All of the MongoDB features (data, indexing, query) are available here &#8212; except full text search available only on the Atlas service.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><b><a href=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2020\/04\/Screen-Shot-2020-04-22-at-7.21.51-PM.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-8486 alignleft\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2020\/04\/Screen-Shot-2020-04-22-at-7.21.51-PM-215x300.png\" alt=\"\" width=\"215\" height=\"300\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/04\/Screen-Shot-2020-04-22-at-7.21.51-PM-215x300.png 215w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/04\/Screen-Shot-2020-04-22-at-7.21.51-PM.png 216w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/04\/Screen-Shot-2020-04-22-at-7.21.51-PM-14x20.png 14w\" sizes=\"auto, (max-width: 215px) 100vw, 215px\" \/><\/a>Couchbase: <\/b><span style=\"font-weight: 400\">Couchbase is different.\u00a0 It has abstracted each of the services (data, index, query, search, analytics, eventing) and you have the option to choose which of the features you\u2019d want to run on your instance to optimize the resources. A typical installation has data, index, and query.\u00a0 Search, eventing, and analytics will run on your laptop &#8212; install and use them per your use case.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><b>Cluster deployment: <\/b><span style=\"font-weight: 400\">As with most NoSQL databases, both MongoDB and Couchbase can scale out. In MongoDB, you can scale by <\/span><a href=\"https:\/\/docs.mongodb.com\/manual\/sharding\/\"><span style=\"font-weight: 400\">sharding<\/span><\/a><span style=\"font-weight: 400\"> the collection into multiple nodes. You can shard by hash or range.\u00a0 Without an explicit shard, each collection remains in a single shard.\u00a0 The config servers store the metadata and configuration for the cluster. MongoDB is uniformly distributed and Couchbase is multi-dimensionally distributed.\u00a0 Mongodb process (service) manages data, index and query on every shard (node) whereas Mongos does the distributed query processing and merging from intermediate results and does not manage any data or index.\u00a0 Mongos acts as the coordinator and mongodb is the worker bee.\u00a0<\/span><\/p>\n<p><a href=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2020\/04\/Screen-Shot-2020-04-23-at-7.32.09-AM.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-8482\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2020\/04\/Screen-Shot-2020-04-23-at-7.32.09-AM-300x162.png\" alt=\"\" width=\"684\" height=\"370\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/04\/Screen-Shot-2020-04-23-at-7.32.09-AM-300x162.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/04\/Screen-Shot-2020-04-23-at-7.32.09-AM-1024x552.png 1024w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/04\/Screen-Shot-2020-04-23-at-7.32.09-AM-768x414.png 768w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/04\/Screen-Shot-2020-04-23-at-7.32.09-AM-20x11.png 20w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/04\/Screen-Shot-2020-04-23-at-7.32.09-AM.png 1146w\" sizes=\"auto, (max-width: 684px) 100vw, 684px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400\">Couchbase can be deployed in a uniform distribution with each node managing the data and all services &#8211; data, index, query, analytics, and eventing.\u00a0 Each service is a layer in the traditional database. These services are loosely coupled &#8212; they run in different process spaces and communicate via a network.\u00a0 Hence they can be deployed uniformly in a single node or distributed multi-dimensionally on a cluster. The choice depends on your workload and SLAs. The data itself is stored in buckets. All the buckets are hash partitioned among given nodes &#8212; this is automatic and doesn\u2019t require any specification. When the application has the document keys, it can directly operate on the data without any intervening nodes.\u00a0 This is one of the key architectural differences contributing to the high performance and scale-out of Couchbase. \u00a0 In addition, there are no config servers. The metadata and its management is built into the core database. \u00a0 The data service manages data, cluster and replication within a Couchbase cluster. Replication between multiple Couchbase clusters is managed by XDCR.\u00a0 Read this article to understand the replication mechanisms in MongoDB and Couchbase:\u00a0 <a href=\"https:\/\/www.couchbase.com\/blog\/replication-in-nosql-document-databases-mongo-db-vs-couchbase\/\">Replication in NoSQL document databases (Mongo DB vs Couchbase)<\/a><\/span><\/p>\n<p><a href=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2020\/04\/Screen-Shot-2020-04-22-at-7.32.03-PM.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-8483\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2020\/04\/Screen-Shot-2020-04-22-at-7.32.03-PM-300x115.png\" alt=\"\" width=\"716\" height=\"274\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/04\/Screen-Shot-2020-04-22-at-7.32.03-PM-300x115.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/04\/Screen-Shot-2020-04-22-at-7.32.03-PM-768x295.png 768w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/04\/Screen-Shot-2020-04-22-at-7.32.03-PM-20x8.png 20w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/04\/Screen-Shot-2020-04-22-at-7.32.03-PM.png 1020w\" sizes=\"auto, (max-width: 716px) 100vw, 716px\" \/><\/a><\/p>\n<p><b>Inside the cluster deployment.<\/b><\/p>\n<p><span style=\"font-weight: 400\">MongoDB\u2019s cluster components and deployment are explained <\/span><a href=\"https:\/\/docs.mongodb.com\/manual\/core\/sharded-cluster-components\/\"><span style=\"font-weight: 400\">here<\/span><\/a><span style=\"font-weight: 400\"> and I assume that as prior knowledge.\u00a0 I\u2019ll avoid repeating.<\/span><a href=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2020\/04\/Screen-Shot-2020-04-23-at-7.32.09-AM.png\"><br \/>\n<\/a><\/p>\n<p><span style=\"font-weight: 400\">Couchbase deployment starts with the key-value data service.\u00a0 This is the (consistent) hash distributed key-value data store. This also has intracluster replication built-in eliminating any need for separate replica servers or config servers.\u00a0 The query service orchestrates the execution of <\/span><a href=\"https:\/\/query-tutorial.couchbase.com\/tutorial\/#1\"><span style=\"font-weight: 400\">N1QL<\/span><\/a><span style=\"font-weight: 400\"> queries. Uses <\/span><a href=\"https:\/\/docs.couchbase.com\/server\/6.5\/learn\/services-and-indexes\/indexes\/global-secondary-indexes.html\"><span style=\"font-weight: 400\">GSI<\/span><\/a><span style=\"font-weight: 400\"> (Global Secondary Indexing), <\/span><a href=\"https:\/\/docs.couchbase.com\/server\/current\/fts\/full-text-intro.html\"><span style=\"font-weight: 400\">FTS<\/span><\/a><span style=\"font-weight: 400\"> (Full-Text Search) indexes as needed.\u00a0 FTS manages the full-text index and can be queried <\/span><a href=\"https:\/\/docs.couchbase.com\/server\/current\/fts\/fts-supported-queries.html\"><span style=\"font-weight: 400\">directly<\/span><\/a><span style=\"font-weight: 400\"> or via the N1QL <\/span><a href=\"https:\/\/docs.couchbase.com\/server\/current\/n1ql\/n1ql-language-reference\/searchfun.html\"><span style=\"font-weight: 400\">query service<\/span><\/a><span style=\"font-weight: 400\">.\u00a0 <\/span><a href=\"https:\/\/docs.couchbase.com\/server\/6.5\/eventing\/eventing-overview.html\"><span style=\"font-weight: 400\">The Eventing function<\/span><\/a><span style=\"font-weight: 400\"> enables you to automatically trigger action (by executing a Javascript function) upon data mutation.\u00a0 The Couchbase <\/span><a href=\"https:\/\/docs.couchbase.com\/server\/current\/learn\/services-and-indexes\/services\/analytics-service.html\"><span style=\"font-weight: 400\">Analytics engine<\/span><\/a><span style=\"font-weight: 400\"> is an MPP data and query engine.\u00a0 Makes a copy of the data and redistributes it into its nodes, executes the query in parallel for the best performance possible. All of these can be seamlessly used by the rich set of APIs available in our <\/span><a href=\"https:\/\/www.couchbase.com\/downloads\/start-today?family=couchbase-server&amp;utm_source=google&amp;utm_medium=search&amp;utm_campaign=Brand+-+US+-+Desktop+-+GGL+-+Phrase&amp;utm_keyword=couchbase%20sdk&amp;kpid=go_cmp-6775677964_adg-79925396592_ad-389053503283_kwd-825033165336_dev-c_ext-_prd-&amp;gclid=EAIaIQobChMI6uycotr_6AIV3QiICR3huAKAEAAYASAAEgLIo_D_BwE\"><span style=\"font-weight: 400\">SDKs<\/span><\/a><span style=\"font-weight: 400\"> available in all the popular languages.\u00a0<\/span><\/p>\n<p><a href=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2020\/04\/Screen-Shot-2020-04-23-at-7.50.37-AM.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-8481\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2020\/04\/Screen-Shot-2020-04-23-at-7.50.37-AM-300x127.png\" alt=\"\" width=\"789\" height=\"334\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/04\/Screen-Shot-2020-04-23-at-7.50.37-AM-300x127.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/04\/Screen-Shot-2020-04-23-at-7.50.37-AM-1024x435.png 1024w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/04\/Screen-Shot-2020-04-23-at-7.50.37-AM-768x326.png 768w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/04\/Screen-Shot-2020-04-23-at-7.50.37-AM-1536x652.png 1536w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/04\/Screen-Shot-2020-04-23-at-7.50.37-AM-20x8.png 20w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/04\/Screen-Shot-2020-04-23-at-7.50.37-AM-1320x560.png 1320w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/04\/Screen-Shot-2020-04-23-at-7.50.37-AM.png 1654w\" sizes=\"auto, (max-width: 789px) 100vw, 789px\" \/><\/a><\/p>\n<h4><span style=\"color: #0000ff\"><strong>DATABASE OBJECTS<\/strong><\/span><a href=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2020\/04\/Screen-Shot-2020-04-23-at-7.32.09-AM.png\"><br \/>\n<\/a><\/h4>\n<p><span style=\"font-weight: 400\">MongoDB has a collection and database as the logical objects users have to work with. Couchbase traditionally had just the <\/span><a href=\"https:\/\/docs.couchbase.com\/server\/current\/learn\/buckets-memory-and-storage\/buckets.html\"><span style=\"font-weight: 400\">Buckets<\/span><\/a><span style=\"font-weight: 400\">. Bucket worked both for resource management\u00a0 (e.g. amount of memory used), security as well as the data container. In 6.5, we introduced the notion of <\/span><a href=\"https:\/\/docs.couchbase.com\/server\/current\/developer-preview\/collections\/collections-overview.html\"><span style=\"font-weight: 400\">collection and scope<\/span><\/a><span style=\"font-weight: 400\"> as a developer preview.\u00a0 This bucket:scope:collection hierarchy is analogous to RDBMS\u2019s database:schema:table.\u00a0 This makes the database more secure and a better multi-tenant.\u00a0 In 6.5, without the developer preview, each bucket uses a default scope and collection, making the transition seamless.<\/span><\/p>\n<p><a href=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2020\/04\/Screen-Shot-2020-04-23-at-4.48.44-PM.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-8479\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2020\/04\/Screen-Shot-2020-04-23-at-4.48.44-PM-300x175.png\" alt=\"\" width=\"622\" height=\"365\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/04\/Screen-Shot-2020-04-23-at-4.48.44-PM-300x175.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/04\/Screen-Shot-2020-04-23-at-4.48.44-PM-20x12.png 20w\" sizes=\"auto, (max-width: 622px) 100vw, 622px\" \/><\/a><\/p>\n<div dir=\"ltr\" align=\"left\">\n<table>\n<tbody>\n<tr>\n<td>\n<p dir=\"ltr\"><strong>RDBMS<\/strong><\/p>\n<\/td>\n<td>\n<p dir=\"ltr\"><strong>MongoDB<\/strong><\/p>\n<\/td>\n<td>\n<p dir=\"ltr\"><strong>Couchbase<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p dir=\"ltr\">Database<\/p>\n<\/td>\n<td>\n<p dir=\"ltr\">Database<\/p>\n<\/td>\n<td>\n<p dir=\"ltr\">Bucket<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p dir=\"ltr\">Table<\/p>\n<\/td>\n<td>\n<p dir=\"ltr\">Collection<\/p>\n<\/td>\n<td>\n<p dir=\"ltr\">Bucket<\/p>\n<p dir=\"ltr\">Future: Collection<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p dir=\"ltr\">Row<\/p>\n<\/td>\n<td>\n<p dir=\"ltr\">Document (BSON)<\/p>\n<\/td>\n<td>\n<p dir=\"ltr\">Document (standard JSON)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p dir=\"ltr\">Column<\/p>\n<\/td>\n<td>\n<p dir=\"ltr\">Field\/Attribute<\/p>\n<\/td>\n<td>\n<p dir=\"ltr\">Field\/Attribute<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p dir=\"ltr\">Partition (Table\/collection\/bucket)<\/p>\n<\/td>\n<td>\n<p dir=\"ltr\">Not partitioned by default.<\/p>\n<p dir=\"ltr\">Hash &amp; range partitioning (sharding) is supported manually.<\/p>\n<\/td>\n<td>\n<p dir=\"ltr\">Partition (hash automatic)<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h4 role=\"presentation\"><strong>Notes to Developers<\/strong><\/h4>\n<p>In MongoDB, you start with your instance (deployment) and create databases, collections and indexes.<\/p>\n<p>In Couchbase, you start with your instance and create your buckets and indexes. Each bucket can have multiple types of documents, so each document should have an application designated field for recognizing its type. {&#8220;type&#8221;: &#8220;parts&#8221;}. Since each bucket can have any number of types of documents, you should avoid creating too many buckets. This also means, when you create an index you&#8217;ll be interested in creating an index for each type: customer, parts, orders, etc.\u00a0 So, the index creation will include a WHERE clause for the document type.<\/p>\n<p>CREATE INDEX ix_customer_zip\u00a0 ON customer(zip) WHERE type = &#8220;customer&#8221;;<\/p>\n<p>SELECT * FROM customer WHERE zip = 94040 AND type = &#8220;customer&#8221;<\/p>\n<p>Each MongoDB document contains an explicitly provided or implicitly generated document id field _id.<\/p>\n<p>In Couchbase, the users should generate and insert an immutable document key for each document.\u00a0 When inserting via N1QL, you can use the UUID() function to generate one for you.\u00a0 But, it&#8217;s a good practice to have a <a href=\"https:\/\/www.couchbase.com\/blog\/data-modelling-key-design\/\">regular structure for the document key<\/a>.<\/p>\n<h4><span style=\"color: #0000ff\"><strong>DATA TYPES<\/strong><\/span><\/h4>\n<p><span style=\"font-weight: 400\">MongoDB\u2019s data model is <\/span><a href=\"https:\/\/www.mongodb.com\/json-and-bson\"><span style=\"font-weight: 400\">BSON<\/span><\/a><span style=\"font-weight: 400\"> and Couchbase data model is <\/span><a href=\"https:\/\/www.json.org\/json-en.html\"><span style=\"font-weight: 400\">JSON<\/span><\/a><span style=\"font-weight: 400\">. The proprietary BSON type has some types, not in JSON. \u00a0 JSON has a string, numeric, boolean (true\/false), array, object types.\u00a0 BSON has a string, numeric, boolean, array, object, binary, UTC DateTime, timestamp, and many other custom proprietary extensions,\u00a0 The most common difference is the DateTime and timestamp.\u00a0 In Couchbase, all time-related data is stored as string in ISO 8601 format.\u00a0 Couchbase N1QL has a plethora of functions to extract, convert, and calculate on the time.\u00a0 Full function details are<\/span><a href=\"https:\/\/www.couchbase.com\/blog\/dates-timestamps-timezones-comparative-study-oracle-n1ql-support-date-time-feature-part-1\/\"><span style=\"font-weight: 400\"> available in this article<\/span><\/a><span style=\"font-weight: 400\">.\u00a0<\/span><\/p>\n<div dir=\"ltr\" align=\"left\">\n<table>\n<tbody>\n<tr>\n<td>\n<p dir=\"ltr\"><strong>Data Type<\/strong><\/p>\n<\/td>\n<td>\n<p dir=\"ltr\"><strong>MongoDB<\/strong><\/p>\n<\/td>\n<td>\n<p dir=\"ltr\"><strong>Couchbase<\/strong><\/p>\n<\/td>\n<td>\n<p dir=\"ltr\"><strong>JSON<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p dir=\"ltr\">Numbers<\/p>\n<\/td>\n<td>\n<p dir=\"ltr\">BSON Number<\/p>\n<\/td>\n<td>\n<p dir=\"ltr\">JSON Number<\/p>\n<\/td>\n<td>\n<p dir=\"ltr\">{ &#8220;id&#8221;: 5, &#8220;balance&#8221;:2942.59 }<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p dir=\"ltr\">String<\/p>\n<\/td>\n<td>\n<p dir=\"ltr\">BSON String<\/p>\n<\/td>\n<td>\n<p dir=\"ltr\">JSON String<\/p>\n<\/td>\n<td>\n<p dir=\"ltr\">{ &#8220;name&#8221;: &#8220;Joe&#8221;,&#8221;city&#8221;: &#8220;Morrisville&#8221; }<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p dir=\"ltr\">boolean<\/p>\n<\/td>\n<td>\n<p dir=\"ltr\">BSON Boolean<\/p>\n<\/td>\n<td>\n<p dir=\"ltr\">JSON Boolean<\/p>\n<\/td>\n<td>\n<p dir=\"ltr\">{ &#8220;premium&#8221;: true, \u201dpending&#8221;: false}<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p dir=\"ltr\">datetime<\/p>\n<\/td>\n<td>\n<p dir=\"ltr\">Custom Data format<\/p>\n<\/td>\n<td>\n<p dir=\"ltr\">JSON ISO 8901 String with extract, convert and arithmetic functions<\/p>\n<\/td>\n<td>\n<p dir=\"ltr\">{ \u201csoldate\u201d: &#8220;2017-10-12T13:47:41.068-07:00&#8221; }<\/p>\n<p dir=\"ltr\">MongoDB:<\/p>\n<p dir=\"ltr\">{ \u201csoldate\u201d: ISODate(&#8220;2012-12-19T06:01:17.171Z&#8221;)}<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p dir=\"ltr\">spatial data<\/p>\n<\/td>\n<td>\n<p dir=\"ltr\">GeoJSON<\/p>\n<\/td>\n<td>\n<p dir=\"ltr\">Supports nearest neighbor and spatial distance.<\/p>\n<\/td>\n<td>\n<p dir=\"ltr\">&#8220;geometry&#8221;: {&#8220;type&#8221;: &#8220;Point&#8221;, &#8220;coordinates&#8221;: [-104.99404, 39.75621]}<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p dir=\"ltr\">MISSING<\/p>\n<\/td>\n<td>\n<p dir=\"ltr\">Unsupported<\/p>\n<\/td>\n<td>\n<p dir=\"ltr\">MISSING<\/p>\n<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>\n<p dir=\"ltr\">NULL<\/p>\n<\/td>\n<td>\n<p dir=\"ltr\">JSON Null<\/p>\n<\/td>\n<td>\n<p dir=\"ltr\">JSON null<\/p>\n<\/td>\n<td>\n<p dir=\"ltr\">{ &#8220;last_address&#8221;: null }<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p dir=\"ltr\">Objects<\/p>\n<\/td>\n<td>\n<p dir=\"ltr\">Flexible JSON Objects<\/p>\n<\/td>\n<td>\n<p dir=\"ltr\">Flexible JSON Objects<\/p>\n<\/td>\n<td>\n<p dir=\"ltr\">{ &#8220;address&#8221;:\u00a0 {&#8220;street&#8221;: &#8220;1, Main street&#8221;, &#8220;city&#8221;: Morrisville, &#8220;zip&#8221;:&#8221;94824&#8243;}}<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p dir=\"ltr\">Arrays<\/p>\n<\/td>\n<td>\n<p dir=\"ltr\">Flexible JSON Arrays<\/p>\n<\/td>\n<td>\n<p dir=\"ltr\">Flexible JSON Arrays<\/p>\n<\/td>\n<td>\n<p dir=\"ltr\">{ &#8220;hobbies&#8221;: [&#8220;tennis&#8221;, &#8220;skiing&#8221;, &#8220;lego&#8221;]}<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p><b>ALL ABOUT MISSING<\/b><\/p>\n<p><span style=\"font-weight: 400\">MISSING is the value of a field absent in the JSON document or literal.<\/span><\/p>\n<p><span style=\"font-weight: 400\">{\u201cname\u201d:\u201djoe\u201d}\u00a0 Everything but the field \u201cname\u201d is missing from the document.\u00a0 You can also set the value of a field to MISSING to make the field disappear. Traditional relational databases use <\/span><a href=\"https:\/\/en.wikipedia.org\/wiki\/Three-valued_logic\"><span style=\"font-weight: 400\">three valued logic<\/span><\/a><span style=\"font-weight: 400\"> with true, false, and NULL.\u00a0 With the addition of MISSING, N1QL<\/span><a href=\"https:\/\/docs.couchbase.com\/server\/4.0\/n1ql\/n1ql-language-reference\/booleanlogic.html\"><span style=\"font-weight: 400\"> uses 4-value logic<\/span><\/a><span style=\"font-weight: 400\">.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400\">You have the following expressions with MISSING.\u00a0\u00a0<\/span><\/p>\n<div dir=\"ltr\" align=\"left\">\n<table>\n<tbody>\n<tr>\n<td>\n<p dir=\"ltr\">IS MISSING<\/p>\n<\/td>\n<td>\n<p dir=\"ltr\">Returns true if the document does not have a status field<\/p>\n<p dir=\"ltr\">FROM CUSTOMER WHERE status is MISSING;<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p dir=\"ltr\">IS NOT MISSING<\/p>\n<\/td>\n<td>\n<p dir=\"ltr\">Returns true if the document has a status field<\/p>\n<p dir=\"ltr\">FROM CUSTOMER WHERE status is NOT MISSING;<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p dir=\"ltr\">MISSING AND NULL<\/p>\n<\/td>\n<td>\n<p dir=\"ltr\">MISSING is a known missing quantity<\/p>\n<p dir=\"ltr\">null is a known UNKNOWN. You can check for null value similar to MISSING with IS NULL or IS NOT NULL expression.<\/p>\n<p dir=\"ltr\">Valid JSON: \u00a0{\u201cstatus\u201d: null}<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p dir=\"ltr\">MISSING value<\/p>\n<\/td>\n<td>\n<p dir=\"ltr\">Simply make the field of any type to disappear by setting it to MISSING<\/p>\n<p dir=\"ltr\">UPDATE CUSTOMER SET status = MISSING WHERE cxid = \u201cxyz232\u201d<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h4><span style=\"color: #0000ff\"><b>DATA MODELING<\/b><\/span><\/h4>\n<table>\n<tbody>\n<tr>\n<td><b>Relationship<\/b><\/td>\n<td><b>MongoDB<\/b><\/td>\n<td><b>Couchbase\u00a0<\/b><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">1:1<\/span><\/td>\n<td>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Embedded Object (implicit)<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Document Key Reference<\/span><\/li>\n<\/ul>\n<\/td>\n<td>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Embedded Object (implicit)<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Document Key Reference<\/span><\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">1:N<\/span><\/td>\n<td>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Embedded Array of Objects<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Document key Reference<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Query with $lookup operator<\/span><\/li>\n<\/ul>\n<\/td>\n<td>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Embedded Array of Objects<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Document key Reference<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Query with INNER, LEFT OUTER, RIGHT OUTER, NEST, UNNEST\u00a0 joins<\/span><\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">N:M<\/span><\/td>\n<td>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Embedded Array of Objects<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Arrays of objects with references<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Difficult to query with $lookup operator<\/span><\/li>\n<\/ul>\n<\/td>\n<td>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Embedded Array of Objects<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Arrays of objects with references<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Query with INNER, LEFT OUTER, RIGHT OUTER, NEST, UNNEST\u00a0 joins<\/span><\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><b>PHYSICAL SPACE MANAGEMENT<\/b><\/p>\n<table>\n<tbody>\n<tr>\n<td><b>Index Type<\/b><\/td>\n<td><b>MongoDB<\/b><\/td>\n<td><b>Couchbase\u00a0<\/b><\/td>\n<\/tr>\n<tr>\n<td><b>Table Storage<\/b><\/td>\n<td><span style=\"font-weight: 400\">File system directory<\/span><\/td>\n<td><span style=\"font-weight: 400\">File system directory<\/span><\/td>\n<\/tr>\n<tr>\n<td><b>Index Storage<\/b><\/td>\n<td><span style=\"font-weight: 400\">File system directory<\/span><\/td>\n<td><span style=\"font-weight: 400\">File system directory<\/span><\/td>\n<\/tr>\n<tr>\n<td><b>Partitioning &#8211; Data<\/b><\/td>\n<td><span style=\"font-weight: 400\">Range and hash sharding are supported.<\/span><\/td>\n<td><span style=\"font-weight: 400\">Hash partitioning<\/span><\/p>\n<p><span style=\"font-weight: 400\">Stored in 1024 vbuckets<\/span><\/td>\n<\/tr>\n<tr>\n<td><b>Partitioning &#8211; Index<\/b><\/td>\n<td><span style=\"font-weight: 400\">Tied to the collection sharding strategy since all (sub) indexes are local to each mongod node.<\/span><\/td>\n<td><span style=\"font-weight: 400\">Always detached from Bucket<\/span><\/p>\n<p><span style=\"font-weight: 400\">Global Index (can use a different strategy than the bucket\/collection)<\/span><\/p>\n<p><span style=\"font-weight: 400\">Supports hash partitioning of the indexes.<\/span><\/p>\n<p><span style=\"font-weight: 400\">Range partitioning, partial indexing is manual via partial indexes.<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4><span style=\"color: #0000ff\"><strong>SDKs<\/strong><\/span><\/h4>\n<p>My personal knowledge of both SDKs is limited.\u00a0 There should be equivalent APIs, drivers, and connectors with the two products.\u00a0 If not, please let us know.<\/p>\n<table>\n<tbody>\n<tr>\n<td><b>SDK<\/b><\/td>\n<td><b>MongoDB<\/b><\/td>\n<td><b>Couchbase\u00a0<\/b><\/td>\n<\/tr>\n<tr>\n<td><b>Java<\/b><\/td>\n<td><b>MongoDB java driver<\/b><\/td>\n<td><b>Couchbase Java SDK,\u00a0<\/b><\/p>\n<p><b>Simba &amp; CDATA JDBC<\/b><\/td>\n<\/tr>\n<tr>\n<td><b>C<\/b><\/td>\n<td><b>MongoDB C Driver<\/b><\/p>\n<p><b>ODBC driver<\/b><\/td>\n<td><b>Couchbase C SDK,<\/b><\/p>\n<p><b>Simba &amp; CDATA ODBC<\/b><\/td>\n<\/tr>\n<tr>\n<td><b>.NET, LINQ<\/b><\/td>\n<td><b>Mongodb .NET provider.<\/b><\/td>\n<td><b>Couchbase .NET provider<\/b><\/p>\n<p><b>LINQ provider<\/b><\/td>\n<\/tr>\n<tr>\n<td><b>PHP, Python, Perl, Node.js<\/b><\/td>\n<td><b>MongoDB SDK on all these languages<\/b><\/td>\n<td><b>Couchbase SDK on all these languages<\/b><\/td>\n<\/tr>\n<tr>\n<td><b>golang<\/b><\/td>\n<td><b>Mongodb go sdk<\/b><\/td>\n<td><b>Couchbase Go SDK<\/b><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4><strong><span style=\"color: #0000ff\">QUERY LANGUAGE<\/span><\/strong><\/h4>\n<p><strong>SELECT:\u00a0 \u00a0<\/strong>Mongo has multiple APIs for selecting the documents.\u00a0 find(), aggregate() can both do the job of simple SELECT statements. We&#8217;ll look at aggregate() later in the section.<\/p>\n<pre class=\"theme:vs2012-black font-size:17 line-height:20 whitespace-before:1 whitespace-after:1 lang:mysql decode:true\">\/* MongoDB *\/\r\ndb.CUSTOMER.find({zip:94040})\r\n\r\n\/* Couchbase: N1QL *\/\r\nSELECT * FROM CUSTOMER WHERE zip = 94040;<\/pre>\n<p><strong>INSERT<\/strong><\/p>\n<p>In MongoDB, providing _id is optional.\u00a0 If you don&#8217;t provide its value, Mongo will generate the field value and save it.\u00a0 Providing document KEY is mandatory in Couchbase.<\/p>\n<pre class=\"theme:vs2012-black font-size:17 line-height:20 whitespace-before:2 lang:mysql decode:true\">\/* MongoDB *\/\r\ndb.CUSTOMER.save({_id: \"xyz124\", \r\n{\u201cid\u201d: \u201cxyz124\u201d, \u201cname\u201d: \u201cJoe Montana\u201d, \u201cstatus\u201d: \u201cPremium\u201d, \u201czip\u201d: 94040})\r\n\r\n\/* Couchbase:N1QL *\/\r\nINSERT INTO CUSTOMER(KEY, VALUE) VALUES\r\n(\u2018xyz124\u2019, {\u201cid\u201d: \u201cxyz124\u201d, \u201cname\u201d: \u201cJoe Montana\u201d, \u201cstatus\u201d: \u201cPremium\u201d, \u201czip\u201d: 94040})\r\n<\/pre>\n<p><strong>UPDATE<\/strong><\/p>\n<pre class=\"theme:vs2012-black font-size:17 line-height:20 whitespace-before:2 lang:mysql decode:true\">\/* MongoDB *\/\r\ndb.CUSTOMER.update({_id:\u201dxyz124\u2019},{zip:94587})\r\n\r\n\/* Coudhbase:N1QL *\/\r\nUPDATE CUSTOMER SET zip = 94587 WHERE id = \u2018xyz124\u2019\r\n<\/pre>\n<p><strong>DELETE<\/strong><\/p>\n<pre class=\"theme:vs2012-black font-size:17 line-height:20 whitespace-before:2 lang:mysql decode:true\">\/* MongoDB *\/\r\ndb.CUSTOMER.remove({_id:\u2018pqr482\u2019})\r\n\r\n\/* Couchbase:N1QL.  One of the statements will do for this data\/schema. *\/\r\nDELETE FROM CUSTOMER WHERE id = \u2018pqr482\u2019;\r\nDELETE FROM CUSTOMER WHERE META().id = \u2018pqr482\u2019;\r\n<\/pre>\n<p><strong><a href=\"https:\/\/docs.couchbase.com\/server\/current\/n1ql\/n1ql-language-reference\/merge.html\">MERGE<\/a>:\u00a0<\/strong>MERGE operation on a set of JSON documents is often required as part of your ETL process or daily updates.\u00a0 MERGE statement can involve complex data sources with complex business rule-based predicates.\u00a0 Couchbase provides the standard MERGE operation with the same semantics.\u00a0 In MongoDB, you had to write a long program to do this, but then some of the set operation rules (e.g. each document should ONLY be updated once) are difficult to enforce from an application.\u00a0 In Couchbase, you can simply use the <a href=\"https:\/\/www.couchbase.com\/blog\/ansi-join-enhancements-and-ansi-merge\/\">MERGE statement<\/a>, just like RDBMS.<\/p>\n<pre class=\"theme:vs2012-black font-size:17 line-height:20 whitespace-before:2 lang:default decode:true\">\/* MongoDB *\/\r\nUnavailable.  Need to work around using aggregate(), custom-logic program, and update().\r\n\r\n\/* Couchbase:N1QL Second statement is ANSI SQL Compliant*\/\r\nMERGE INTO CUSTOMER \r\n      USING (SELECT id FROM CN WHERE x &lt; 10) AS CN \r\n            ON KEY CN.id  WHEN MATCHED THEN \r\n                  UPDATE SET CUSTOMER.o4=1;\r\n\r\nMERGE INTO CUSTOMER \r\n      USING (SELECT id FROM CN WHERE x &lt; 10) AS CN \r\n            ON (CN.id = META(CUSTOKMER).id) WHEN MATCHED THEN \r\n                  UPDATE SET CUSTOMER.o4=1;<\/pre>\n<p><strong>DESCRIBE:<\/strong><\/p>\n<p>JSON data is self-describing and flexible. MongoDB Schema helper is available via <a href=\"https:\/\/docs.mongodb.com\/compass\/current\/schema\/\">Compass visualization<\/a> in the Enterprise Edition only.<\/p>\n<p>Couchbase has INFER to analyze the understand the schema. Both the query service and the analytic service can infer the schema.<\/p>\n<ol>\n<li style=\"list-style-type: none\">\n<ol>\n<li>Query service <a href=\"https:\/\/docs.couchbase.com\/server\/6.5\/n1ql\/n1ql-language-reference\/infer.html\">INFER command<\/a><\/li>\n<li>Analytics Service has <a href=\"https:\/\/docs.couchbase.com\/server\/current\/analytics\/8_builtin.html\">array_infer_schema()<\/a> function.<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<p><a href=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2020\/04\/Screen-Shot-2020-04-24-at-4.25.44-PM.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-8500\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2020\/04\/Screen-Shot-2020-04-24-at-4.25.44-PM-300x209.png\" alt=\"\" width=\"653\" height=\"456\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/04\/Screen-Shot-2020-04-24-at-4.25.44-PM-300x209.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/04\/Screen-Shot-2020-04-24-at-4.25.44-PM-1024x713.png 1024w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/04\/Screen-Shot-2020-04-24-at-4.25.44-PM-768x535.png 768w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/04\/Screen-Shot-2020-04-24-at-4.25.44-PM-1536x1070.png 1536w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/04\/Screen-Shot-2020-04-24-at-4.25.44-PM-20x14.png 20w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/04\/Screen-Shot-2020-04-24-at-4.25.44-PM-1320x919.png 1320w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/04\/Screen-Shot-2020-04-24-at-4.25.44-PM.png 1956w\" sizes=\"auto, (max-width: 653px) 100vw, 653px\" \/><\/a><\/p>\n<p>Here&#8217;s the INFER output example.<\/p>\n<pre class=\"theme:vs2012-black font-size:17 line-height:20 height-set:true whitespace-before:2 lang:js decode:true\">INFER `travel-sample`;\r\n\r\n{\r\n    \"requestID\": \"59c444b1-a468-486b-aac3-949be1ddaed1\",\r\n    \"clientContextID\": \"634e367b-ac7c-4815-90da-1506d6902d78\",\r\n    \"signature\": null,\r\n    \"results\": [\r\n    [\r\n        {\r\n            \"#docs\": 816,\r\n            \"$schema\": \"https:\/\/json-schema.org\/draft-06\/schema\",\r\n            \"Flavor\": \"`stops` = 0, `type` = \\\"route\\\"\",\r\n            \"properties\": {\r\n                \"airline\": {\r\n                    \"#docs\": 816,\r\n                    \"%docs\": 100,\r\n                    \"samples\": [\r\n                        \"9K\",\r\n                        \"DL\",\r\n                        \"KL\",\r\n                        \"US\",\r\n                        \"WN\"\r\n                    ],\r\n                    \"type\": \"string\"\r\n                },\r\n                \"airlineid\": {\r\n                    \"#docs\": 816,\r\n                    \"%docs\": 100,\r\n                    \"samples\": [\r\n                        \"airline_1629\",\r\n                        \"airline_2009\",\r\n                        \"airline_3090\",\r\n                        \"airline_4547\",\r\n                        \"airline_5265\"\r\n                    ],\r\n                    \"type\": \"string\"\r\n                },\r\n                \"destinationairport\": {\r\n                    \"#docs\": 816,\r\n                    \"%docs\": 100,\r\n                    \"samples\": [\r\n                        \"ACK\",\r\n                        \"ATL\",\r\n                        \"BWI\",\r\n                        \"CMH\",\r\n                        \"MAN\"\r\n                    ],\r\n                    \"type\": \"string\"\r\n                },\r\n                \"distance\": {\r\n                    \"#docs\": 816,\r\n                    \"%docs\": 100,\r\n                    \"samples\": [\r\n                        49.792009674515775,\r\n                        335.34343397923425,\r\n                        775.5437991859698,\r\n                        2524.506189235734,\r\n                        6139.9648921034795\r\n                    ],\r\n                    \"type\": \"number\"\r\n                },\r\n                \"equipment\": {\r\n                    \"#docs\": [\r\n                        1,\r\n                        815\r\n                    ],\r\n                    \"%docs\": [\r\n                        0.12,\r\n                        99.87\r\n                    ],\r\n                    \"samples\": [\r\n                        [\r\n                            null\r\n                        ],\r\n                        [\r\n                            \"73W 738\",\r\n                            \"763\",\r\n                            \"CNA\",\r\n                            \"CRJ\",\r\n                            \"ERJ CRJ\"\r\n                        ]\r\n                    ],\r\n                    \"type\": [\r\n                        \"null\",\r\n                        \"string\"\r\n                    ]\r\n                },\r\n                \"id\": {\r\n                    \"#docs\": 816,\r\n                    \"%docs\": 100,\r\n                    \"samples\": [\r\n                        3645,\r\n                        20935,\r\n                        36958,\r\n                        59930,\r\n                        64450\r\n                    ],\r\n                    \"type\": \"number\"\r\n                },\r\n                \"schedule\": {\r\n                    \"#docs\": 816,\r\n                    \"%docs\": 100,\r\n                    \"items\": {\r\n                        \"#docs\": 17124,\r\n                        \"$schema\": \"https:\/\/json-schema.org\/draft-06\/schema\",\r\n                        \"properties\": {\r\n                            \"day\": {\r\n                                \"type\": \"number\"\r\n                            },\r\n                            \"flight\": {\r\n                                \"type\": \"string\"\r\n                            },\r\n                            \"utc\": {\r\n                                \"type\": \"string\"\r\n                            }\r\n                        },\r\n                        \"type\": \"object\"\r\n                    },\r\n                    \"maxItems\": 31,\r\n                    \"minItems\": 10,\r\n                    \"samples\": [\r\n                        [\r\n                            {\r\n                                \"day\": 0,\r\n                                \"flight\": \"9K006\",\r\n                                \"utc\": \"19:36:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 0,\r\n                                \"flight\": \"9K802\",\r\n                                \"utc\": \"22:34:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 0,\r\n                                \"flight\": \"9K210\",\r\n                                \"utc\": \"20:08:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 0,\r\n                                \"flight\": \"9K316\",\r\n                                \"utc\": \"01:02:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 1,\r\n                                \"flight\": \"9K408\",\r\n                                \"utc\": \"05:50:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 1,\r\n                                \"flight\": \"9K452\",\r\n                                \"utc\": \"12:34:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 1,\r\n                                \"flight\": \"9K799\",\r\n                                \"utc\": \"04:36:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 2,\r\n                                \"flight\": \"9K157\",\r\n                                \"utc\": \"19:35:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 2,\r\n                                \"flight\": \"9K923\",\r\n                                \"utc\": \"01:09:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 3,\r\n                                \"flight\": \"9K201\",\r\n                                \"utc\": \"09:24:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 4,\r\n                                \"flight\": \"9K355\",\r\n                                \"utc\": \"04:29:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 4,\r\n                                \"flight\": \"9K845\",\r\n                                \"utc\": \"12:24:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 4,\r\n                                \"flight\": \"9K515\",\r\n                                \"utc\": \"17:56:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 4,\r\n                                \"flight\": \"9K472\",\r\n                                \"utc\": \"11:16:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 4,\r\n                                \"flight\": \"9K506\",\r\n                                \"utc\": \"04:17:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 5,\r\n                                \"flight\": \"9K040\",\r\n                                \"utc\": \"20:32:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 5,\r\n                                \"flight\": \"9K273\",\r\n                                \"utc\": \"04:29:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 5,\r\n                                \"flight\": \"9K131\",\r\n                                \"utc\": \"22:14:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 5,\r\n                                \"flight\": \"9K494\",\r\n                                \"utc\": \"18:54:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 6,\r\n                                \"flight\": \"9K037\",\r\n                                \"utc\": \"21:13:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 6,\r\n                                \"flight\": \"9K786\",\r\n                                \"utc\": \"16:07:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 6,\r\n                                \"flight\": \"9K724\",\r\n                                \"utc\": \"15:53:00\"\r\n                            }\r\n                        ],\r\n                        [\r\n                            {\r\n                                \"day\": 0,\r\n                                \"flight\": \"DL113\",\r\n                                \"utc\": \"15:48:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 0,\r\n                                \"flight\": \"DL864\",\r\n                                \"utc\": \"09:13:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 1,\r\n                                \"flight\": \"DL880\",\r\n                                \"utc\": \"23:27:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 2,\r\n                                \"flight\": \"DL399\",\r\n                                \"utc\": \"06:42:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 2,\r\n                                \"flight\": \"DL705\",\r\n                                \"utc\": \"15:54:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 2,\r\n                                \"flight\": \"DL630\",\r\n                                \"utc\": \"21:52:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 3,\r\n                                \"flight\": \"DL570\",\r\n                                \"utc\": \"00:02:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 4,\r\n                                \"flight\": \"DL702\",\r\n                                \"utc\": \"18:46:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 4,\r\n                                \"flight\": \"DL668\",\r\n                                \"utc\": \"20:09:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 4,\r\n                                \"flight\": \"DL214\",\r\n                                \"utc\": \"10:27:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 4,\r\n                                \"flight\": \"DL748\",\r\n                                \"utc\": \"13:36:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 5,\r\n                                \"flight\": \"DL935\",\r\n                                \"utc\": \"20:48:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 6,\r\n                                \"flight\": \"DL074\",\r\n                                \"utc\": \"19:27:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 6,\r\n                                \"flight\": \"DL618\",\r\n                                \"utc\": \"10:54:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 6,\r\n                                \"flight\": \"DL983\",\r\n                                \"utc\": \"19:41:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 6,\r\n                                \"flight\": \"DL951\",\r\n                                \"utc\": \"17:45:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 6,\r\n                                \"flight\": \"DL546\",\r\n                                \"utc\": \"12:19:00\"\r\n                            }\r\n                        ],\r\n                        [\r\n                            {\r\n                                \"day\": 0,\r\n                                \"flight\": \"KL362\",\r\n                                \"utc\": \"22:09:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 0,\r\n                                \"flight\": \"KL430\",\r\n                                \"utc\": \"10:39:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 0,\r\n                                \"flight\": \"KL249\",\r\n                                \"utc\": \"18:12:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 1,\r\n                                \"flight\": \"KL670\",\r\n                                \"utc\": \"16:10:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 1,\r\n                                \"flight\": \"KL164\",\r\n                                \"utc\": \"00:58:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 2,\r\n                                \"flight\": \"KL015\",\r\n                                \"utc\": \"16:29:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 3,\r\n                                \"flight\": \"KL731\",\r\n                                \"utc\": \"17:12:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 4,\r\n                                \"flight\": \"KL047\",\r\n                                \"utc\": \"14:58:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 4,\r\n                                \"flight\": \"KL854\",\r\n                                \"utc\": \"08:41:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 4,\r\n                                \"flight\": \"KL173\",\r\n                                \"utc\": \"21:20:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 5,\r\n                                \"flight\": \"KL006\",\r\n                                \"utc\": \"19:12:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 5,\r\n                                \"flight\": \"KL886\",\r\n                                \"utc\": \"21:32:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 6,\r\n                                \"flight\": \"KL448\",\r\n                                \"utc\": \"22:24:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 6,\r\n                                \"flight\": \"KL286\",\r\n                                \"utc\": \"14:05:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 6,\r\n                                \"flight\": \"KL170\",\r\n                                \"utc\": \"03:36:00\"\r\n                            }\r\n                        ],\r\n                        [\r\n                            {\r\n                                \"day\": 0,\r\n                                \"flight\": \"US931\",\r\n                                \"utc\": \"19:24:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 0,\r\n                                \"flight\": \"US257\",\r\n                                \"utc\": \"20:54:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 1,\r\n                                \"flight\": \"US375\",\r\n                                \"utc\": \"08:22:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 1,\r\n                                \"flight\": \"US674\",\r\n                                \"utc\": \"20:41:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 1,\r\n                                \"flight\": \"US866\",\r\n                                \"utc\": \"03:58:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 1,\r\n                                \"flight\": \"US142\",\r\n                                \"utc\": \"16:05:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 2,\r\n                                \"flight\": \"US572\",\r\n                                \"utc\": \"19:33:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 2,\r\n                                \"flight\": \"US270\",\r\n                                \"utc\": \"12:58:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 2,\r\n                                \"flight\": \"US151\",\r\n                                \"utc\": \"07:46:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 3,\r\n                                \"flight\": \"US513\",\r\n                                \"utc\": \"13:58:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 3,\r\n                                \"flight\": \"US410\",\r\n                                \"utc\": \"00:44:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 3,\r\n                                \"flight\": \"US262\",\r\n                                \"utc\": \"14:52:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 3,\r\n                                \"flight\": \"US962\",\r\n                                \"utc\": \"05:32:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 3,\r\n                                \"flight\": \"US527\",\r\n                                \"utc\": \"17:42:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 4,\r\n                                \"flight\": \"US068\",\r\n                                \"utc\": \"04:14:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 4,\r\n                                \"flight\": \"US448\",\r\n                                \"utc\": \"09:39:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 4,\r\n                                \"flight\": \"US914\",\r\n                                \"utc\": \"07:16:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 4,\r\n                                \"flight\": \"US090\",\r\n                                \"utc\": \"06:06:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 4,\r\n                                \"flight\": \"US514\",\r\n                                \"utc\": \"14:38:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 5,\r\n                                \"flight\": \"US817\",\r\n                                \"utc\": \"09:41:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 5,\r\n                                \"flight\": \"US665\",\r\n                                \"utc\": \"03:49:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 6,\r\n                                \"flight\": \"US740\",\r\n                                \"utc\": \"07:27:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 6,\r\n                                \"flight\": \"US803\",\r\n                                \"utc\": \"18:37:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 6,\r\n                                \"flight\": \"US300\",\r\n                                \"utc\": \"09:08:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 6,\r\n                                \"flight\": \"US496\",\r\n                                \"utc\": \"07:05:00\"\r\n                            }\r\n                        ],\r\n                        [\r\n                            {\r\n                                \"day\": 0,\r\n                                \"flight\": \"WN044\",\r\n                                \"utc\": \"13:39:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 0,\r\n                                \"flight\": \"WN799\",\r\n                                \"utc\": \"07:15:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 0,\r\n                                \"flight\": \"WN792\",\r\n                                \"utc\": \"09:16:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 1,\r\n                                \"flight\": \"WN030\",\r\n                                \"utc\": \"09:51:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 1,\r\n                                \"flight\": \"WN377\",\r\n                                \"utc\": \"03:41:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 2,\r\n                                \"flight\": \"WN081\",\r\n                                \"utc\": \"01:53:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 2,\r\n                                \"flight\": \"WN413\",\r\n                                \"utc\": \"04:49:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 2,\r\n                                \"flight\": \"WN132\",\r\n                                \"utc\": \"16:06:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 2,\r\n                                \"flight\": \"WN882\",\r\n                                \"utc\": \"21:16:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 2,\r\n                                \"flight\": \"WN773\",\r\n                                \"utc\": \"04:55:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 3,\r\n                                \"flight\": \"WN286\",\r\n                                \"utc\": \"04:17:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 3,\r\n                                \"flight\": \"WN295\",\r\n                                \"utc\": \"04:35:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 4,\r\n                                \"flight\": \"WN932\",\r\n                                \"utc\": \"16:34:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 4,\r\n                                \"flight\": \"WN315\",\r\n                                \"utc\": \"00:35:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 4,\r\n                                \"flight\": \"WN016\",\r\n                                \"utc\": \"09:10:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 4,\r\n                                \"flight\": \"WN509\",\r\n                                \"utc\": \"22:28:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 5,\r\n                                \"flight\": \"WN090\",\r\n                                \"utc\": \"13:46:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 6,\r\n                                \"flight\": \"WN456\",\r\n                                \"utc\": \"04:05:00\"\r\n                            },\r\n                            {\r\n                                \"day\": 6,\r\n                                \"flight\": \"WN111\",\r\n                                \"utc\": \"05:10:00\"\r\n                            }\r\n                        ]\r\n                    ],\r\n                    \"type\": \"array\"\r\n                },\r\n                \"sourceairport\": {\r\n                    \"#docs\": 816,\r\n                    \"%docs\": 100,\r\n                    \"samples\": [\r\n                        \"HYA\",\r\n                        \"JFK\",\r\n                        \"ORD\",\r\n                        \"SJU\",\r\n                        \"VLD\"\r\n                    ],\r\n                    \"type\": \"string\"\r\n                },\r\n                \"stops\": {\r\n                    \"#docs\": 816,\r\n                    \"%docs\": 100,\r\n                    \"samples\": [\r\n                        0\r\n                    ],\r\n                    \"type\": \"number\"\r\n                },\r\n                \"type\": {\r\n                    \"#docs\": 816,\r\n                    \"%docs\": 100,\r\n                    \"samples\": [\r\n                        \"route\"\r\n                    ],\r\n                    \"type\": \"string\"\r\n                }\r\n            },\r\n            \"type\": \"object\"\r\n        },\r\n        {\r\n            \"#docs\": 109,\r\n            \"$schema\": \"https:\/\/json-schema.org\/draft-06\/schema\",\r\n            \"Flavor\": \"`type` = \\\"landmark\\\"\",\r\n            \"properties\": {\r\n                \"activity\": {\r\n                    \"#docs\": 109,\r\n                    \"%docs\": 100,\r\n                    \"samples\": [\r\n                        \"buy\",\r\n                        \"do\",\r\n                        \"drink\",\r\n                        \"eat\",\r\n                        \"see\"\r\n                    ],\r\n                    \"type\": \"string\"\r\n                },\r\n                \"address\": {\r\n                    \"#docs\": [\r\n                        106,\r\n                        3\r\n                    ],\r\n                    \"%docs\": [\r\n                        97.24,\r\n                        2.75\r\n                    ],\r\n                    \"samples\": [\r\n                        [\r\n                            null\r\n                        ],\r\n                        [\r\n                            \"310 Uxbridge Rd, W12 7LJ\",\r\n                            \"Craven Cottage, Stevenage Rd, ...\",\r\n                            \"Warwick Road, SW5 9TA\"\r\n                        ]\r\n                    ],\r\n                    \"type\": [\r\n                        \"null\",\r\n                        \"string\"\r\n                    ]\r\n                },\r\n                \"alt\": {\r\n                    \"#docs\": [\r\n                        108,\r\n                        1\r\n                    ],\r\n                    \"%docs\": [\r\n                        99.08,\r\n                        0.91\r\n                    ],\r\n                    \"samples\": [\r\n                        [\r\n                            null\r\n                        ],\r\n                        [\r\n                            \"previously Shanghai Red's\"\r\n                        ]\r\n                    ],\r\n                    \"type\": [\r\n                        \"null\",\r\n                        \"string\"\r\n                    ]\r\n                },\r\n                \"city\": {\r\n                    \"#docs\": 109,\r\n                    \"%docs\": 100,\r\n                    \"samples\": [\r\n                        \"Carpentras\",\r\n                        \"Llanddona\",\r\n                        \"Llangrannog\",\r\n                        \"London\",\r\n                        \"Los Angeles\"\r\n                    ],\r\n                    \"type\": \"string\"\r\n                },\r\n                \"content\": {\r\n                    \"#docs\": 109,\r\n                    \"%docs\": 100,\r\n                    \"samples\": [\r\n                        \"Hosts frequent conventions, ex...\",\r\n                        \"Originally a dance hall, this ...\",\r\n                        \"The Hollywood Wax Museum is th...\",\r\n                        \"The home of Premier League foo...\",\r\n                        \"several annual horse racing, b...\"\r\n                    ],\r\n                    \"type\": \"string\"\r\n                },\r\n                \"country\": {\r\n                    \"#docs\": 109,\r\n                    \"%docs\": 100,\r\n                    \"samples\": [\r\n                        \"France\",\r\n                        \"United Kingdom\",\r\n                        \"United States\"\r\n                    ],\r\n                    \"type\": \"string\"\r\n                },\r\n                \"directions\": {\r\n                    \"#docs\": [\r\n                        106,\r\n                        3\r\n                    ],\r\n                    \"%docs\": [\r\n                        97.24,\r\n                        2.75\r\n                    ],\r\n                    \"samples\": [\r\n                        [\r\n                            null\r\n                        ],\r\n                        [\r\n                            \"about 10 min walk from both Pu...\",\r\n                            \"tube: Earl's Court or West Bro...\",\r\n                            \"tube: Shepherd's Bush Market\"\r\n                        ]\r\n                    ],\r\n                    \"type\": [\r\n                        \"null\",\r\n                        \"string\"\r\n                    ]\r\n                },\r\n                \"email\": {\r\n                    \"#docs\": [\r\n                        106,\r\n                        3\r\n                    ],\r\n                    \"%docs\": [\r\n                        97.24,\r\n                        2.75\r\n                    ],\r\n                    \"samples\": [\r\n                        [\r\n                            null\r\n                        ],\r\n                        [\r\n                            \"enquiries@fulhamfc.com\",\r\n                            \"info@eco.co.uk\",\r\n                            \"notes@bushhallmusic.co.uk\"\r\n                        ]\r\n                    ],\r\n                    \"type\": [\r\n                        \"null\",\r\n                        \"string\"\r\n                    ]\r\n                },\r\n                \"geo\": {\r\n                    \"#docs\": 109,\r\n                    \"%docs\": 100,\r\n                    \"properties\": {\r\n                        \"accuracy\": {\r\n                            \"#docs\": 109,\r\n                            \"%docs\": 100,\r\n                            \"samples\": [\r\n                                \"APPROXIMATE\",\r\n                                \"RANGE_INTERPOLATED\",\r\n                                \"ROOFTOP\"\r\n                            ],\r\n                            \"type\": \"string\"\r\n                        },\r\n                        \"lat\": {\r\n                            \"#docs\": 109,\r\n                            \"%docs\": 100,\r\n                            \"samples\": [\r\n                                34.101757,\r\n                                44.037882130818225,\r\n                                51.4749,\r\n                                51.4888,\r\n                                51.5064\r\n                            ],\r\n                            \"type\": \"number\"\r\n                        },\r\n                        \"lon\": {\r\n                            \"#docs\": 109,\r\n                            \"%docs\": 100,\r\n                            \"samples\": [\r\n                                -118.338056,\r\n                                -0.2317,\r\n                                -0.2216,\r\n                                -0.1977,\r\n                                5.064881989019341\r\n                            ],\r\n                            \"type\": \"number\"\r\n                        }\r\n                    },\r\n                    \"samples\": [\r\n                        {\r\n                            \"accuracy\": \"APPROXIMATE\",\r\n                            \"lat\": 51.4749,\r\n                            \"lon\": -0.2216\r\n                        },\r\n                        {\r\n                            \"accuracy\": \"RANGE_INTERPOLATED\",\r\n                            \"lat\": 34.101757,\r\n                            \"lon\": -118.338056\r\n                        },\r\n                        {\r\n                            \"accuracy\": \"RANGE_INTERPOLATED\",\r\n                            \"lat\": 44.037882130818225,\r\n                            \"lon\": 5.064881989019341\r\n                        },\r\n                        {\r\n                            \"accuracy\": \"RANGE_INTERPOLATED\",\r\n                            \"lat\": 51.5064,\r\n                            \"lon\": -0.2317\r\n                        },\r\n                        {\r\n                            \"accuracy\": \"ROOFTOP\",\r\n                            \"lat\": 51.4888,\r\n                            \"lon\": -0.1977\r\n                        }\r\n                    ],\r\n                    \"type\": \"object\"\r\n                },\r\n                \"hours\": {\r\n                    \"#docs\": [\r\n                        108,\r\n                        1\r\n                    ],\r\n                    \"%docs\": [\r\n                        99.08,\r\n                        0.91\r\n                    ],\r\n                    \"samples\": [\r\n                        [\r\n                            null\r\n                        ],\r\n                        [\r\n                            \"10AM-midnight daily\"\r\n                        ]\r\n                    ],\r\n                    \"type\": [\r\n                        \"null\",\r\n                        \"string\"\r\n                    ]\r\n                },\r\n                \"id\": {\r\n                    \"#docs\": 109,\r\n                    \"%docs\": 100,\r\n                    \"samples\": [\r\n                        11755,\r\n                        16141,\r\n                        16149,\r\n                        16387,\r\n                        40348\r\n                    ],\r\n                    \"type\": \"number\"\r\n                },\r\n                \"image\": {\r\n                    \"#docs\": [\r\n                        1,\r\n                        108\r\n                    ],\r\n                    \"%docs\": [\r\n                        0.91,\r\n                        99.08\r\n                    ],\r\n                    \"samples\": [\r\n                        [\r\n                            null\r\n                        ],\r\n                        [\r\n                            \"https:\/\/en.wikivoyage.org\/wiki...\",\r\n                            \"https:\/\/en.wikivoyage.org\/wiki...\",\r\n                            \"https:\/\/en.wikivoyage.org\/wiki...\",\r\n                            \"https:\/\/en.wikivoyage.org\/wiki...\",\r\n                            \"https:\/\/en.wikivoyage.org\/wiki...\"\r\n                        ]\r\n                    ],\r\n                    \"type\": [\r\n                        \"null\",\r\n                        \"string\"\r\n                    ]\r\n                },\r\n                \"image_direct_url\": {\r\n                    \"#docs\": 7,\r\n                    \"%docs\": 6.42,\r\n                    \"samples\": [\r\n                        \"https:\/\/upload.wikimedia.org\/w...\",\r\n                        \"https:\/\/upload.wikimedia.org\/w...\",\r\n                        \"https:\/\/upload.wikimedia.org\/w...\",\r\n                        \"https:\/\/upload.wikimedia.org\/w...\",\r\n                        \"\"\r\n                    ],\r\n                    \"type\": \"string\"\r\n                },\r\n                \"name\": {\r\n                    \"#docs\": 109,\r\n                    \"%docs\": 100,\r\n                    \"samples\": [\r\n                        \"Bush Hall\",\r\n                        \"Earl's Court Exhibition Centre\",\r\n                        \"Fulham FC\",\r\n                        \"Hippodrome of Saint-Ponchon\",\r\n                        \"Hollywood Wax Museum\"\r\n                    ],\r\n                    \"type\": \"string\"\r\n                },\r\n                \"phone\": {\r\n                    \"#docs\": [\r\n                        106,\r\n                        3\r\n                    ],\r\n                    \"%docs\": [\r\n                        97.24,\r\n                        2.75\r\n                    ],\r\n                    \"samples\": [\r\n                        [\r\n                            null\r\n                        ],\r\n                        [\r\n                            \"+44 20 7385-1200\",\r\n                            \"+44 20 8222-6955\",\r\n                            \"+44 870 442 1222\"\r\n                        ]\r\n                    ],\r\n                    \"type\": [\r\n                        \"null\",\r\n                        \"string\"\r\n                    ]\r\n                },\r\n                \"price\": {\r\n                    \"#docs\": [\r\n                        108,\r\n                        1\r\n                    ],\r\n                    \"%docs\": [\r\n                        99.08,\r\n                        0.91\r\n                    ],\r\n                    \"samples\": [\r\n                        [\r\n                            null\r\n                        ],\r\n                        [\r\n                            \"Adults (13+) $15.95, children ...\"\r\n                        ]\r\n                    ],\r\n                    \"type\": [\r\n                        \"null\",\r\n                        \"string\"\r\n                    ]\r\n                },\r\n                \"state\": {\r\n                    \"#docs\": [\r\n                        3,\r\n                        106\r\n                    ],\r\n                    \"%docs\": [\r\n                        2.75,\r\n                        97.24\r\n                    ],\r\n                    \"samples\": [\r\n                        [\r\n                            null\r\n                        ],\r\n                        [\r\n                            \"Alsace-Champagne-Ardenne-Lorra...\",\r\n                            \"Basse-Normandie\",\r\n                            \"California\",\r\n                            \"Provence-Alpes-C\u00f4te d'Azur\",\r\n                            \"\u00cele-de-France\"\r\n                        ]\r\n                    ],\r\n                    \"type\": [\r\n                        \"null\",\r\n                        \"string\"\r\n                    ]\r\n                },\r\n                \"title\": {\r\n                    \"#docs\": 109,\r\n                    \"%docs\": 100,\r\n                    \"samples\": [\r\n                        \"Carpentras\",\r\n                        \"Hollywood\",\r\n                        \"London\/Hammersmith and Fulham\",\r\n                        \"London\/South Kensington-Chelse...\",\r\n                        \"Wales Coast Path\"\r\n                    ],\r\n                    \"type\": \"string\"\r\n                },\r\n                \"tollfree\": {\r\n                    \"#docs\": 109,\r\n                    \"%docs\": 100,\r\n                    \"samples\": [\r\n                        null\r\n                    ],\r\n                    \"type\": \"null\"\r\n                },\r\n                \"type\": {\r\n                    \"#docs\": 109,\r\n                    \"%docs\": 100,\r\n                    \"samples\": [\r\n                        \"landmark\"\r\n                    ],\r\n                    \"type\": \"string\"\r\n                },\r\n                \"url\": {\r\n                    \"#docs\": [\r\n                        106,\r\n                        3\r\n                    ],\r\n                    \"%docs\": [\r\n                        97.24,\r\n                        2.75\r\n                    ],\r\n                    \"samples\": [\r\n                        [\r\n                            null\r\n                        ],\r\n                        [\r\n                            \"https:\/\/www.bushhallmusic.co.uk...\",\r\n                            \"https:\/\/www.eco.co.uk\/\",\r\n                            \"https:\/\/www.fulhamfc.com\/\"\r\n                        ]\r\n                    ],\r\n                    \"type\": [\r\n                        \"null\",\r\n                        \"string\"\r\n                    ]\r\n                }\r\n            },\r\n            \"type\": \"object\"\r\n        },\r\n        {\r\n            \"#docs\": 23,\r\n            \"$schema\": \"https:\/\/json-schema.org\/draft-06\/schema\",\r\n            \"Flavor\": \"`type` = \\\"hotel\\\"\",\r\n            \"properties\": {\r\n                \"address\": {\r\n                    \"#docs\": [\r\n                        2,\r\n                        21\r\n                    ],\r\n                    \"%docs\": [\r\n                        8.69,\r\n                        91.3\r\n                    ],\r\n                    \"samples\": [\r\n                        [\r\n                            null\r\n                        ],\r\n                        [\r\n                            \"68, rue de Longchamp\",\r\n                            \"Capstone Road, ME7 3JE\",\r\n                            \"Gower Holiday Village, Scurlag...\",\r\n                            \"Knockard Road,PH16 5HJ, 0870 0...\",\r\n                            \"Llanbedrgoch\"\r\n                        ]\r\n                    ],\r\n                    \"type\": [\r\n                        \"null\",\r\n                        \"string\"\r\n                    ]\r\n                },\r\n                \"alias\": {\r\n                    \"#docs\": [\r\n                        22,\r\n                        1\r\n                    ],\r\n                    \"%docs\": [\r\n                        95.65,\r\n                        4.34\r\n                    ],\r\n                    \"samples\": [\r\n                        [\r\n                            null\r\n                        ],\r\n                        [\r\n                            \"former Concorde Lafayette\"\r\n                        ]\r\n                    ],\r\n                    \"type\": [\r\n                        \"null\",\r\n                        \"string\"\r\n                    ]\r\n                },\r\n                \"checkin\": {\r\n                    \"#docs\": [\r\n                        22,\r\n                        1\r\n                    ],\r\n                    \"%docs\": [\r\n                        95.65,\r\n                        4.34\r\n                    ],\r\n                    \"samples\": [\r\n                        [\r\n                            null\r\n                        ],\r\n                        [\r\n                            \"3PM\"\r\n                        ]\r\n                    ],\r\n                    \"type\": [\r\n                        \"null\",\r\n                        \"string\"\r\n                    ]\r\n                },\r\n                \"checkout\": {\r\n                    \"#docs\": [\r\n                        22,\r\n                        1\r\n                    ],\r\n                    \"%docs\": [\r\n                        95.65,\r\n                        4.34\r\n                    ],\r\n                    \"samples\": [\r\n                        [\r\n                            null\r\n                        ],\r\n                        [\r\n                            \"noon\"\r\n                        ]\r\n                    ],\r\n                    \"type\": [\r\n                        \"null\",\r\n                        \"string\"\r\n                    ]\r\n                },\r\n                \"city\": {\r\n                    \"#docs\": [\r\n                        1,\r\n                        22\r\n                    ],\r\n                    \"%docs\": [\r\n                        4.34,\r\n                        95.65\r\n                    ],\r\n                    \"samples\": [\r\n                        [\r\n                            null\r\n                        ],\r\n                        [\r\n                            \"Inyo County\",\r\n                            \"Medway\",\r\n                            \"Paris\",\r\n                            \"Pitlochry\",\r\n                            \"Riverside County\"\r\n                        ]\r\n                    ],\r\n                    \"type\": [\r\n                        \"null\",\r\n                        \"string\"\r\n                    ]\r\n                },\r\n                \"country\": {\r\n                    \"#docs\": 23,\r\n                    \"%docs\": 100,\r\n                    \"samples\": [\r\n                        \"France\",\r\n                        \"United Kingdom\",\r\n                        \"United States\"\r\n                    ],\r\n                    \"type\": \"string\"\r\n                },\r\n                \"description\": {\r\n                    \"#docs\": 23,\r\n                    \"%docs\": 100,\r\n                    \"samples\": [\r\n                        \"(Year Round).  This RV campgro...\",\r\n                        \"3-star boutique hotel.\",\r\n                        \"40 bed summer hostel about 3 m...\",\r\n                        \"Easily accessible from West En...\",\r\n                        \"Great 62 bed hostel near the t...\"\r\n                    ],\r\n                    \"type\": \"string\"\r\n                },\r\n                \"directions\": {\r\n                    \"#docs\": [\r\n                        22,\r\n                        1\r\n                    ],\r\n                    \"%docs\": [\r\n                        95.65,\r\n                        4.34\r\n                    ],\r\n                    \"samples\": [\r\n                        [\r\n                            null\r\n                        ],\r\n                        [\r\n                            \"downtown\"\r\n                        ]\r\n                    ],\r\n                    \"type\": [\r\n                        \"null\",\r\n                        \"string\"\r\n                    ]\r\n                },\r\n                \"email\": {\r\n                    \"#docs\": [\r\n                        22,\r\n                        1\r\n                    ],\r\n                    \"%docs\": [\r\n                        95.65,\r\n                        4.34\r\n                    ],\r\n                    \"samples\": [\r\n                        [\r\n                            null\r\n                        ],\r\n                        [\r\n                            \"julia@number38thegower.co.uk\"\r\n                        ]\r\n                    ],\r\n                    \"type\": [\r\n                        \"null\",\r\n                        \"string\"\r\n                    ]\r\n                },\r\n                \"fax\": {\r\n                    \"#docs\": [\r\n                        22,\r\n                        1\r\n                    ],\r\n                    \"%docs\": [\r\n                        95.65,\r\n                        4.34\r\n                    ],\r\n                    \"samples\": [\r\n                        [\r\n                            null\r\n                        ],\r\n                        [\r\n                            \"+1-310-821-8098\"\r\n                        ]\r\n                    ],\r\n                    \"type\": [\r\n                        \"null\",\r\n                        \"string\"\r\n                    ]\r\n                },\r\n                \"free_breakfast\": {\r\n                    \"#docs\": 23,\r\n                    \"%docs\": 100,\r\n                    \"samples\": [\r\n                        false,\r\n                        true\r\n                    ],\r\n                    \"type\": \"boolean\"\r\n                },\r\n                \"free_internet\": {\r\n                    \"#docs\": 23,\r\n                    \"%docs\": 100,\r\n                    \"samples\": [\r\n                        false,\r\n                        true\r\n                    ],\r\n                    \"type\": \"boolean\"\r\n                },\r\n                \"free_parking\": {\r\n                    \"#docs\": 23,\r\n                    \"%docs\": 100,\r\n                    \"samples\": [\r\n                        false,\r\n                        true\r\n                    ],\r\n                    \"type\": \"boolean\"\r\n                },\r\n                \"geo\": {\r\n                    \"#docs\": 23,\r\n                    \"%docs\": 100,\r\n                    \"properties\": {\r\n                        \"accuracy\": {\r\n                            \"#docs\": 23,\r\n                            \"%docs\": 100,\r\n                            \"samples\": [\r\n                                \"APPROXIMATE\",\r\n                                \"RANGE_INTERPOLATED\",\r\n                                \"ROOFTOP\"\r\n                            ],\r\n                            \"type\": \"string\"\r\n                        },\r\n                        \"lat\": {\r\n                            \"#docs\": 23,\r\n                            \"%docs\": 100,\r\n                            \"samples\": [\r\n                                33.9829,\r\n                                36.60545,\r\n                                48.86522,\r\n                                51.35785,\r\n                                56.7049\r\n                            ],\r\n                            \"type\": \"number\"\r\n                        },\r\n                        \"lon\": {\r\n                            \"#docs\": 23,\r\n                            \"%docs\": 100,\r\n                            \"samples\": [\r\n                                -117.14634,\r\n                                -116.1545,\r\n                                -3.7291,\r\n                                0.55818,\r\n                                2.28566\r\n                            ],\r\n                            \"type\": \"number\"\r\n                        }\r\n                    },\r\n                    \"samples\": [\r\n                        {\r\n                            \"accuracy\": \"APPROXIMATE\",\r\n                            \"lat\": 56.7049,\r\n                            \"lon\": -3.7291\r\n                        },\r\n                        {\r\n                            \"accuracy\": \"RANGE_INTERPOLATED\",\r\n                            \"lat\": 36.60545,\r\n                            \"lon\": -117.14634\r\n                        },\r\n                        {\r\n                            \"accuracy\": \"RANGE_INTERPOLATED\",\r\n                            \"lat\": 48.86522,\r\n                            \"lon\": 2.28566\r\n                        },\r\n                        {\r\n                            \"accuracy\": \"RANGE_INTERPOLATED\",\r\n                            \"lat\": 51.35785,\r\n                            \"lon\": 0.55818\r\n                        },\r\n                        {\r\n                            \"accuracy\": \"ROOFTOP\",\r\n                            \"lat\": 33.9829,\r\n                            \"lon\": -116.1545\r\n                        }\r\n                    ],\r\n                    \"type\": \"object\"\r\n                },\r\n                \"id\": {\r\n                    \"#docs\": 23,\r\n                    \"%docs\": 100,\r\n                    \"samples\": [\r\n                        7392,\r\n                        10025,\r\n                        12928,\r\n                        21663,\r\n                        22461\r\n                    ],\r\n                    \"type\": \"number\"\r\n                },\r\n                \"name\": {\r\n                    \"#docs\": 23,\r\n                    \"%docs\": 100,\r\n                    \"samples\": [\r\n                        \"Hotel Longchamp Elys\u00e9es\",\r\n                        \"Medway Youth Hostel\",\r\n                        \"Pitlochry Youth Hostel\",\r\n                        \"Ryan Campground\",\r\n                        \"Stovepipe Wells RV Campground\"\r\n                    ],\r\n                    \"type\": \"string\"\r\n                },\r\n                \"pets_ok\": {\r\n                    \"#docs\": 23,\r\n                    \"%docs\": 100,\r\n                    \"samples\": [\r\n                        false,\r\n                        true\r\n                    ],\r\n                    \"type\": \"boolean\"\r\n                },\r\n                \"phone\": {\r\n                    \"#docs\": [\r\n                        21,\r\n                        2\r\n                    ],\r\n                    \"%docs\": [\r\n                        91.3,\r\n                        8.69\r\n                    ],\r\n                    \"samples\": [\r\n                        [\r\n                            null\r\n                        ],\r\n                        [\r\n                            \"+44 1248 450051\",\r\n                            \"+44 870 770 5964\"\r\n                        ]\r\n                    ],\r\n                    \"type\": [\r\n                        \"null\",\r\n                        \"string\"\r\n                    ]\r\n                },\r\n                \"price\": {\r\n                    \"#docs\": [\r\n                        21,\r\n                        2\r\n                    ],\r\n                    \"%docs\": [\r\n                        91.3,\r\n                        8.69\r\n                    ],\r\n                    \"samples\": [\r\n                        [\r\n                            null\r\n                        ],\r\n                        [\r\n                            \"$10 per night\",\r\n                            \"$23 a night\"\r\n                        ]\r\n                    ],\r\n                    \"type\": [\r\n                        \"null\",\r\n                        \"string\"\r\n                    ]\r\n                },\r\n                \"public_likes\": {\r\n                    \"#docs\": 23,\r\n                    \"%docs\": 100,\r\n                    \"items\": {\r\n                        \"type\": \"string\"\r\n                    },\r\n                    \"maxItems\": 9,\r\n                    \"minItems\": 0,\r\n                    \"samples\": [\r\n                        [],\r\n                        [\r\n                            \"Julius Tromp I\",\r\n                            \"Corrine Hilll\",\r\n                            \"Jaeden McKenzie\",\r\n                            \"Vallie Ryan\",\r\n                            \"Brian Kilback\",\r\n                            \"Lilian McLaughlin\",\r\n                            \"Ms. Moses Feeney\",\r\n                            \"Elnora Trantow\"\r\n                        ],\r\n                        [\r\n                            \"Mr. Franco Collins\",\r\n                            \"Cloyd Stark\",\r\n                            \"Eliseo Herman\"\r\n                        ],\r\n                        [\r\n                            \"Ms. Wiley Torp\",\r\n                            \"Missouri Sauer\",\r\n                            \"Chanel Kirlin\",\r\n                            \"Trystan Rolfson\",\r\n                            \"Mr. Emma Oberbrunner\",\r\n                            \"Marina Stracke\",\r\n                            \"Cody Hand\",\r\n                            \"Tracey Price\",\r\n                            \"Raven Romaguera\"\r\n                        ],\r\n                        [\r\n                            \"Stefan Greenfelder\",\r\n                            \"Rosemary Doyle\",\r\n                            \"Abdullah Lindgren\",\r\n                            \"Gregorio Emard\"\r\n                        ]\r\n                    ],\r\n                    \"type\": \"array\"\r\n                },\r\n                \"reviews\": {\r\n                    \"#docs\": 23,\r\n                    \"%docs\": 100,\r\n                    \"items\": {\r\n                        \"#docs\": 3,\r\n                        \"$schema\": \"https:\/\/json-schema.org\/draft-06\/schema\",\r\n                        \"Flavor\": \"\",\r\n                        \"properties\": {\r\n                            \"author\": {\r\n                                \"#docs\": 3,\r\n                                \"%docs\": 100,\r\n                                \"samples\": [\r\n                                    \"Cornelius Brakus\",\r\n                                    \"Dorcas VonRueden\",\r\n                                    \"Jo Collier\"\r\n                                ],\r\n                                \"type\": \"string\"\r\n                            },\r\n                            \"content\": {\r\n                                \"#docs\": 3,\r\n                                \"%docs\": 100,\r\n                                \"samples\": [\r\n                                    \"A decent-sized room for the lo...\",\r\n                                    \"GOOD DEAL FOR THE PRICE AND LO...\",\r\n                                    \"Stay away of this hotel!! With...\"\r\n                                ],\r\n                                \"type\": \"string\"\r\n                            },\r\n                            \"date\": {\r\n                                \"#docs\": 3,\r\n                                \"%docs\": 100,\r\n                                \"samples\": [\r\n                                    \"2012-09-05 22:33:09 +0300\",\r\n                                    \"2012-09-11 19:21:15 +0300\",\r\n                                    \"2014-06-11 09:35:15 +0300\"\r\n                                ],\r\n                                \"type\": \"string\"\r\n                            },\r\n                            \"ratings\": {\r\n                                \"#docs\": 3,\r\n                                \"%docs\": 100,\r\n                                \"properties\": {\r\n                                    \"Business service (e.g., internet access)\": {\r\n                                        \"#docs\": 1,\r\n                                        \"%docs\": 33.33,\r\n                                        \"samples\": [\r\n                                            1\r\n                                        ],\r\n                                        \"type\": \"number\"\r\n                                    },\r\n                                    \"Check in \/ front desk\": {\r\n                                        \"#docs\": 2,\r\n                                        \"%docs\": 66.66,\r\n                                        \"samples\": [\r\n                                            2,\r\n                                            5\r\n                                        ],\r\n                                        \"type\": \"number\"\r\n                                    },\r\n                                    \"Cleanliness\": {\r\n                                        \"#docs\": 2,\r\n                                        \"%docs\": 66.66,\r\n                                        \"samples\": [\r\n                                            4,\r\n                                            5\r\n                                        ],\r\n                                        \"type\": \"number\"\r\n                                    },\r\n                                    \"Location\": {\r\n                                        \"#docs\": 3,\r\n                                        \"%docs\": 100,\r\n                                        \"samples\": [\r\n                                            2,\r\n                                            3,\r\n                                            5\r\n                                        ],\r\n                                        \"type\": \"number\"\r\n                                    },\r\n                                    \"Overall\": {\r\n                                        \"#docs\": 3,\r\n                                        \"%docs\": 100,\r\n                                        \"samples\": [\r\n                                            1,\r\n                                            4,\r\n                                            5\r\n                                        ],\r\n                                        \"type\": \"number\"\r\n                                    },\r\n                                    \"Rooms\": {\r\n                                        \"#docs\": 3,\r\n                                        \"%docs\": 100,\r\n                                        \"samples\": [\r\n                                            1,\r\n                                            3,\r\n                                            5\r\n                                        ],\r\n                                        \"type\": \"number\"\r\n                                    },\r\n                                    \"Service\": {\r\n                                        \"#docs\": 3,\r\n                                        \"%docs\": 100,\r\n                                        \"samples\": [\r\n                                            2,\r\n                                            3,\r\n                                            5\r\n                                        ],\r\n                                        \"type\": \"number\"\r\n                                    },\r\n                                    \"Value\": {\r\n                                        \"#docs\": 3,\r\n                                        \"%docs\": 100,\r\n                                        \"samples\": [\r\n                                            2,\r\n                                            5\r\n                                        ],\r\n                                        \"type\": \"number\"\r\n                                    }\r\n                                },\r\n                                \"samples\": [\r\n                                    {\r\n                                        \"Cleanliness\": 4,\r\n                                        \"Location\": 3,\r\n                                        \"Overall\": 4,\r\n                                        \"Rooms\": 3,\r\n                                        \"Service\": 3,\r\n                                        \"Value\": 5\r\n                                    }\r\n                                ],\r\n                                \"type\": \"object\"\r\n                            }\r\n                        },\r\n                        \"type\": \"object\"\r\n                    },\r\n                    \"maxItems\": 9,\r\n                    \"minItems\": 0,\r\n                    \"samples\": [\r\n                        [\r\n                            {\r\n                                \"author\": \"Bernhard Armstrong III\",\r\n                                \"content\": \"When I told the cab driver where I was staying, he did a double take. That should have been my warning but since I had no where else to go, I was stuck. To say this place is tired is an understatement. Upon entering, it took me about 10 minutes to locate the 'front desk'...which is little more than a recessed kiosk. I got to the elevator and into my room. The room was cavernous...very large and covered in old stained pink carpeting. The doors rattled and the lock didn't seem secure. At night, I wedged a chair against the door for added protection. This was a huge room but the sparse furniture in the room was all set around the walls and made the room uncomfortably large. The bed was set against one wall and the small tv was set all the way across the room on an old dresser. It was so far away, the remote didn't work unless I got out of bed and walked up a few feet. The casino itself is old...old...old. Carpeting is old, stained and tired. Much like the elephant's graveyard, I truly believe this is where gamblers to go die. I played some texas hold 'em there and true to some of the 'press' the owner sat down and played with us. He was a nice enough guy but has some serious health problems and drank himself into a stupor while playing. The drink lady obviously knew him well and had been there for years. She was visibly concerned about his health and questioned his drinking...which just aggrevated the owner. It was not a pleasant scene and was actually depressing. The owner eventually staggered away. While at the table, I struck up a conversation with the guy next to me. We were having a pleasant conversation and this particular dealer ragged on us incessantly about 'table talking'. I like social games and that's half the fun but this guy ragged us to the point that we quit tipping him. The other guy eventually told the dealer to go ---- himself and left and I followed suit. The casino is a block off from the Fremont Street Experience and block you have to cross is a concern. The cab driver warned me not to be out at night in that area. He said there were a lot of crack heads and they were known to mug people. I ended up playing downtown a lot but made my way back before dark each evening. Careful Kitty's is ok. It's an old diner. Food was alright and the service was friendly. There were lots of old tired-looking people hanging around who appeared to have health related problems. I'm truly sorry for these people but I was there to have fun and it was just depressing. I went back there once with my girlfriend to show her the place. She couldn't believe I actually stayed there. She played some slots and then said that the place 'creeped' her out and she wanted to leave NOW... I'll stay downtown anytime and actually prefer it to the strip but I'll never make this mistake again. The room was cheap but I paid a much higher price by sacrificing my enjoyment. I've been to Vegas many times and this was, by far, the worse experience I've ever had.\",\r\n                                \"date\": \"2012-03-26 11:54:35 +0300\",\r\n                                \"ratings\": {\r\n                                    \"Cleanliness\": 2,\r\n                                    \"Overall\": 1,\r\n                                    \"Rooms\": 1,\r\n                                    \"Service\": 3,\r\n                                    \"Value\": 1\r\n                                }\r\n                            }\r\n                        ],\r\n                        [\r\n                            {\r\n                                \"author\": \"Jo Collier\",\r\n                                \"content\": \"A decent-sized room for the low $100s two stops from Times Square on the express train. If you're looking to see New York (and not spend your days at your accommodation) Hotel Newton works very well. It's a nice place, seems well kept. Had no trouble at all-- worked great as a place to sleep and keep our stuff while we touristed. It is walking distance from few things, but the location's best because you're a block and a half from the 96th st station, which will take you downtown pretty quickly on an express train.\",\r\n                                \"date\": \"2014-06-11 09:35:15 +0300\",\r\n                                \"ratings\": {\r\n                                    \"Cleanliness\": 4,\r\n                                    \"Location\": 3,\r\n                                    \"Overall\": 4,\r\n                                    \"Rooms\": 3,\r\n                                    \"Service\": 3,\r\n                                    \"Value\": 5\r\n                                }\r\n                            },\r\n                            {\r\n                                \"author\": \"Cornelius Brakus\",\r\n                                \"content\": \"Stay away of this hotel!! With the same price you could have hotel with better location, clean room and own bathroom. Our room was very small, awfully cold, dirty (and the cleaning lady did not clean it while on our stay) and the shared bathroom was awful. Our stay did feel like we would be in a motel. Also, this is not a three star hotel as it did say on Booking.com, this is fairly a 1 star hotel, or more like a hostel.\",\r\n                                \"date\": \"2012-09-05 22:33:09 +0300\",\r\n                                \"ratings\": {\r\n                                    \"Business service (e.g., internet access)\": 1,\r\n                                    \"Check in \/ front desk\": 2,\r\n                                    \"Location\": 2,\r\n                                    \"Overall\": 1,\r\n                                    \"Rooms\": 1,\r\n                                    \"Service\": 2,\r\n                                    \"Value\": 2\r\n                                }\r\n                            },\r\n                            {\r\n                                \"author\": \"Dorcas VonRueden\",\r\n                                \"content\": \"GOOD DEAL FOR THE PRICE AND LOCATION,a friendly,helpful staff..rooms are clean,rm 502,503 view of broadway.. nothing to see but cars.. quiet ,safe area,,rite aid close by,mcdonald's for nite snacks. Sept 2008 visit, 4 adults 2 rooms,..saved 500.00-600.00 each by staying here instead of Sheraton or Park Central. The Newton hotel is ideally located on the main subway line at 96th Street. An express Brooklyn bound train takes you to the heart of Times Sqaure in just a few minutes. We would stay here again.. looked at many sites, not disappointed in the pick..\",\r\n                                \"date\": \"2012-09-11 19:21:15 +0300\",\r\n                                \"ratings\": {\r\n                                    \"Check in \/ front desk\": 5,\r\n                                    \"Cleanliness\": 5,\r\n                                    \"Location\": 5,\r\n                                    \"Overall\": 5,\r\n                                    \"Rooms\": 5,\r\n                                    \"Service\": 5,\r\n                                    \"Value\": 5\r\n                                }\r\n                            }\r\n                        ],\r\n                        [\r\n                            {\r\n                                \"author\": \"Joshua Rogahn\",\r\n                                \"content\": \"I am a very demanding traveller and the AVIA exceeded my expectations with the delivery of a 5 star hotel experience at a 3 star rate. Beautiful new hotel with outstanding room amenities (double sided fireplace, huge flatscreen TV's, tasteful and modern decoration, comfy beds etc.). Concierge was very helpful, connected and knowledgeable and it became readily apparent that she truly cares about the guests' experience in Napa. Restaurant recommendations were \\\"spot on\\\" and she booked us on a truly memorable, first class tour of the Napa Valley (at a fraction of the price and hassle of what we could have arranged ourselves). An all round excellent experience here.\",\r\n                                \"date\": \"2013-12-22 18:40:29 +0300\",\r\n                                \"ratings\": {\r\n                                    \"Overall\": 5\r\n                                }\r\n                            },\r\n                            {\r\n                                \"author\": \"Madisyn Greenholt\",\r\n                                \"content\": \"What a wonderful find! Nestled in the heart of downtown is this \\\"urban oasis\\\" that delivers a warm and hospitable lodging experience. A definite departure from some of the \\\"teddy bear and lace\\\" experiences from previous trips, the AVIA Napa starts and ends with you feeling as if you were a long-lost member of the family, home for a short visit. The rooms are comfortable and inviting. Appointed with luxurious linens that covered one of the most comfortable beds that we have ever slept in. The bathrooms are bright and spacious with plenty of room for two. Our room had a lovely soaking tub and a large flat screen television. The restaurant only serves breakfast and lunch, which works out fine since most people are out wine tasting or shopping during the day. Breakfast was a feast for the eyes and the stomach, offering everything from steel cut oatmeal to perfect omelets. The dinner menu features a variety of delectable \\\"small plates\\\" with something for every palate. Everything was very good!\",\r\n                                \"date\": \"2013-11-10 19:53:53 +0300\",\r\n                                \"ratings\": {\r\n                                    \"Cleanliness\": 5,\r\n                                    \"Location\": 5,\r\n                                    \"Overall\": 5,\r\n                                    \"Rooms\": 5,\r\n                                    \"Service\": 5,\r\n                                    \"Value\": 5\r\n                                }\r\n                            },\r\n                            {\r\n                                \"author\": \"Griffin Barton\",\r\n                                \"content\": \"stayed here during my last trip. the rooms are clean. bathroom is big but not that functional. free wifi and bottled water. location is quite a walk from nathan road, so if you intent to go back and forth your hotel room you might find it a task. there is noise that you can hear inside the room on weekend nights because there are clubs near the hotel. overall it is still good value!\",\r\n                                \"date\": \"2014-05-05 23:33:30 +0300\",\r\n                                \"ratings\": {\r\n                                    \"Cleanliness\": 5,\r\n                                    \"Location\": 4,\r\n                                    \"Overall\": 5,\r\n                                    \"Rooms\": 5,\r\n                                    \"Service\": 4,\r\n                                    \"Sleep Quality\": 5,\r\n                                    \"Value\": 5\r\n                                }\r\n                            },\r\n                            {\r\n                                \"author\": \"Marguerite Crist\",\r\n                                \"content\": \"Good location! Worth it to spend a little more on the deluxe room. Although for some weird reason the lift always smelled of cigarettes! Don't know why?!? Non smoking rooms no smell.\",\r\n                                \"date\": \"2013-10-21 19:04:09 +0300\",\r\n                                \"ratings\": {\r\n                                    \"Cleanliness\": 4,\r\n                                    \"Location\": 5,\r\n                                    \"Overall\": 4,\r\n                                    \"Rooms\": 4,\r\n                                    \"Service\": 3,\r\n                                    \"Value\": 3\r\n                                }\r\n                            }\r\n                        ],\r\n                        [\r\n                            {\r\n                                \"author\": \"Miss Alycia Schulist\",\r\n                                \"content\": \"Such an awesome &amp; trendy hotel! As my husband says : 'Off it's head' Wish we got to stay longer. A surpise or two in our room each day, from lolliops to water to chocolates. Cant wait to get back there\",\r\n                                \"date\": \"2015-08-06 06:15:56 +0300\",\r\n                                \"ratings\": {\r\n                                    \"Cleanliness\": 5,\r\n                                    \"Overall\": 5,\r\n                                    \"Service\": 5,\r\n                                    \"Sleep Quality\": 5,\r\n                                    \"Value\": 5\r\n                                }\r\n                            },\r\n                            {\r\n                                \"author\": \"Reynold O'Connell\",\r\n                                \"content\": \"We have just returned from a flying visit to Barcelona to visit family and friends. A great excuse to travel at any time but now having had the \\\"ME experience\\\" we are saving the pennies (or cents) at a furious rate so we can head back as soon as possible. The hotel is located just off Avenguda Diagonal, not so far from the \\\"Gherkin\\\" building and was easily reached by airport bus transfer and short taxi ride. First impressions at reception were very good indeed. It is a boutique style hotel and the mood is nicely understated - not pretentious but very welcoming. After a speedy check - in we were shown to our rooms on the 23 rd floor. We were very fortunate to be able to have booked a suite and nothing at all disappointed, from the spectacular views of the city to the high quality furnishings and extras provided. All the electronics are Sony, Philips etc. and the bathroom complimentaries are all high quality brands. The hotel provides just about everything in the room for your stay as standard and anything else is just a phone call to reception away. Our rooms also meant that we had access to the \\\"Level\\\". This is a lounge on the 25 th floor where guests can avail themselves of complimentary beer, wine, spirits and light snacks which are refreshed throughout the day. It's a great place to meet for breakfast or for drinks before you venture out into the city. The hotel restaurant has recently been awarded it's first Michelin star and we met the chef on a tour of the hotel. He took great pleasure in showing us his kitchens which were prepping up for that evenings sittings. And that also sums up the whole attitude of the staff at this hotel. They are all obviously proud of their hotel and the work that they do in there. If they can do anything for you, it is done well and with a lovely manner. Our stay in Barcelona was greatly enhanced by our stay in the ME hotel - I hope yours will be too\",\r\n                                \"date\": \"2014-05-11 05:34:53 +0300\",\r\n                                \"ratings\": {\r\n                                    \"Cleanliness\": 5,\r\n                                    \"Location\": 4,\r\n                                    \"Overall\": 5,\r\n                                    \"Rooms\": 5,\r\n                                    \"Service\": 5,\r\n                                    \"Sleep Quality\": 5,\r\n                                    \"Value\": 5\r\n                                }\r\n                            },\r\n                            {\r\n                                \"author\": \"Elton Willms IV\",\r\n                                \"content\": \"When you arrive after a day of sightseeing at 5:30pm and your room is not yet cleaned... I leave it up to you to decide whether this is your type of hotel. So now you have to wait out in the passage or the foyer for them to clean the room...! (NO we did NOT accidentally leave the \\\"Do not disturb\\\" signs on the door or anything else that could have prevented them from cleaning the room - we were out of the room at 9am) Also have the following comments on the hotel; 1. Rooms on the small side 2. No Tea\/Coffee facilities in the room - Room service took 35min to deliver 4 coffees at a cost of around EUR 20 3. No bath - sure the hotel is funcky but a nice bath after a day out is really nice 4. Agree with previous reviewer regarding the light\/curtain swithes that can be confusing. I'm in IT and it took me a while to work it out. The curtain slider in our room was out of order. 5. Lighting in the room not suitable for getting any work done. Some people are lucky to go on a work trip or vacation without having to work at night, well I had to and it was very taxing on the eyes. 6. Location is NOT close to La Rambla or Gothic Q as suggested by other reviewers. No quick return to the hotel. Nearest tube station about 3 blocks away. Must say it is nice and quiet. 7. Privacy in bathroom. Guess some guests may find it spectacular - not me. If price is your determining factor, you may enjoy this hotel. Please do not expect old world charm. This is all very modern steel and glass.\",\r\n                                \"date\": \"2014-06-09 15:13:13 +0300\",\r\n                                \"ratings\": {\r\n                                    \"Cleanliness\": 3,\r\n                                    \"Location\": 2,\r\n                                    \"Overall\": 2,\r\n                                    \"Rooms\": 2,\r\n                                    \"Service\": 2,\r\n                                    \"Sleep Quality\": 2,\r\n                                    \"Value\": 3\r\n                                }\r\n                            },\r\n                            {\r\n                                \"author\": \"Arjun Turner\",\r\n                                \"content\": \"We (me and my husband ) have been to many hotels all over Europe but I really don't think we will visit this particular one in the future again.We stayed at ME Barcelona between 11\/09 to 17\/09 during a medical congress my husband had to attend .Our room was viewing the pool and part of the city (it was at the 7th floor) ,but it wasn't the location that mattered at all .The room had only a chair next to the desk and a sofa beside the bed itself . There was no lamp on the desk and the lamp over the sofa didn't work .Also my reading lamp (on my side of the bed ) didn't work .The lighting therefore was very poor for anyone who would like to work or write or read . The only bearable spot to do all that was just ONE SIDE OF THE BED .Beside all this , (and the most annoying ) every time the shower in the room just over our own was used , water was running inside our OWN shower from the ceiling . Shall I mention that TV didn't work ? ( we didn't care about this that much though) .We mentioned the lamps and the shower problem to the concierge ( all of them are very friendly and speak very good english ) and as a result somebody knocked our door once and mentioned the lamps but at that particular time I was resting and couldn't receive him .No second attempt was made after that apparently . To the positive side I will mention that due to a party that would have taken place during our last night at the hotel we were offered a level room (20th floor )to avoid the inconvenience of the noise, where all lamps were working at least and you wouldn't have to fret if your unknown upper level neighbor would think to take his\/her shower at the same time as you. Beside that ,breakfast was decent and for all that are kin in modern cold design the hotel is a treat .The area is a disadvantage though , the stench from the sewers was at some points unbearable the minute you stepped outside the hotel gate.\",\r\n                                \"date\": \"2014-09-08 13:41:38 +0300\",\r\n                                \"ratings\": {\r\n                                    \"Cleanliness\": 3,\r\n                                    \"Location\": 2,\r\n                                    \"Overall\": 2,\r\n                                    \"Rooms\": 2,\r\n                                    \"Service\": 2,\r\n                                    \"Sleep Quality\": 4,\r\n                                    \"Value\": 2\r\n                                }\r\n                            },\r\n                            {\r\n                                \"author\": \"Miss Abelardo Mitchell\",\r\n                                \"content\": \"We stayed here for 4 nights in June having just spent 3 nights in the W Barcelona. We booked on Last Minute.com so got a cheaper price than normal room rates however it was still more expensive than other hotels closer to the city centre. We were wanting a bit of luxury for a week and thought Barcelona was ideal for a part relaxing beach\/sun holiday and part city break. We only booked this hotel because it had a pool and a 5* rating. We arrived at the hotel and the check-in queue was enormous so we had a relaxing drink in the comfortable bar area. To be fair check in was quick once we got the front of the queue but the entire foyer area smelt a bit wierd. The place is trying too hard to be cool with dubious colour choices for furnishings and steel walls??!!! Our room was ok the bed very comfortable and we got a good nights sleep (we were woken every morning by the maids at about 9am though). The bathroom had no extractor ran that we could find and after a shower the condensation ran down the glass panel separating the room from the bathroom and left dirty marks on the window ledge. I wouldn't say the room was spotless but it was adequate. This hotel was in quite a poor location - ok so fairly close to the nearest tube station (10 mins walk) and tram stop (5 mins) but a way out of the city. Cabs in barcelona are fairly cheap though so this isn't really a massive issue. The worst part about our stay was that on our last day we were enjoying the sun in the pool area when we were asked to leave due to there being a private party in the area. There was no pre warning or notification of this and we had to get up and tramp down to the beach via the tube to enjoy our last day of sun (I am 5 months pregnant with twins so was hoping for a relaxing day!!!!!!!!) I wouldn't recommend this hotel if you are expecting 5* luxury. If you are happy for 3-4* quality and service in a fairly poor location this hotel could just be for you!\",\r\n                                \"date\": \"2013-11-27 03:52:23 +0300\",\r\n                                \"ratings\": {\r\n                                    \"Cleanliness\": 2,\r\n                                    \"Location\": 1,\r\n                                    \"Overall\": 3,\r\n                                    \"Rooms\": 3,\r\n                                    \"Service\": 2,\r\n                                    \"Sleep Quality\": 4,\r\n                                    \"Value\": 2\r\n                                }\r\n                            },\r\n                            {\r\n                                \"author\": \"Abdullah Lubowitz\",\r\n                                \"content\": \"... all that glitters, is not gold and the Hotel Me really didn't hit a good note with me. We were here for a business convention and on first look, the hotel and the rooms look great - until you try to utilise them. The hotel is a taxi ride to any tourist areas of Barcelona or a 30 min walk. There is a decent area about 8 mins walk for restaurants but this is NOT a city centre hotel. The rooms are attempting to be model and minimalist but end up being unfunctional and uncomfortable. Here's my room issues: 1. No kettle\/coffee maker in the room. Virtually unheard of in a hotel of it's \\\"class\\\". 2. Cement floor in room, slippery when wet and cold. Carpets, wood, whatever ... not this cheap alternative. 3. Chair at desk is not a work station chair but a cheap, \\\"trendy\\\" plastic design - not good. 4. Impossible to shower without getting the bathroom floor drenched. 5. The wrap around curtain on 2 walls ... whose idea was this? Only one wall is window but the curtain covers both and is VERY slow on it's automatic open\/close. Furthermore, it didn't close all the way and left a 3 inch gap for the light to stream in at 6am. 6. There is a control panel for all the lights and AC. Each button pressed done something different, each time. Everybody I spoke to had this problem. 7 Outrageously priced mini-bar and room service (18Euro for a hamburger) and as your miles from anyway, it's a good weight loss hotel! Beds were good, TV was ok, other bathroom facilities good - and their maid service is some of the best I've seen. Other problems. Bar staff are worthless. People waiting to be served, while 2 of them stocked and cleaned, 1 served - very slowly. 5euro for a 330ml glass of tap beer is twice the price of anywhere we drank. Outside the elevators on every floor smelled of toilets - probably because the rooms toilets backed onto that area. Poor ventilation? Breakfast is a very generous 11am finish except at weekends when it's even better at 12noon. Arriving at 11.05 on a Saturday, we were told it was finished. Questioning why, \\\"because we have to set up for a lunch meeting in this room\\\". Even though we told her the note in the room said 12, when we checked in we were told 12 - she said there is nothing she could do, even though we could see a full buffet breakfast table and people eating. It was only after demanding a manager that another staff member made a call and let us in - it should not have came to this. Smokers - forget it if it rains, there is no area even remotely or partially covered outside! Overall, this hotel just failed. It has a few good points but it's not comfortable, doesn't provide you a feeling of luxury or a level of relaxation and just feels a bit like they don't know what they're doing.\",\r\n                                \"date\": \"2012-03-29 11:12:46 +0300\",\r\n                                \"ratings\": {\r\n                                    \"Cleanliness\": 5,\r\n                                    \"Location\": 1,\r\n                                    \"Overall\": 2,\r\n                                    \"Rooms\": 2,\r\n                                    \"Service\": 3,\r\n                                    \"Sleep Quality\": 2,\r\n                                    \"Value\": 1\r\n                                }\r\n                            },\r\n                            {\r\n                                \"author\": \"Kory Schultz\",\r\n                                \"content\": \"We were booked into the ME for 9 nights, we checked out after 3, staff were very unfriendly and unhelpfull. the rooms are among the smallest Ive ever stayed in. Cannot understand how this hotel got rated with 5 star, no way, 3 star at best..The walls in room were marked, the corridors looked as if thay had never been hoovered. The sockets were loose. On the 2nd day, no one cleaned our room or made bed, we had to ring twice for toilet rolls and towels, The air con did not go down past 23. We couldnt wait to check out, we moved to the arts hotel where we found a real 5 star hotel\",\r\n                                \"date\": \"2014-05-19 00:36:42 +0300\",\r\n                                \"ratings\": {\r\n                                    \"Cleanliness\": 1,\r\n                                    \"Location\": 2,\r\n                                    \"Overall\": 1,\r\n                                    \"Rooms\": 1,\r\n                                    \"Service\": 1,\r\n                                    \"Value\": 1\r\n                                }\r\n                            },\r\n                            {\r\n                                \"author\": \"Curt Nolan\",\r\n                                \"content\": \"A visually stunning hotel. The rooms were compact but very well designed. No hint of problems with smells, music and drains that have been mentioned on previous reviews. BUT - two big problems: 1. After being told that I was entitled to one item of clothing to be ironed per day - complimentary, I gave my shirt to the very charming lady who showed me my room. The shirt didn't turn up until 45 minutes after I was supposed to leave the following morning making me late for a meeting. I also had to make several calls to get the shirt back. 2. The 22 Euro club sandwich and fries was inedible. A disgrace. It doesn't matter how beautiful and stylish a hotel is, if it can't get the basics right - it should and will fail. I would have whole heartedly recommended this hotel at 9pm on my day of arrival - now, I wouldn't. That's why it's a shame.\",\r\n                                \"date\": \"2014-08-09 00:49:46 +0300\",\r\n                                \"ratings\": {\r\n                                    \"Cleanliness\": 5,\r\n                                    \"Location\": 3,\r\n                                    \"Overall\": 2,\r\n                                    \"Rooms\": 5,\r\n                                    \"Service\": 1,\r\n                                    \"Value\": 3\r\n                                }\r\n                            }\r\n                        ],\r\n                        [\r\n                            {\r\n                                \"author\": \"Ozella Sipes\",\r\n                                \"content\": \"This was our 2nd trip here and we enjoyed it as much or more than last year. Excellent location across from the French Market and just across the street from the streetcar stop. Very convenient to several small but good restaurants. Very clean and well maintained. Housekeeping and other staff are all friendly and helpful. We really enjoyed sitting on the 2nd floor terrace over the entrance and \\\"people-watching\\\" on Esplanade Ave., also talking with our fellow guests. Some furniture could use a little updating or replacement, but nothing major.\",\r\n                                \"date\": \"2013-06-22 18:33:50 +0300\",\r\n                                \"ratings\": {\r\n                                    \"Cleanliness\": 5,\r\n                                    \"Location\": 4,\r\n                                    \"Overall\": 4,\r\n                                    \"Rooms\": 3,\r\n                                    \"Service\": 5,\r\n                                    \"Value\": 4\r\n                                }\r\n                            },\r\n                            {\r\n                                \"author\": \"Barton Marks\",\r\n                                \"content\": \"We found the hotel de la Monnaie through Interval and we thought we'd give it a try while we attended a conference in New Orleans. This place was a perfect location and it definitely beat staying downtown at the Hilton with the rest of the attendees. We were right on the edge of the French Quarter withing walking distance of the whole area. The location on Esplanade is more of a residential area so you are near the fun but far enough away to enjoy some quiet downtime. We loved the trolly car right across the street and we took that down to the conference center for the conference days we attended. We also took it up Canal Street and nearly delivered to the WWII museum. From there we were able to catch a ride to the Garden District - a must see if you love old architecture - beautiful old homes(mansions). We at lunch ate Joey K's there and it was excellent. We ate so many places in the French Quarter I can't remember all the names. My husband loved all the NOL foods - gumbo, jambalya and more. I'm glad we found the Louisiana Pizza Kitchen right on the other side of the U.S. Mint (across the street from Monnaie). Small little spot but excellent pizza! The day we arrived was a huge jazz festival going on across the street. However, once in our rooms, you couldn't hear any outside noise. Just the train at night blowin it's whistle! We enjoyed being so close to the French Market and within walking distance of all the sites to see. And you can't pass up the Cafe du Monde down the street - a busy happenning place with the best French dougnuts!!!Delicious! We will defintely come back and would stay here again. We were not hounded to purchase anything. My husband only received one phone call regarding timeshare and the woman was very pleasant. The staff was laid back and friendly. My only complaint was the very firm bed. Other than that, we really enjoyed our stay. Thanks Hotel de la Monnaie!\",\r\n                                \"date\": \"2015-03-02 19:56:13 +0300\",\r\n                                \"ratings\": {\r\n                                    \"Business service (e.g., internet access)\": 4,\r\n                                    \"Check in \/ front desk\": 4,\r\n                                    \"Cleanliness\": 4,\r\n                                    \"Location\": 4,\r\n                                    \"Overall\": 4,\r\n                                    \"Rooms\": 3,\r\n                                    \"Service\": 3,\r\n                                    \"Value\": 5\r\n                                }\r\n                            }\r\n                        ]\r\n                    ],\r\n                    \"type\": \"array\"\r\n                },\r\n                \"state\": {\r\n                    \"#docs\": [\r\n                        21,\r\n                        2\r\n                    ],\r\n                    \"%docs\": [\r\n                        91.3,\r\n                        8.69\r\n                    ],\r\n                    \"samples\": [\r\n                        [\r\n                            null\r\n                        ],\r\n                        [\r\n                            \"California\"\r\n                        ]\r\n                    ],\r\n                    \"type\": [\r\n                        \"null\",\r\n                        \"string\"\r\n                    ]\r\n                },\r\n                \"title\": {\r\n                    \"#docs\": 23,\r\n                    \"%docs\": 100,\r\n                    \"samples\": [\r\n                        \"Death Valley National Park\",\r\n                        \"Gillingham (Kent)\",\r\n                        \"Joshua Tree National Park\",\r\n                        \"Paris\/16th arrondissement\",\r\n                        \"Pitlochry\"\r\n                    ],\r\n                    \"type\": \"string\"\r\n                },\r\n                \"tollfree\": {\r\n                    \"#docs\": [\r\n                        22,\r\n                        1\r\n                    ],\r\n                    \"%docs\": [\r\n                        95.65,\r\n                        4.34\r\n                    ],\r\n                    \"samples\": [\r\n                        [\r\n                            null\r\n                        ],\r\n                        [\r\n                            \"+1-000-821-8277\"\r\n                        ]\r\n                    ],\r\n                    \"type\": [\r\n                        \"null\",\r\n                        \"string\"\r\n                    ]\r\n                },\r\n                \"type\": {\r\n                    \"#docs\": 23,\r\n                    \"%docs\": 100,\r\n                    \"samples\": [\r\n                        \"hotel\"\r\n                    ],\r\n                    \"type\": \"string\"\r\n                },\r\n                \"url\": {\r\n                    \"#docs\": [\r\n                        2,\r\n                        21\r\n                    ],\r\n                    \"%docs\": [\r\n                        8.69,\r\n                        91.3\r\n                    ],\r\n                    \"samples\": [\r\n                        [\r\n                            null\r\n                        ],\r\n                        [\r\n                            \"https:\/\/paris-hotel-longchamp.c...\",\r\n                            \"https:\/\/www.number38thegower.co...\",\r\n                            \"https:\/\/www.syha.org.uk\/hostels...\",\r\n                            \"https:\/\/www.walestouristsonline...\",\r\n                            \"https:\/\/www.yha.org.uk\"\r\n                        ]\r\n                    ],\r\n                    \"type\": [\r\n                        \"null\",\r\n                        \"string\"\r\n                    ]\r\n                },\r\n                \"vacancy\": {\r\n                    \"#docs\": 23,\r\n                    \"%docs\": 100,\r\n                    \"samples\": [\r\n                        false,\r\n                        true\r\n                    ],\r\n                    \"type\": \"boolean\"\r\n                }\r\n            },\r\n            \"type\": \"object\"\r\n        },\r\n        {\r\n            \"#docs\": 3,\r\n            \"$schema\": \"https:\/\/json-schema.org\/draft-06\/schema\",\r\n            \"Flavor\": \"`type` = \\\"airline\\\"\",\r\n            \"properties\": {\r\n                \"callsign\": {\r\n                    \"#docs\": 3,\r\n                    \"%docs\": 100,\r\n                    \"samples\": [\r\n                        \"BEE MED\",\r\n                        \"CYCLONE\",\r\n                        \"REUNION\"\r\n                    ],\r\n                    \"type\": \"string\"\r\n                },\r\n                \"country\": {\r\n                    \"#docs\": 3,\r\n                    \"%docs\": 100,\r\n                    \"samples\": [\r\n                        \"France\",\r\n                        \"United Kingdom\",\r\n                        \"United States\"\r\n                    ],\r\n                    \"type\": \"string\"\r\n                },\r\n                \"iata\": {\r\n                    \"#docs\": 3,\r\n                    \"%docs\": 100,\r\n                    \"samples\": [\r\n                        \"KJ\",\r\n                        \"UU\",\r\n                        \"ZA\"\r\n                    ],\r\n                    \"type\": \"string\"\r\n                },\r\n                \"icao\": {\r\n                    \"#docs\": 3,\r\n                    \"%docs\": 100,\r\n                    \"samples\": [\r\n                        \"CYD\",\r\n                        \"LAJ\",\r\n                        \"REU\"\r\n                    ],\r\n                    \"type\": \"string\"\r\n                },\r\n                \"id\": {\r\n                    \"#docs\": 3,\r\n                    \"%docs\": 100,\r\n                    \"samples\": [\r\n                        792,\r\n                        1191,\r\n                        1543\r\n                    ],\r\n                    \"type\": \"number\"\r\n                },\r\n                \"name\": {\r\n                    \"#docs\": 3,\r\n                    \"%docs\": 100,\r\n                    \"samples\": [\r\n                        \"Access Air\",\r\n                        \"Air Austral\",\r\n                        \"British Mediterranean Airways\"\r\n                    ],\r\n                    \"type\": \"string\"\r\n                },\r\n                \"type\": {\r\n                    \"#docs\": 3,\r\n                    \"%docs\": 100,\r\n                    \"samples\": [\r\n                        \"airline\"\r\n                    ],\r\n                    \"type\": \"string\"\r\n                }\r\n            },\r\n            \"type\": \"object\"\r\n        },\r\n        {\r\n            \"#docs\": 49,\r\n            \"$schema\": \"https:\/\/json-schema.org\/draft-06\/schema\",\r\n            \"Flavor\": \"`type` = \\\"airport\\\"\",\r\n            \"properties\": {\r\n                \"airportname\": {\r\n                    \"#docs\": 49,\r\n                    \"%docs\": 100,\r\n                    \"samples\": [\r\n                        \"Hickam Air Force Base\",\r\n                        \"Joigny\",\r\n                        \"RNAS WATTON\",\r\n                        \"Sky Ranch at Carefree\",\r\n                        \"Villaroche\"\r\n                    ],\r\n                    \"type\": \"string\"\r\n                },\r\n                \"city\": {\r\n                    \"#docs\": 49,\r\n                    \"%docs\": 100,\r\n                    \"samples\": [\r\n                        \"Carefree\",\r\n                        \"Honolulu\",\r\n                        \"Joigny\",\r\n                        \"Melun\",\r\n                        \"WATTON\"\r\n                    ],\r\n                    \"type\": \"string\"\r\n                },\r\n                \"country\": {\r\n                    \"#docs\": 49,\r\n                    \"%docs\": 100,\r\n                    \"samples\": [\r\n                        \"France\",\r\n                        \"United Kingdom\",\r\n                        \"United States\"\r\n                    ],\r\n                    \"type\": \"string\"\r\n                },\r\n                \"faa\": {\r\n                    \"#docs\": [\r\n                        13,\r\n                        36\r\n                    ],\r\n                    \"%docs\": [\r\n                        26.53,\r\n                        73.46\r\n                    ],\r\n                    \"samples\": [\r\n                        [\r\n                            null\r\n                        ],\r\n                        [\r\n                            \"BZR\",\r\n                            \"GRI\",\r\n                            \"IGQ\",\r\n                            \"PRC\",\r\n                            \"RCA\"\r\n                        ]\r\n                    ],\r\n                    \"type\": [\r\n                        \"null\",\r\n                        \"string\"\r\n                    ]\r\n                },\r\n                \"geo\": {\r\n                    \"#docs\": 49,\r\n                    \"%docs\": 100,\r\n                    \"properties\": {\r\n                        \"alt\": {\r\n                            \"#docs\": 49,\r\n                            \"%docs\": 100,\r\n                            \"samples\": [\r\n                                13,\r\n                                173,\r\n                                302,\r\n                                732,\r\n                                2568\r\n                            ],\r\n                            \"type\": \"number\"\r\n                        },\r\n                        \"lat\": {\r\n                            \"#docs\": 49,\r\n                            \"%docs\": 100,\r\n                            \"samples\": [\r\n                                21.318681,\r\n                                33.8180947,\r\n                                47.992222,\r\n                                48.604725,\r\n                                52.33\r\n                            ],\r\n                            \"type\": \"number\"\r\n                        },\r\n                        \"lon\": {\r\n                            \"#docs\": 49,\r\n                            \"%docs\": 100,\r\n                            \"samples\": [\r\n                                -157.922427,\r\n                                -111.8979242,\r\n                                0.51,\r\n                                2.671119,\r\n                                3.392222\r\n                            ],\r\n                            \"type\": \"number\"\r\n                        }\r\n                    },\r\n                    \"samples\": [\r\n                        {\r\n                            \"alt\": 13,\r\n                            \"lat\": 21.318681,\r\n                            \"lon\": -157.922427\r\n                        },\r\n                        {\r\n                            \"alt\": 173,\r\n                            \"lat\": 52.33,\r\n                            \"lon\": 0.51\r\n                        },\r\n                        {\r\n                            \"alt\": 302,\r\n                            \"lat\": 48.604725,\r\n                            \"lon\": 2.671119\r\n                        },\r\n                        {\r\n                            \"alt\": 732,\r\n                            \"lat\": 47.992222,\r\n                            \"lon\": 3.392222\r\n                        },\r\n                        {\r\n                            \"alt\": 2568,\r\n                            \"lat\": 33.8180947,\r\n                            \"lon\": -111.8979242\r\n                        }\r\n                    ],\r\n                    \"type\": \"object\"\r\n                },\r\n                \"icao\": {\r\n                    \"#docs\": [\r\n                        7,\r\n                        42\r\n                    ],\r\n                    \"%docs\": [\r\n                        14.28,\r\n                        85.71\r\n                    ],\r\n                    \"samples\": [\r\n                        [\r\n                            null\r\n                        ],\r\n                        [\r\n                            \"18AZ\",\r\n                            \"EGYR\",\r\n                            \"LFGK\",\r\n                            \"LFPM\",\r\n                            \"PHIK\"\r\n                        ]\r\n                    ],\r\n                    \"type\": [\r\n                        \"null\",\r\n                        \"string\"\r\n                    ]\r\n                },\r\n                \"id\": {\r\n                    \"#docs\": 49,\r\n                    \"%docs\": 100,\r\n                    \"samples\": [\r\n                        1310,\r\n                        1384,\r\n                        4346,\r\n                        7055,\r\n                        8397\r\n                    ],\r\n                    \"type\": \"number\"\r\n                },\r\n                \"type\": {\r\n                    \"#docs\": 49,\r\n                    \"%docs\": 100,\r\n                    \"samples\": [\r\n                        \"airport\"\r\n                    ],\r\n                    \"type\": \"string\"\r\n                },\r\n                \"tz\": {\r\n                    \"#docs\": 49,\r\n                    \"%docs\": 100,\r\n                    \"samples\": [\r\n                        \"America\/Phoenix\",\r\n                        \"Europe\/London\",\r\n                        \"Europe\/Paris\",\r\n                        \"N\",\r\n                        \"Pacific\/Honolulu\"\r\n                    ],\r\n                    \"type\": \"string\"\r\n                }\r\n            },\r\n            \"type\": \"object\"\r\n        }\r\n    ]\r\n    ],\r\n    \"status\": \"success\",\r\n    \"metrics\": {\r\n        \"elapsedTime\": \"441.291712ms\",\r\n        \"executionTime\": \"441.241719ms\",\r\n        \"resultCount\": 1,\r\n        \"resultSize\": 103887\r\n    },\r\n    \"profile\": {\r\n        \"phaseTimes\": {\r\n\t    \"authorize\": \"753.932\u00b5s\",\r\n\t    \"instantiate\": \"6.388\u00b5s\",\r\n\t    \"parse\": \"151.233\u00b5s\",\r\n\t    \"plan\": \"7.117\u00b5s\",\r\n\t    \"run\": \"441.069318ms\"\r\n\t},\r\n        \"phaseOperators\": {\r\n\t    \"authorize\": 1\r\n\t},\r\n        \"executionTimings\": {\r\n\t    \"#operator\": \"Authorize\",\r\n\t    \"#stats\": {\r\n\t        \"#phaseSwitches\": 4,\r\n\t        \"execTime\": \"1.738\u00b5s\",\r\n\t        \"servTime\": \"752.194\u00b5s\"\r\n\t    },\r\n\t    \"privileges\": {\r\n\t        \"List\": [\r\n\t            {\r\n\t                \"Target\": \"travel-sample\",\r\n\t                \"Priv\": 7\r\n\t            }\r\n\t        ]\r\n\t    },\r\n\t    \"~child\": {\r\n\t        \"#operator\": \"Sequence\",\r\n\t        \"#stats\": {\r\n\t            \"#phaseSwitches\": 1,\r\n\t            \"execTime\": \"9.743\u00b5s\"\r\n\t        },\r\n\t        \"~children\": [\r\n\t            {\r\n\t                \"#operator\": \"InferKeyspace\",\r\n\t                \"#stats\": {\r\n\t                    \"#itemsOut\": 1,\r\n\t                    \"#phaseSwitches\": 7,\r\n\t                    \"execTime\": \"9.345\u00b5s\",\r\n\t                    \"kernTime\": \"438.011515ms\"\r\n\t                },\r\n\t                \"keyspace\": \"travel-sample\",\r\n\t                \"namespace\": \"\",\r\n\t                \"using\": \"default\"\r\n\t            },\r\n\t            {\r\n\t                \"#operator\": \"Stream\",\r\n\t                \"#stats\": {\r\n\t                    \"#itemsIn\": 1,\r\n\t                    \"#itemsOut\": 1,\r\n\t                    \"#phaseSwitches\": 6,\r\n\t                    \"execTime\": \"2.257622ms\",\r\n\t                    \"kernTime\": \"438.028393ms\"\r\n\t                }\r\n\t            }\r\n\t        ]\r\n\t    },\r\n\t    \"~versions\": [\r\n\t        \"7.0.0-N1QL\",\r\n\t        \"7.0.0-1784-enterprise\"\r\n\t    ]\r\n\t}\r\n    }\r\n}\r\n<\/pre>\n<p><strong>EXPLAIN<\/strong><\/p>\n<p>Explain tells you the query plan for each query &#8212; the indexes chosen, the predicates and other pushdowns, join types, join order, etc.\u00a0 Both MongoDB and Couchbase produce explain in JSON form &#8212; a natural thing for JSON databases.<\/p>\n<pre class=\"theme:vs2012-black font-size:17 line-height:20 height-set:true whitespace-before:2 lang:js decode:true \">MongoDB Enterprise &gt; db.CUSTOMER.find({zip:94040}).explain()\r\n{\r\n\t\"queryPlanner\" : {\r\n\t\t\"plannerVersion\" : 1,\r\n\t\t\"namespace\" : \"test.CUSTOMER\",\r\n\t\t\"indexFilterSet\" : false,\r\n\t\t\"parsedQuery\" : {\r\n\t\t\t\"zip\" : {\r\n\t\t\t\t\"$eq\" : 94040\r\n\t\t\t}\r\n\t\t},\r\n\t\t\"winningPlan\" : {\r\n\t\t\t\"stage\" : \"FETCH\",\r\n\t\t\t\"inputStage\" : {\r\n\t\t\t\t\"stage\" : \"IXSCAN\",\r\n\t\t\t\t\"keyPattern\" : {\r\n\t\t\t\t\t\"zip\" : 1\r\n\t\t\t\t},\r\n\t\t\t\t\"indexName\" : \"zip_1\",\r\n\t\t\t\t\"isMultiKey\" : false,\r\n\t\t\t\t\"multiKeyPaths\" : {\r\n\t\t\t\t\t\"zip\" : [ ]\r\n\t\t\t\t},\r\n\t\t\t\t\"isUnique\" : false,\r\n\t\t\t\t\"isSparse\" : false,\r\n\t\t\t\t\"isPartial\" : false,\r\n\t\t\t\t\"indexVersion\" : 2,\r\n\t\t\t\t\"direction\" : \"forward\",\r\n\t\t\t\t\"indexBounds\" : {\r\n\t\t\t\t\t\"zip\" : [\r\n\t\t\t\t\t\t\"[94040.0, 94040.0]\"\r\n\t\t\t\t\t]\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\t\"rejectedPlans\" : [ ]\r\n\t},\r\n\t\"serverInfo\" : {\r\n\t\t\"host\" : \"MacBook-Pro-4.attlocal.net\",\r\n\t\t\"port\" : 27017,\r\n\t\t\"version\" : \"4.0.0\",\r\n\t\t\"gitVersion\" : \"3b07af3d4f471ae89e8186d33bbb1d5259597d51\"\r\n\t},\r\n\t\"ok\" : 1\r\n}\r\nMongoDB Enterprise &gt; \r\n<\/pre>\n<p>On Couchbase, you simply prefix the statement with EXPLAIN. You can explain any statement in N1QL.<\/p>\n<pre class=\"theme:vs2012-black font-size:17 line-height:20 height-set:true whitespace-before:2 lang:js decode:true \">EXPLAIN SELECT * FROM CUSTOMER WHERE zip = 94040;\r\n[\r\n  {\r\n    \"plan\": {\r\n      \"#operator\": \"Sequence\",\r\n      \"~children\": [\r\n        {\r\n          \"#operator\": \"IndexScan3\",\r\n          \"index\": \"ix_customer\",\r\n          \"index_id\": \"b312ed00505a074d\",\r\n          \"index_projection\": {\r\n            \"primary_key\": true\r\n          },\r\n          \"keyspace\": \"CUSTOMER\",\r\n          \"namespace\": \"default\",\r\n          \"spans\": [\r\n            {\r\n              \"exact\": true,\r\n              \"range\": [\r\n                {\r\n                  \"high\": \"94040\",\r\n                  \"inclusion\": 3,\r\n                  \"low\": \"94040\"\r\n                }\r\n              ]\r\n            }\r\n          ],\r\n          \"using\": \"gsi\"\r\n        },\r\n        {\r\n          \"#operator\": \"Fetch\",\r\n          \"keyspace\": \"CUSTOMER\",\r\n          \"namespace\": \"default\"\r\n        },\r\n        {\r\n          \"#operator\": \"Parallel\",\r\n          \"~child\": {\r\n            \"#operator\": \"Sequence\",\r\n            \"~children\": [\r\n              {\r\n                \"#operator\": \"Filter\",\r\n                \"condition\": \"((`CUSTOMER`.`zip`) = 94040)\"\r\n              },\r\n              {\r\n                \"#operator\": \"InitialProject\",\r\n                \"result_terms\": [\r\n                  {\r\n                    \"expr\": \"self\",\r\n                    \"star\": true\r\n                  }\r\n                ]\r\n              }\r\n            ]\r\n          }\r\n        }\r\n      ]\r\n    },\r\n    \"text\": \"SELECT * FROM CUSTOMER WHERE zip = 94040;\"\r\n  }\r\n]<\/pre>\n<p>The query workbench also has a visual explain along with profiling. (for a different <a href=\"https:\/\/www.couchbase.com\/blog\/ansi-join-support-n1ql\/\">query<\/a>)<\/p>\n<p><a href=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2018\/03\/ANSI-JOIN-multiple-joins-Visual-Explain.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4830\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2018\/03\/ANSI-JOIN-multiple-joins-Visual-Explain-300x185.png\" alt=\"\" width=\"745\" height=\"460\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2018\/03\/ANSI-JOIN-multiple-joins-Visual-Explain-300x185.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2018\/03\/ANSI-JOIN-multiple-joins-Visual-Explain-1024x632.png 1024w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2018\/03\/ANSI-JOIN-multiple-joins-Visual-Explain-768x474.png 768w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2018\/03\/ANSI-JOIN-multiple-joins-Visual-Explain-1536x948.png 1536w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2018\/03\/ANSI-JOIN-multiple-joins-Visual-Explain-2048x1264.png 2048w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2018\/03\/ANSI-JOIN-multiple-joins-Visual-Explain-20x12.png 20w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2018\/03\/ANSI-JOIN-multiple-joins-Visual-Explain-1320x815.png 1320w\" sizes=\"auto, (max-width: 745px) 100vw, 745px\" \/><\/a><\/p>\n<p><a href=\"https:\/\/docs.couchbase.com\/server\/6.5\/n1ql\/n1ql-language-reference\/groupby.html\">GROUP BY<\/a><\/p>\n<p>MongoDB&#8217;s &#8220;GROUP BY&#8221; clause is part of the aggregate() API. Here&#8217;s the comparison.<\/p>\n<p>Unlike SQL and N1QL, MongoDB query API has a lot of implicit meaning without formal definitions.\u00a0 With N1QL, you&#8217;re aware of the groupings (b and c) and aggregations (SUM(a)) explicitly.<\/p>\n<pre class=\"theme:vs2012-black lang:mysql decode:true\">\/* MongoDB *\/\r\nGrouping and aggregation is combined.\r\n\r\n$group : {\r\n          [\r\n           { a:\u201d$a\u201d}, {b:\u201d$b\u201d}, {c: \u201c$c\u201d},\r\n           count: { $sum: 1 }\r\n         ]\r\n        }\r\n\r\n\/* Couchbase: N1QL *\/\r\nSELECT b, c, SUM(a)\r\nFROM t\r\nGROUP BY b, c\r\n<\/pre>\n<p><a href=\"https:\/\/docs.couchbase.com\/server\/6.5\/n1ql\/n1ql-language-reference\/orderby.html\">ORDER BY<\/a><\/p>\n<pre class=\"theme:vs2012-black lang:js decode:true \">\/* MongoDB *\/ \r\nORDER BY\r\n     { $sort : { age : -1, posts: 1 } }\r\n\r\n\/* Couchbase: N1QLL *\/\r\nORDER BY age DESC, posts ASC\r\n<\/pre>\n<p>OFFSET and LIMIT<\/p>\n<p>These are commonly used for the offset pagination method. both Mongo and Couchbase support.\u00a0 However, <a href=\"https:\/\/www.couchbase.com\/blog\/offset-keyset-pagination-n1ql-query-couchbase\/\">keyset pagination<\/a> is a superior approach that user fewer resources and performs better. Mongo users $skip and $limit clauses and N1QL uses OFFSET and LIMIT.\u00a0 I&#8217;m unsure about the pagination optimizations done in MongoDB.<\/p>\n<p><a href=\"https:\/\/docs.couchbase.com\/server\/6.5\/n1ql\/n1ql-language-reference\/join.html\">JOINs<\/a><\/p>\n<p>Joins are generally discouraged in NoSQL databases and MongoDB in particular. But the real world is complex and cannot be denormalized into a single collection. MongoDB has the $lookup operator for the join and does a nested loop between one collection (potentially sharded) to another collection (cannot be sharded).\u00a0 \u00a0In Couchbase, all the buckets are partitioned (sharded). JOINs operations (INNER JOIN, LEFT OUTER JOIN, RIGHT OUTER JOIN, joins with subqueries, NEST and UNNEST) We have a detailed article showing the equivalent operations between MongoDB and JSON.\u00a0 I recommend you read the article <a href=\"https:\/\/www.couchbase.com\/blog\/joining-json-comparing-couchbase-n1ql-mongodb\/\">Joining JSON: Comparing Couchbase and MongoDB.<\/a><\/p>\n<table>\n<tbody>\n<tr>\n<td><b>JOIN Type<\/b><\/td>\n<td><b>MongoDB<\/b><\/td>\n<td><b>Couchbase\u00a0<\/b><\/td>\n<\/tr>\n<tr>\n<td><b>INNER JOIN\u00a0<\/b><\/td>\n<td><span style=\"font-weight: 400\">No.\u00a0 $lookup is a limited left outer join on unsharded collections only. Applications have to do that and then remove the documents without the matching documents.\u00a0\u00a0<\/span><\/td>\n<td><span style=\"font-weight: 400\">ON clause requires document key reference. Equi-join only<\/span><\/td>\n<\/tr>\n<tr>\n<td><b>LEFT OUTER JOIN<\/b><\/td>\n<td><span style=\"font-weight: 400\">Limited $lookup.\u00a0\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400\">Cannot join on arrays.\u00a0 Need to flatten arrays manually before the join.<\/span><\/td>\n<td><span style=\"font-weight: 400\">Full left outer join including array predicates in the ON clause.<\/span><\/td>\n<\/tr>\n<tr>\n<td><b>RIGHT OUTER JOIN<\/b><\/td>\n<td><span style=\"font-weight: 400\">Unsupported. Must be handled in the application<\/span><\/td>\n<td><span style=\"font-weight: 400\">Limited RIGHT OUTER JOIN support; Worked around with using other JOINs.<\/span><\/td>\n<\/tr>\n<tr>\n<td><b>FULL OUTER JOIN<\/b><\/td>\n<td><span style=\"font-weight: 400\">Unsupported. Must be handled in the application<\/span><\/td>\n<td><span style=\"font-weight: 400\">Worked around with using other JOINs.<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><a href=\"https:\/\/docs.couchbase.com\/server\/6.5\/n1ql\/n1ql-language-reference\/grant.html\">GRANT and REVOKE<\/a><\/p>\n<pre class=\"theme:vs2012-black font-size:17 line-height:20 whitespace-before:2 lang:default decode:true \">\/* MongoDB *\/\r\ndb.grantPrivilegesToRole()\r\ndb.revokePrivilegesFromRole()\r\n\r\n\/* Couchbase: N1QL *\/\r\nGRANT query_select ON orders, customers TO bill, linda;\r\nREVOKE query_update ON `travel-sample` FROM debby\r\n<\/pre>\n<h4><span style=\"color: #0000ff\"><strong><a style=\"color: #0000ff\" href=\"https:\/\/docs.couchbase.com\/server\/6.5\/n1ql\/n1ql-language-reference\/createindex.html\">INDEXES<\/a><\/strong><\/span><\/h4>\n<p>Below is an overview of the index capabilities of MongoDB and Couchbase. Both have a variety of indexes.\u00a0 Couchbase index types and usage are well documented in the article: <a href=\"https:\/\/www.couchbase.com\/blog\/create-right-index-get-right-performance\/\">Create the Right Index and Get the Right Performance<\/a>. In addition, Couchbase has a built-in index advisor for<a href=\"https:\/\/docs.couchbase.com\/server\/current\/n1ql\/n1ql-language-reference\/advise.html\"> the individual statement<\/a> as well as the <a href=\"https:\/\/docs.couchbase.com\/server\/6.5\/n1ql\/n1ql-language-reference\/advisor.html\">workload<\/a> and in addition, has the <a href=\"https:\/\/index-advisor.couchbase.com\/indexadvisor\/#1\">Index Advisor Service<\/a> that&#8217;s updated monthly.<\/p>\n<table>\n<tbody>\n<tr>\n<td><b>Index Type<\/b><\/td>\n<td><b>MongoDB<\/b><\/td>\n<td><b>Couchbase\u00a0<\/b><\/td>\n<\/tr>\n<tr>\n<td><b>Primary Index<\/b><\/td>\n<td><b>Table Scans, Primary Index<\/b><\/td>\n<td><b>Primary Index<\/b><\/td>\n<\/tr>\n<tr>\n<td><b>Secondary Index<\/b><\/td>\n<td><b>Secondary Index<\/b><\/td>\n<td><b>Secondary Index<\/b><\/td>\n<\/tr>\n<tr>\n<td><b>Composite Index<\/b><\/td>\n<td><b>Composite Index<\/b><\/td>\n<td><b>Composite Index<\/b><\/td>\n<\/tr>\n<tr>\n<td><b>Functional Index\u00a0<\/b><\/p>\n<p><b>(Expression Index)<\/b><\/td>\n<td><b>Unavailable<\/b><\/td>\n<td><b>Functional Index, Expression Index<\/b><\/td>\n<\/tr>\n<tr>\n<td><b>Partial Index<\/b><\/td>\n<td><b>Unavailable<\/b><\/td>\n<td><b>Partial Index<\/b><\/td>\n<\/tr>\n<tr>\n<td><b>Range Partitioned Index<\/b><\/td>\n<td><b>Range partitioned, Interval, List, Ref, Hash, Hybrid partitioned Index<\/b><\/td>\n<td><b>Manual range partitioned using partial Index<\/b><\/td>\n<\/tr>\n<tr>\n<td><b>ARRAY Index<\/b><\/td>\n<td><b>1. B-Tree based index with one array-key per index.<\/b><\/p>\n<p><b>2. The one array key can be simple or composite (multi-key).<\/b><\/td>\n<td><b>1. B-tree based index with one array-key per index.<\/b><\/p>\n<p><b>2. Array key can be composite<\/b><\/p>\n<p><b>3.\u00a0 Using SEARCH(): Inverted tree-based index with an unlimited number of array keys per index.<\/b><\/td>\n<\/tr>\n<tr>\n<td><b>Array Index on Expressions<\/b><\/td>\n<td><b>Unavailable<\/b><\/td>\n<td><span style=\"font-weight: 400\">Yes<\/span><\/td>\n<\/tr>\n<tr>\n<td><b>Objects<\/b><\/td>\n<td><b>Yes<\/b><\/td>\n<td><b>Yes<\/b><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4><span style=\"color: #0000ff\"><a style=\"color: #0000ff\" href=\"https:\/\/docs.couchbase.com\/server\/current\/fts\/full-text-intro.html\"><strong>FULL TEXT SEARCH<\/strong><\/a><\/span><\/h4>\n<p>MongoDB product has built-in <a href=\"https:\/\/docs.mongodb.com\/manual\/text-search\/\">text search<\/a> support and is now experimenting with integrating Lucene on their Atlas service via the <a href=\"https:\/\/docs.atlas.mongodb.com\/reference\/atlas-search\/query-syntax\/\">$searchbeta<\/a> feature. Couchbase has a built-in <a href=\"https:\/\/www.couchbase.com\/blog\/full-text-search-indexing-best-practices-by-use-case\/\">full-text search indexing<\/a> service that you can run on your laptop and the cluster.\u00a0 Again, we have a detailed article comparing the <a href=\"https:\/\/www.couchbase.com\/blog\/searching-json-comparing-text-search-in-couchbase-and-mongodb\/\">text search feature-by-feature<\/a>, with examples.\u00a0 Couchbase 6.5 integrates <a href=\"https:\/\/docs.couchbase.com\/server\/current\/n1ql\/n1ql-language-reference\/searchfun.html\">the FTS with N1QL<\/a>, making the querying even further.<\/p>\n<h4><span style=\"color: #0000ff\"><strong>OPTIMIZER<\/strong><\/span><\/h4>\n<p>A query optimizer tries to rewrite the query for better optimization, to choose the most appropriate index, decides index pushdown, join order, join type, and creates a plan that the engine can execute. Each database has a specialized optimizer that understands the capabilities and quirks of the engine.<\/p>\n<table>\n<tbody>\n<tr>\n<td><b>Feature<\/b><\/td>\n<td><b>MongoDB<\/b><\/td>\n<td><b>Couchbase\u00a0<\/b><\/td>\n<\/tr>\n<tr>\n<td><b>Optimizer Type<\/b><\/td>\n<td><a href=\"https:\/\/docs.mongodb.com\/manual\/core\/query-plans\/\"><b>Query Shape-based <\/b><\/a><\/td>\n<td><a href=\"https:\/\/dzone.com\/articles\/a-deep-dive-into-couchbase-n1ql-query-optimization\"><b>Rule-based<\/b><\/a><\/p>\n<p><a href=\"https:\/\/docs.couchbase.com\/server\/6.5\/n1ql\/n1ql-language-reference\/cost-based-optimizer.html\"><b>Cost-based (Preview in 6.5)<\/b><\/a><\/td>\n<\/tr>\n<tr>\n<td><b>Index selection<\/b><\/td>\n<td><a href=\"https:\/\/docs.mongodb.com\/manual\/core\/query-plans\/\"><b>Query Shape-based <\/b><\/a><\/td>\n<td><b>Rule-based<\/b><\/p>\n<p><b>Cost-based (preview in 6.5)<\/b><\/td>\n<\/tr>\n<tr>\n<td><b>Query Rewrite<\/b><\/td>\n<td><b>No<\/b><\/td>\n<td><b>Yes, limited.<\/b><\/td>\n<\/tr>\n<tr>\n<td><b>JOIN Order<\/b><\/td>\n<td><b>As written, procedural using the aggregation framework<\/b><\/td>\n<td><b>User Specified (Left to Right)<\/b><\/td>\n<\/tr>\n<tr>\n<td><b>Join Type<\/b><\/td>\n<td><b>Nested Loop<\/b><\/td>\n<td><b>Nested Loop<\/b><\/p>\n<p><b>Hash Join<\/b><\/td>\n<\/tr>\n<tr>\n<td><b>HINTS<\/b><\/td>\n<td><b>Yes. $hint<\/b><\/td>\n<td><b>Yes. <\/b><\/p>\n<p><b>USE INDEX, USE HASH<\/b><\/td>\n<\/tr>\n<tr>\n<td><b>EXPLAIN<\/b><\/td>\n<td><b>$explain<\/b><\/td>\n<td><b>EXPLAIN<\/b><\/td>\n<\/tr>\n<tr>\n<td><b>Visual Explain<\/b><\/td>\n<td><b>Yes<\/b><\/td>\n<td><b>Yes.<\/b><\/td>\n<\/tr>\n<tr>\n<td><b>Query Profiling<\/b><\/td>\n<td><b>Yes<\/b><\/td>\n<td><b>yes<\/b><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4><span style=\"color: #0000ff\"><strong>TRANSACTIONS<\/strong><\/span><\/h4>\n<p>NoSQL databases were invented to avoid SQL and transactions. Over time, each database is adding one or the other or both!\u00a0 MongoDB has added distributed <a href=\"https:\/\/docs.mongodb.com\/manual\/core\/transactions\/\">multi-document transactions<\/a> with snapshot isolation. Couchbase has added distributed <a href=\"https:\/\/docs.couchbase.com\/java-sdk\/3.0\/howtos\/distributed-acid-transactions-from-the-sdk.html\">multi-document transactions<\/a> with read-committed isolation. The multi-document transactions are still unsupported via N1QL.<\/p>\n<table>\n<tbody>\n<tr>\n<td><b>Feature<\/b><\/td>\n<td><b>MongoDB<\/b><\/td>\n<td><b>Couchbase\u00a0<\/b><\/td>\n<\/tr>\n<tr>\n<td><b>Index updates<\/b><\/td>\n<td><b>Indexes are synchronously maintained<\/b><\/td>\n<td><b>Indexes are asynchronously maintained<\/b><\/td>\n<\/tr>\n<tr>\n<td><b>Atomicity<\/b><\/td>\n<td><b>Single document<\/b><\/p>\n<p><b>Multi-document (in 4.2)<\/b><\/td>\n<td><b>Single Document<\/b><\/p>\n<p><b>Multi-document (in 6.5)<\/b><\/td>\n<\/tr>\n<tr>\n<td><b>Consistency<\/b><\/td>\n<td><strong>Data and indexes are updated synchronously. By default, dirty read on Data and indexes.\u00a0<\/strong><\/td>\n<td><b>Data access is always consistent<\/b><\/p>\n<p><b>Indexes have multiple consistency levels (UNBOUNDED, AT_PLUS, REQUEST_PLUS)<\/b><\/td>\n<\/tr>\n<tr>\n<td><b>Isolation<\/b><\/td>\n<td><b>Default: Dirty read<\/b><\/p>\n<p><b>Transaction: Snapshot isolation<\/b><\/td>\n<td><b>Optimistic locking with CAS checking<\/b><\/p>\n<p><b>Transactions: Monotonic atomic isolation<\/b><\/td>\n<\/tr>\n<tr>\n<td><b>Durability<\/b><\/td>\n<td><b>Durable with write majority option.<\/b><\/td>\n<td><b>Durable with confirmation after replication<\/b><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4><span style=\"color: #0000ff\"><strong>ANALYTICS<\/strong><\/span><\/h4>\n<p><a href=\"https:\/\/www.couchbase.com\/products\/analytics\/\">Couchbase Analytics<\/a> is designed to bring you insights on your JSON data without ETL &#8212; NoETL for NoSQL. The JSON data in the key-value datastore is copied over to the analytics service which distributes the data into its storage.\u00a0 The Couchbase query service, data service is designed to handle a large number of concurrent operations or queries to run the applications. The analytics service is designed to analyze a large number of documents to bring you insights into the business. In traditional terms, the Analytics service is designed for OLAP, and the rest are designed for OLTP.\u00a0 MongoDB doesn&#8217;t have the equivalent analytics service.\u00a0 You&#8217;d have to overload your existing cluster with both OLTP and OLAP workloads.\u00a0 As you&#8217;ll learn &#8212; there&#8217;s no free lunch.\u00a0 The large scans required for analytics workload will affect the latencies of your OLTP queries. Then you start allocating new nodes for your secondary and tertiary copies of the data on which you can do the read-workload.\u00a0 What will or should happen on a failover?\u00a0 The secondary takes over but again affects your OLTP workload.<\/p>\n<p>There&#8217;s a second reason for a distinct service &#8212; The query processing for analytics requires a different approach than the OLTP queries.\u00a0 There area great set of resources for you to learn about this service, including the book by Don Chamberlin, co-inventor of SQL.<\/p>\n<ol>\n<li>SQL++ for SQL USERS: A TUTORIAL:\u00a0 <a href=\"https:\/\/resources.couchbase.com\/analytics\/sql-book\">https:\/\/resources.couchbase.com\/analytics\/sql-book<\/a><\/li>\n<li>Couchbase Analytics: Under the Hood \u2013 Connect Silicon Valley 2018: <a href=\"https:\/\/www.youtube.com\/watch?v=1dN11TUj58c\">https:\/\/www.youtube.com\/watch?v=1dN11TUj58c<\/a><\/li>\n<li>From SQL to NoSQL\n<ul>\n<li>Beyond rows and columns: The fourth time\u2019s the charm \u2013 Couchbase Connect 2016: <a href=\"https:\/\/www.youtube.com\/watch?v=HVJNxgLKtbo\">https:\/\/www.youtube.com\/watch?v=HVJNxgLKtbo<\/a><\/li>\n<\/ul>\n<\/li>\n<li>NoETL for NoSQL \u2013 Real-Time Analytics With Couchbase:\u00a0<a href=\"https:\/\/www.youtube.com\/watch?v=MIno71jTOUI\">https:\/\/www.youtube.com\/watch?v=MIno71jTOUI<\/a><\/li>\n<li><a href=\"https:\/\/www.couchbase.com\/blog\/n1ql-to-query-or-to-analyze\/\">N1QL: To Query or To Analyze?<\/a><\/li>\n<li><a href=\"https:\/\/www.couchbase.com\/blog\/part-2-n1ql-to-query-or-to-analyze\/\">Part 2: N1QL: To Query or To Analyze?<\/a><\/li>\n<\/ol>\n<h4><span style=\"color: #0000ff\"><strong>Summary: Part Deux<\/strong><\/span><\/h4>\n<p>Databases are extraordinarily useful.\u00a0 They&#8217;re nuanced and are also sticky.\u00a0 They&#8217;re essential to civilization.\u00a0 Sumerians invented writing for transaction processing: to create a database out of clay tablets to keep track of taxes, land, gold, and find out information. There will be databases forever. Each database is different &#8212; whether they&#8217;re SQL databases or NoSQL databases. Not all SQL databases are the same. Not all NoSQL databases are the same. Understanding different databases enhance your organization&#8217;s flexibility and effectiveness.<\/p>\n<h4><span style=\"color: #0000ff\"><strong>RESOURCES: Part Deux<\/strong><\/span><\/h4>\n<ol>\n<li>SQL++ for SQL USERS: A TUTORIAL:\u00a0 <a href=\"https:\/\/resources.couchbase.com\/analytics\/sql-book\">https:\/\/resources.couchbase.com\/analytics\/sql-book<\/a><\/li>\n<li>N1QL Practical guides\n<ul>\n<li>Second Edition: <a href=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2017\/10\/N1QL-A-Practical-Guide-2nd-Edition.pdf\">https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2017\/10\/N1QL-A-Practical-Guide-2nd-Edition.pdf<\/a><\/li>\n<li>5.5 features: <a href=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2018\/04\/COU_261-Couchbase-5.5-N1QL-Booklet-WEB.pdf\">https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2018\/04\/COU_261-Couchbase-5.5-N1QL-Booklet-WEB.pdf<\/a><\/li>\n<\/ul>\n<\/li>\n<li>Couchbase 6.5 blogs: <a href=\"https:\/\/www.couchbase.com\/blog\/tag\/6.5\/\">https:\/\/www.couchbase.com\/blog\/tag\/6.5\/<\/a><\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Six thousand years ago, the Sumerians invented writing for transaction processing &#8212; Gray &amp; Reuter By any measure, MongoDB is a popular document-oriented JSON database. In the last dozen years, it has grown from its humble beginnings of a single [&hellip;]<\/p>\n","protected":false},"author":55,"featured_media":10440,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[1815,2294,1821,1816,2165,1812],"tags":[1261,1309,1725,2221],"ppma_author":[8929],"class_list":["post-8478","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-best-practices-and-tutorials","category-analytics","category-couchbase-architecture","category-couchbase-server","category-full-text-search","category-n1ql-query","tag-json","tag-mongodb","tag-nosql-database","tag-transactions"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.8 (Yoast SEO v25.8) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Couchbase Intro for MongoDB Developers and NoSQL Experts - The Couchbase Blog<\/title>\n<meta name=\"description\" content=\"Many start with MongoDB to learn NoSQL and flexible JSON schema, many choose Couchbase for performance, scale, and SQL. Learn the differences in this post.\" \/>\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\/introduction-to-couchbase-for-mongodb-developers-and-experts\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Couchbase Intro for MongoDB Developers and NoSQL Experts\" \/>\n<meta property=\"og:description\" content=\"Many start with MongoDB to learn NoSQL and flexible JSON schema, many choose Couchbase for performance, scale, and SQL. Learn the differences in this post.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.couchbase.com\/blog\/introduction-to-couchbase-for-mongodb-developers-and-experts\/\" \/>\n<meta property=\"og:site_name\" content=\"The Couchbase Blog\" \/>\n<meta property=\"article:published_time\" content=\"2020-04-25T19:51:59+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-06-14T06:42:43+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/04\/monarch2-2.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"800\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Keshav Murthy\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@rkeshavmurthy\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Keshav Murthy\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"17 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/introduction-to-couchbase-for-mongodb-developers-and-experts\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/introduction-to-couchbase-for-mongodb-developers-and-experts\/\"},\"author\":{\"name\":\"Keshav Murthy\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/c261644262bf98e146372fe647682636\"},\"headline\":\"Couchbase Intro for MongoDB Developers and NoSQL Experts\",\"datePublished\":\"2020-04-25T19:51:59+00:00\",\"dateModified\":\"2025-06-14T06:42:43+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/introduction-to-couchbase-for-mongodb-developers-and-experts\/\"},\"wordCount\":3558,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/introduction-to-couchbase-for-mongodb-developers-and-experts\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/04\/monarch2-2.jpg\",\"keywords\":[\"JSON\",\"mongodb\",\"NoSQL Database\",\"transactions\"],\"articleSection\":[\"Best Practices and Tutorials\",\"Couchbase Analytics\",\"Couchbase Architecture\",\"Couchbase Server\",\"Full-Text Search\",\"SQL++ \/ N1QL Query\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/introduction-to-couchbase-for-mongodb-developers-and-experts\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/introduction-to-couchbase-for-mongodb-developers-and-experts\/\",\"url\":\"https:\/\/www.couchbase.com\/blog\/introduction-to-couchbase-for-mongodb-developers-and-experts\/\",\"name\":\"Couchbase Intro for MongoDB Developers and NoSQL Experts - The Couchbase Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/introduction-to-couchbase-for-mongodb-developers-and-experts\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/introduction-to-couchbase-for-mongodb-developers-and-experts\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/04\/monarch2-2.jpg\",\"datePublished\":\"2020-04-25T19:51:59+00:00\",\"dateModified\":\"2025-06-14T06:42:43+00:00\",\"description\":\"Many start with MongoDB to learn NoSQL and flexible JSON schema, many choose Couchbase for performance, scale, and SQL. Learn the differences in this post.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/introduction-to-couchbase-for-mongodb-developers-and-experts\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/introduction-to-couchbase-for-mongodb-developers-and-experts\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/introduction-to-couchbase-for-mongodb-developers-and-experts\/#primaryimage\",\"url\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/04\/monarch2-2.jpg\",\"contentUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/04\/monarch2-2.jpg\",\"width\":1200,\"height\":800},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/introduction-to-couchbase-for-mongodb-developers-and-experts\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.couchbase.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Couchbase Intro for MongoDB Developers and NoSQL Experts\"}]},{\"@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\/2023\/04\/admin-logo.png\",\"contentUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png\",\"width\":218,\"height\":34,\"caption\":\"The Couchbase Blog\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/c261644262bf98e146372fe647682636\",\"name\":\"Keshav Murthy\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/4e51d72fc07c662aa791316deafffac4\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/af74df754db27152971d0aed2f323ead5a1f9fe5afd0209af91e12e784451224?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/af74df754db27152971d0aed2f323ead5a1f9fe5afd0209af91e12e784451224?s=96&d=mm&r=g\",\"caption\":\"Keshav Murthy\"},\"description\":\"Keshav Murthy is a Vice President at Couchbase R&amp;D. Previously, he was at MapR, IBM, Informix, Sybase, with more than 20 years of experience in database design &amp; development. He lead the SQL and NoSQL R&amp;D team at IBM Informix. He has received two President's Club awards at Couchbase, two Outstanding Technical Achievement Awards at IBM. Keshav has a bachelor's degree in Computer Science and Engineering from the University of Mysore, India, holds eleven US patents and has four US patents pending.\",\"sameAs\":[\"https:\/\/blog.planetnosql.com\/\",\"https:\/\/x.com\/rkeshavmurthy\"],\"url\":\"https:\/\/www.couchbase.com\/blog\/author\/keshav-murthy\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Couchbase Intro for MongoDB Developers and NoSQL Experts - The Couchbase Blog","description":"Many start with MongoDB to learn NoSQL and flexible JSON schema, many choose Couchbase for performance, scale, and SQL. Learn the differences in this post.","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\/introduction-to-couchbase-for-mongodb-developers-and-experts\/","og_locale":"en_US","og_type":"article","og_title":"Couchbase Intro for MongoDB Developers and NoSQL Experts","og_description":"Many start with MongoDB to learn NoSQL and flexible JSON schema, many choose Couchbase for performance, scale, and SQL. Learn the differences in this post.","og_url":"https:\/\/www.couchbase.com\/blog\/introduction-to-couchbase-for-mongodb-developers-and-experts\/","og_site_name":"The Couchbase Blog","article_published_time":"2020-04-25T19:51:59+00:00","article_modified_time":"2025-06-14T06:42:43+00:00","og_image":[{"width":1200,"height":800,"url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/04\/monarch2-2.jpg","type":"image\/jpeg"}],"author":"Keshav Murthy","twitter_card":"summary_large_image","twitter_creator":"@rkeshavmurthy","twitter_misc":{"Written by":"Keshav Murthy","Est. reading time":"17 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.couchbase.com\/blog\/introduction-to-couchbase-for-mongodb-developers-and-experts\/#article","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/introduction-to-couchbase-for-mongodb-developers-and-experts\/"},"author":{"name":"Keshav Murthy","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/c261644262bf98e146372fe647682636"},"headline":"Couchbase Intro for MongoDB Developers and NoSQL Experts","datePublished":"2020-04-25T19:51:59+00:00","dateModified":"2025-06-14T06:42:43+00:00","mainEntityOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/introduction-to-couchbase-for-mongodb-developers-and-experts\/"},"wordCount":3558,"commentCount":0,"publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/introduction-to-couchbase-for-mongodb-developers-and-experts\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/04\/monarch2-2.jpg","keywords":["JSON","mongodb","NoSQL Database","transactions"],"articleSection":["Best Practices and Tutorials","Couchbase Analytics","Couchbase Architecture","Couchbase Server","Full-Text Search","SQL++ \/ N1QL Query"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.couchbase.com\/blog\/introduction-to-couchbase-for-mongodb-developers-and-experts\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.couchbase.com\/blog\/introduction-to-couchbase-for-mongodb-developers-and-experts\/","url":"https:\/\/www.couchbase.com\/blog\/introduction-to-couchbase-for-mongodb-developers-and-experts\/","name":"Couchbase Intro for MongoDB Developers and NoSQL Experts - The Couchbase Blog","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/introduction-to-couchbase-for-mongodb-developers-and-experts\/#primaryimage"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/introduction-to-couchbase-for-mongodb-developers-and-experts\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/04\/monarch2-2.jpg","datePublished":"2020-04-25T19:51:59+00:00","dateModified":"2025-06-14T06:42:43+00:00","description":"Many start with MongoDB to learn NoSQL and flexible JSON schema, many choose Couchbase for performance, scale, and SQL. Learn the differences in this post.","breadcrumb":{"@id":"https:\/\/www.couchbase.com\/blog\/introduction-to-couchbase-for-mongodb-developers-and-experts\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.couchbase.com\/blog\/introduction-to-couchbase-for-mongodb-developers-and-experts\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/introduction-to-couchbase-for-mongodb-developers-and-experts\/#primaryimage","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/04\/monarch2-2.jpg","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/04\/monarch2-2.jpg","width":1200,"height":800},{"@type":"BreadcrumbList","@id":"https:\/\/www.couchbase.com\/blog\/introduction-to-couchbase-for-mongodb-developers-and-experts\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.couchbase.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Couchbase Intro for MongoDB Developers and NoSQL Experts"}]},{"@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\/2023\/04\/admin-logo.png","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png","width":218,"height":34,"caption":"The Couchbase Blog"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/c261644262bf98e146372fe647682636","name":"Keshav Murthy","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/4e51d72fc07c662aa791316deafffac4","url":"https:\/\/secure.gravatar.com\/avatar\/af74df754db27152971d0aed2f323ead5a1f9fe5afd0209af91e12e784451224?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/af74df754db27152971d0aed2f323ead5a1f9fe5afd0209af91e12e784451224?s=96&d=mm&r=g","caption":"Keshav Murthy"},"description":"Keshav Murthy is a Vice President at Couchbase R&amp;D. Previously, he was at MapR, IBM, Informix, Sybase, with more than 20 years of experience in database design &amp; development. He lead the SQL and NoSQL R&amp;D team at IBM Informix. He has received two President's Club awards at Couchbase, two Outstanding Technical Achievement Awards at IBM. Keshav has a bachelor's degree in Computer Science and Engineering from the University of Mysore, India, holds eleven US patents and has four US patents pending.","sameAs":["https:\/\/blog.planetnosql.com\/","https:\/\/x.com\/rkeshavmurthy"],"url":"https:\/\/www.couchbase.com\/blog\/author\/keshav-murthy\/"}]}},"authors":[{"term_id":8929,"user_id":55,"is_guest":0,"slug":"keshav-murthy","display_name":"Keshav Murthy","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/af74df754db27152971d0aed2f323ead5a1f9fe5afd0209af91e12e784451224?s=96&d=mm&r=g","author_category":"","last_name":"Murthy","first_name":"Keshav","job_title":"","user_url":"https:\/\/blog.planetnosql.com\/","description":"Keshav Murthy is a Vice President at Couchbase R&amp;D. Previously, he was at MapR, IBM, Informix, Sybase, with more than 20 years of experience in database design &amp; development. He lead the SQL and NoSQL R&amp;D team at IBM Informix. He has received two President's Club awards at Couchbase, two Outstanding Technical Achievement Awards at IBM. Keshav has a bachelor's degree in Computer Science and Engineering from the University of Mysore, India,  holds ten US patents and has three US patents pending."}],"_links":{"self":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/8478","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\/55"}],"replies":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/comments?post=8478"}],"version-history":[{"count":0,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/8478\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/media\/10440"}],"wp:attachment":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/media?parent=8478"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/categories?post=8478"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/tags?post=8478"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=8478"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}