{"id":2454,"date":"2016-12-12T14:52:52","date_gmt":"2016-12-12T14:52:51","guid":{"rendered":"https:\/\/www.couchbase.com\/blog\/?p=2454"},"modified":"2025-06-13T19:29:36","modified_gmt":"2025-06-14T02:29:36","slug":"moving-from-mongodb-to-couchbase-server-revisited","status":"publish","type":"post","link":"https:\/\/www.couchbase.com\/blog\/moving-from-mongodb-to-couchbase-server-revisited\/","title":{"rendered":"Moving from MongoDB to Couchbase server (revisited)"},"content":{"rendered":"<div id=\"preamble\">\n<div class=\"sectionbody\">\n<div class=\"paragraph\">\n<p><em>Note: this blog post is a revist of Matthew Revell\u2019s <a href=\"https:\/\/www.couchbase.com\/blog\/moving-from-mongodb-to-couchbase-server\/\">Moving from MongoDB to Couchbase Server<\/a><\/em><\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>This is a developer-focused guide to moving your application\u2019s data store from MongoDB to <a href=\"https:\/\/www.couchbase.com\/developers\/?utm_source=blogs&amp;utm_medium=link&amp;utm_campaign=blogs\">Couchbase Server<\/a>. If you\u2019re interested in migrating from a relational database to Couchbase, start with Laurent\u2019s <a href=\"https:\/\/www.couchbase.com\/blog\/moving-sql-database-content-to-couchbase\/\">guide to making the move from PostgreSQL<\/a>, and I will be working on a SQL Server migration post in the future.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>While this guide doesn\u2019t cover every corner-case, it does offer pointers to what you should consider when planning your migration. If you\u2019re interested in learning about <em>why<\/em> you would do this migration, or learning about a Couchbase customer that has done this migration, <a href=\"https:\/\/www.couchbase.com\/customers\/viber\/\">check out Viber<\/a>.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>If you currently use MongoDB, and you\u2019re using Mongoose ODM with Node, here is a <a href=\"https:\/\/www.youtube.com\/embed\/wTvDKIQiVgE\">video from the Connect 2016 conference on Migrating from MongoDB with Ottoman.js<\/a>.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"sect1\">\n<h2 id=\"trueversions\">Versions<\/h2>\n<div class=\"sectionbody\">\n<div class=\"paragraph\">\n<p>This guide is written for Couchbase Server 4.5 and MongoDB 3.4.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"sect1\">\n<h2 id=\"truekey-differences\">Key differences<\/h2>\n<div class=\"sectionbody\">\n<div class=\"paragraph\">\n<p>Couchbase Server and MongoDB are both document stores that can operate on one or many servers. However, they approach things in some significantly different ways.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>When you begin your migration from MongoDB to Couchbase Server, you\u2019ll need to consider the following differences:<\/p>\n<\/div>\n<div class=\"responsive-table\">\n<table class=\"tableblock frame-all grid-all spread\">\n<tbody>\n<tr>\n<td class=\"tableblock halign-left valign-top\"><\/td>\n<td class=\"tableblock halign-left valign-top\">\n<p class=\"tableblock\">Couchbase Server<\/p>\n<\/td>\n<td class=\"tableblock halign-left valign-top\">\n<p class=\"tableblock\">MongoDB<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td class=\"tableblock halign-left valign-top\">\n<p class=\"tableblock\"><strong>Data models<\/strong><\/p>\n<\/td>\n<td class=\"tableblock halign-left valign-top\">\n<p class=\"tableblock\">Document, key-value<\/p>\n<\/td>\n<td class=\"tableblock halign-left valign-top\">\n<p class=\"tableblock\">Document<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td class=\"tableblock halign-left valign-top\">\n<p class=\"tableblock\"><strong>Query<\/strong><\/p>\n<\/td>\n<td class=\"tableblock halign-left valign-top\">\n<p class=\"tableblock\">N1QL (SQL for JSON), map\/reduce views, key-value<\/p>\n<\/td>\n<td class=\"tableblock halign-left valign-top\">\n<p class=\"tableblock\">Ad-hoc query, map\/reduce aggregation<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td class=\"tableblock halign-left valign-top\">\n<p class=\"tableblock\"><strong>Concurrency<\/strong><\/p>\n<\/td>\n<td class=\"tableblock halign-left valign-top\">\n<p class=\"tableblock\">Optimistic and pessimistic locking<\/p>\n<\/td>\n<td class=\"tableblock halign-left valign-top\">\n<p class=\"tableblock\">Optimistic and pessimistic locking (with WiredTiger)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td class=\"tableblock halign-left valign-top\">\n<p class=\"tableblock\"><strong>Scaling model<\/strong><\/p>\n<\/td>\n<td class=\"tableblock halign-left valign-top\">\n<p class=\"tableblock\">Distributed master-master<\/p>\n<\/td>\n<td class=\"tableblock halign-left valign-top\">\n<p class=\"tableblock\">Master-slave with replica sets<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"sect1\">\n<h2 id=\"truedata-model\">Data model<\/h2>\n<div class=\"sectionbody\">\n<div class=\"paragraph\">\n<p>Couchbase Server is both a document store and a key-value store.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>Everything starts with key-value, as every document has a key that you can use to get and set the document\u2019s contents. However, you can use Couchbase Server as a document database by indexing and querying document contents. <em>Note: if you\u2019re interested in using Couchbase as a plain key-value store, read my blog post on <a href=\"https:\/\/www.couchbase.com\/blog\/using-couchbase-to-store-non-json-data\/\">Using Couchbase to Store Non-JSON Data<\/a>.<\/em><\/p>\n<\/div>\n<div class=\"sect2\">\n<h3 id=\"truedifferences-between-bson-and-json\">Differences between BSON and JSON<\/h3>\n<div class=\"paragraph\">\n<p>It\u2019s likely that your application stores JSON-style documents in MongoDB, so we\u2019ll start there.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>MongoDB stores data in the BSON format, which is a binary JSON-like format. The key difference when migrating is that BSON records additional type information.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>When you export data from MongoDB using a tool such as <em>mongoexport<\/em>, the tool will produce JSON that preserves that type information in a format called Extended JSON.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>Let\u2019s take a look at an example in Extended JSON:<\/p>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"content\">\n<pre class=\"highlightjs highlight\"><code class=\"language-javascript\">{\r\n \"myInt\": {\r\n  \"$numberLong\": \"123\"\r\n }\r\n}<\/code><\/pre>\n<\/div>\n<\/div>\n<div class=\"paragraph\">\n<p>As you can see, the Extended JSON is still valid JSON. That means you can store, index, query and retrieve it using Couchbase Server. However, you\u2019ll need to maintain that additional type information (in the above example, Extended JSON is storing a long integer as a string, for instance) in the application layer.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>Alternatively, you could convert the Extended JSON to standard JSON before (or after) you import it into Couchbase Server. With N1QL queries, this should be relatively straightforward, though potentially tedious. Here\u2019s an example that converts the &#8220;myInt&#8221; field above to a standard JSON number field:<\/p>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"content\">\n<pre class=\"highlightjs highlight\"><code class=\"language-SQL\">UPDATE `default`\r\nSET myInt = TONUMBER(myInt.`$numberLong`)\r\nWHERE myInt.`$numberLong` IS NOT MISSING<\/code><\/pre>\n<\/div>\n<\/div>\n<div class=\"paragraph\">\n<p>Which would result in:<\/p>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"content\">\n<pre class=\"highlightjs highlight\"><code class=\"language-javascript\">{\r\n  \"myInt\": 123\r\n}<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"sect2\">\n<h3 id=\"truenon-json-data\">Non-JSON data<\/h3>\n<div class=\"paragraph\">\n<p>Both MongoDB and Couchbase Server can store opaque binary data.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>Although the internal representation of the binary data differs greatly between the two, you can continue to store in Couchbase Server the binary data that you\u2019ve been storing in MongoDB.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>The main difference is that Couchbase Server can store binaries of up to 20MB in size, while MongoDB offers a convenience layer for chunking very large files into multiple documents.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p><a href=\"https:\/\/www.couchbase.com\/blog\/large-objects-in-a-database\/\">There are strong arguments against storing large binaries in your database<\/a>. When you have many very large binaries, you might consider using a dedicated object storage service to store them while using Couchbase to hold metadata on those binaries.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"sect1\">\n<h2 id=\"truearchitecture\">Architecture<\/h2>\n<div class=\"sectionbody\">\n<div class=\"sect2\">\n<h3 id=\"truesharding\">Sharding<\/h3>\n<div class=\"paragraph\">\n<p>Couchbase Server shards data, and scales horizontally, by automatically distributing a hash space amongst nodes in a cluster.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>It then uses the key of your document to decide where in the hash space\u2009\u2014\u2009and so on which node in the cluster\u2009\u2014\u2009that document resides. As a developer, this is abstracted away for you by the client SDK.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>With MongoDB you need to choose a sharding method and a shard key. The shard key is an indexed field inside your document that determines where in the cluster the document resides.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>The primary difference here is that Couchbase Server automatically handles all sharding for you, whereas MongoDB gives you the choice of sharding method and the shard key. If your applications relies on a particular distribution of data across the cluster then you\u2019ll need to adjust it to allow for the hash-based distribution used by Couchbase.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>Hash-based sharding greatly simplifies scaling compared to MongoDB. As a developer, you might think this doesn\u2019t concern you, and is an ops issue. However, it does mean that it\u2019s easier to rely on Couchbase Server should usage of your software grow.<\/p>\n<\/div>\n<\/div>\n<div class=\"sect2\">\n<h3 id=\"truereplication-and-consistency\">Replication and consistency<\/h3>\n<div class=\"imageblock\">\n<div class=\"content\"><img decoding=\"async\" src=\"\/wp-content\/original-assets\/2016\/december\/moving-from-mongodb-to-couchbase-server-revisited\/043_01_couchbase-three-nodes.png\" alt=\"Three Couchbase Server nodes using replication\" \/><\/div>\n<\/div>\n<div class=\"paragraph\">\n<p>Couchbase Server maintains a single active copy of each document and then up to three replicas; you can configure the number of replicas on a bucketwide or per operation basis.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>This means that, during normal operation, you deal with the same live copy each time you write into and read from a document. As a result, you don\u2019t have to handle conflicting versions of documents. The replicas come into play only when the active copy is unavailable.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>As a developer, the distribution and replication of documents is abstracted away for you. You write, read and query using your connection to the bucket and the SDK handles precisely where that data is stored. There\u2019s no need to factor in replica sets or sharding schemes.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>If you know the <a href=\"https:\/\/en.wikipedia.org\/wiki\/CAP_theorem\">CAP theorem<\/a>, then you also know that favoring consistency has an effect on availability. In the event of a node failure, its active documents will be unavailable for a short time to allow the cluster to promote the appropriate replicas to active status. In your code, all you need to do is retry a failed operation.<\/p>\n<\/div>\n<\/div>\n<div class=\"sect2\">\n<h3 id=\"trueindexing\">Indexing<\/h3>\n<div class=\"paragraph\">\n<p>Couchbase Server offers two broad types of index:<\/p>\n<\/div>\n<div class=\"ulist\">\n<ul>\n<li>GSI: global secondary indexes<\/li>\n<li>views: generated by map-reduce queries. The difference is more than an implementation detail, in that you create and manage both types of index differently. Mostly, you\u2019ll use GSI indexes to replicate your MongoDB indexes.<\/li>\n<\/ul>\n<\/div>\n<div class=\"responsive-table\">\n<table class=\"tableblock frame-all grid-all spread\">\n<tbody>\n<tr>\n<td class=\"tableblock halign-left valign-top\">\n<p class=\"tableblock\"><strong>MongoDB<\/strong><\/p>\n<\/td>\n<td class=\"tableblock halign-left valign-top\">\n<p class=\"tableblock\"><strong>Couchbase Server<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td class=\"tableblock halign-left valign-top\">\n<p class=\"tableblock\">Single field<\/p>\n<\/td>\n<td class=\"tableblock halign-left valign-top\">\n<p class=\"tableblock\"><a href=\"https:\/\/developer.couchbase.com\/documentation\/server\/current\/indexes\/gsi-for-n1ql.html?utm_source=blogs&amp;utm_medium=link&amp;utm_campaign=blogs\">GSI<\/a><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td class=\"tableblock halign-left valign-top\">\n<p class=\"tableblock\">Compound index<\/p>\n<\/td>\n<td class=\"tableblock halign-left valign-top\">\n<p class=\"tableblock\"><a href=\"https:\/\/developer.couchbase.com\/documentation\/server\/current\/indexes\/gsi-for-n1ql.html?utm_source=blogs&amp;utm_medium=link&amp;utm_campaign=blogs\">GSI<\/a><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td class=\"tableblock halign-left valign-top\">\n<p class=\"tableblock\">Multi-key index<\/p>\n<\/td>\n<td class=\"tableblock halign-left valign-top\">\n<p class=\"tableblock\"><a href=\"https:\/\/developer.couchbase.com\/documentation\/server\/current\/indexes\/gsi-for-n1ql.html?utm_source=blogs&amp;utm_medium=link&amp;utm_campaign=blogs\">GSI<\/a><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td class=\"tableblock halign-left valign-top\">\n<p class=\"tableblock\">Geospatial index<\/p>\n<\/td>\n<td class=\"tableblock halign-left valign-top\">\n<p class=\"tableblock\"><a href=\"https:\/\/developer.couchbase.com\/documentation\/server\/current\/indexes\/querying-using-spatial-views.html?utm_source=blogs&amp;utm_medium=link&amp;utm_campaign=blogs\">Spatial index in views<\/a><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td class=\"tableblock halign-left valign-top\">\n<p class=\"tableblock\">Text index<\/p>\n<\/td>\n<td class=\"tableblock halign-left valign-top\">\n<p class=\"tableblock\"><a href=\"https:\/\/developer.couchbase.com\/documentation\/server\/current\/sdk\/full-text-search-overview.html?utm_source=blogs&amp;utm_medium=link&amp;utm_campaign=blogs\">Full-Text Search<\/a><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<div class=\"sect2\">\n<h3 id=\"truenode-types\">Node types<\/h3>\n<div class=\"paragraph\">\n<p>When you grow beyond one MongoDB server you need to introduce router processes and config servers.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>With Couchbase Server, both these functions are found in the client SDK. When you connect to the cluster from your application, the SDK receives a map of where in the cluster each shard lives. Couchbase Server then automatically updates the cluster map each time the shape of the cluster changes. Each request then happens directly from the application server to the relevant Couchbase node.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>Once your cluster grows, you can choose to run specialised data, query and indexing nodes. <a href=\"https:\/\/developer.couchbase.com\/documentation\/server\/current\/clustersetup\/services-mds.html?utm_source=blogs&amp;utm_medium=link&amp;utm_campaign=blogs\">Read more about multi-dimensional scaling<\/a>.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>This all happens transparently to you as the developer.<\/p>\n<\/div>\n<\/div>\n<div class=\"sect2\">\n<h3 id=\"truebuckets-and-collections\">Buckets and collections<\/h3>\n<div class=\"paragraph\">\n<p>Both Couchbase Server and MongoDB allow you to divide your dataset into groups of documents: Couchbase has buckets and MongoDB has collections.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>While MongoDB collections are of an equivalent scope to relational tables, Couchbase Server buckets are perhaps more the equivalent of a relational database.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>That distinction matters because usually you\u2019d want no more than ten buckets in a single Couchbase cluster. This makes them unsuitable as namespaces. Instead they serve as a way to share configuration and modeling decisions between similar types of documents.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>This has two main consequences:<\/p>\n<\/div>\n<div class=\"ulist\">\n<ul>\n<li>You need another way to namespace your documents<\/li>\n<li>You need to think about when it\u2019s appropriate to create a new bucket.<\/li>\n<\/ul>\n<\/div>\n<div class=\"sect3\">\n<h4 id=\"truewhen-to-use-multiple-buckets\">When to use multiple buckets<\/h4>\n<div class=\"paragraph\">\n<p>First, we need to think about how you can allocate resources to buckets. The two big considerations are:<\/p>\n<\/div>\n<div class=\"ulist\">\n<ul>\n<li>RAM<\/li>\n<li>Views and indexes.<\/li>\n<\/ul>\n<\/div>\n<div class=\"paragraph\">\n<p>When you create a bucket, you allocate to it a portion of each machine\u2019s RAM. The RAM you give to a bucket should be big enough to store the working set of that data plus the few bytes of metadata associated with each document.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>This means you can allocate different amounts of RAM appropriately to different datasets based on how you access them.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>Similarly, Couchbase views and indexes run across the documents inside a bucket, much as a MongoDB map-reduce query runs across a single collection.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>If you have some documents that don\u2019t need indexing\u2009\u2014\u2009because you only ever access them through their key\u2009\u2014\u2009and you have some groups of documents that have different velocities, you can see that it would be prudent never to run indexers on the first set of data and to run the indexers with appropriate intervals across the rest.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>Dividing our data into different buckets lets us accomplish both good use of RAM and of the CPU time needed by the indexers.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>Let\u2019s look at an example of an ecommerce application: the data you\u2019d store, its profile and how you respond to that in your bucket configuration.<\/p>\n<\/div>\n<div class=\"responsive-table\">\n<table class=\"tableblock frame-all grid-all spread\">\n<tbody>\n<tr>\n<td class=\"tableblock halign-left valign-top\">\n<p class=\"tableblock\"><strong>Data type<\/strong><\/p>\n<\/td>\n<td class=\"tableblock halign-left valign-top\">\n<p class=\"tableblock\"><strong>Data profile<\/strong><\/p>\n<\/td>\n<td class=\"tableblock halign-left valign-top\">\n<p class=\"tableblock\"><strong>Bucket profile<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td class=\"tableblock halign-left valign-top\">\n<p class=\"tableblock\">Sessions<\/p>\n<\/td>\n<td class=\"tableblock halign-left valign-top\">\n<p class=\"tableblock\">Fast responses, key-value access, predictable concurrent sessions<\/p>\n<\/td>\n<td class=\"tableblock halign-left valign-top\">\n<p class=\"tableblock\">RAM to fit typical number of live sessions, <strong>no indexing<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td class=\"tableblock halign-left valign-top\">\n<p class=\"tableblock\">User profiles<\/p>\n<\/td>\n<td class=\"tableblock halign-left valign-top\">\n<p class=\"tableblock\">Fast responses while users active, data changes slowly<\/p>\n<\/td>\n<td class=\"tableblock halign-left valign-top\">\n<p class=\"tableblock\">RAM to fit user profiles for typical number of live sessions, indexing on<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td class=\"tableblock halign-left valign-top\">\n<p class=\"tableblock\">Order data<\/p>\n<\/td>\n<td class=\"tableblock halign-left valign-top\">\n<p class=\"tableblock\">Read-heavy after initial creation, short lifetime<\/p>\n<\/td>\n<td class=\"tableblock halign-left valign-top\">\n<p class=\"tableblock\">RAM to fit orders for typical number of live sessions, indexing on<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td class=\"tableblock halign-left valign-top\">\n<p class=\"tableblock\">Product data<\/p>\n<\/td>\n<td class=\"tableblock halign-left valign-top\">\n<p class=\"tableblock\">Fast responses needed, read heavy<\/p>\n<\/td>\n<td class=\"tableblock halign-left valign-top\">\n<p class=\"tableblock\">RAM to fit entire catalogue, indexing on<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<div class=\"paragraph\">\n<p>It\u2019s a little more involved than deciding whether indexing is on or off. Rather, you choose the types of index, and the velocity of updates decides how often the indexers run. Mixing slow and fast moving data could be inefficient because a bucket\u2019s indexers run across all documents in that bucket, including those that are unchanged.<\/p>\n<\/div>\n<\/div>\n<div class=\"sect3\">\n<h4 id=\"truenamespacing-documents\">Namespacing documents<\/h4>\n<div class=\"paragraph\">\n<p>If we can\u2019t use buckets as namespaces, how do we easily distinguish different types of document?<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>You should use a combination of:<\/p>\n<\/div>\n<div class=\"ulist\">\n<ul>\n<li>Key naming<\/li>\n<li>Using a &#8220;type&#8221; in your JSON document.<\/li>\n<\/ul>\n<\/div>\n<div class=\"paragraph\">\n<p><a href=\"https:\/\/www.couchbase.com\/blog\/data-modelling-key-design\/\">Using semantic prefixes and suffixes in your key names<\/a> is an easy way to namespace your documents, particularly when you\u2019re using Couchbase for key-value.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>Requiring a type in your document schemas gives you the data you need to create queries that apply only to certain types of document.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"sect1\">\n<h2 id=\"trueprogramming-model\">Programming model<\/h2>\n<div class=\"sectionbody\">\n<div class=\"paragraph\">\n<p>There are three ways of working with Couchbase Server:<\/p>\n<\/div>\n<div class=\"ulist\">\n<ul>\n<li>Simple key-value access: strong consistency, sub-millisecond responses<\/li>\n<li>Views: generated by map-reduce queries<\/li>\n<li>N1QL: SQL-like querying (with JOINs)<\/li>\n<\/ul>\n<\/div>\n<div class=\"paragraph\">\n<p>Coming from MongoDB, you might be tempted to translate all of your MongoDB queries into N1QL. However, it\u2019s worth thinking about the relative merits of each and then using the mix that suits your needs.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>You can get a long way with key-value access, such as by using <a href=\"https:\/\/www.couchbase.com\/blog\/manual-secondary-indexes\/\">manual secondary indexes<\/a>.<\/p>\n<\/div>\n<div class=\"sect2\">\n<h3 id=\"truequery\">Query<\/h3>\n<div class=\"paragraph\">\n<p>Couchbase Server offers <a href=\"https:\/\/www.couchbase.com\/products\/n1ql\/\">N1QL<\/a>. N1QL is a SQL-like language and is quite different from querying in MongoDB.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>Let\u2019s look at an example where we return the name of employees from the Mountain View office who have worked there for two years or more, ordered by start date:<\/p>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"content\">\n<pre class=\"highlightjs highlight\"><code class=\"language-SQL\">SELECT name\r\nFROM `hr`\r\nWHERE office='Mountain View'\r\nAND type='employee'\r\nAND DATE_DIFF_MILLIS(startDate, NOW_MILLIS) &gt;= 63113904000\r\nORDER BY startDate;<\/code><\/pre>\n<\/div>\n<\/div>\n<div class=\"paragraph\">\n<p>N1QL should be very familiar to you if you\u2019ve ever worked with SQL. You\u2019ll be able to translate your MongoDB queries to N1QL with relatively little effort.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>Before you begin rewriting your queries, you should consider one major advantage that N1QL offers: you can perform <a href=\"https:\/\/developer.couchbase.com\/documentation\/server\/4.5\/n1ql\/n1ql-language-reference\/from.html?utm_source=blogs&amp;utm_medium=link&amp;utm_campaign=blogs\">JOINs<\/a> across documents. Let\u2019s take our query above and also return the name of each person\u2019s manager.<\/p>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"content\">\n<pre class=\"highlightjs highlight\"><code class=\"language-java\">SELECT r.name, s.name AS manager\r\nFROM `hr` r\r\nJOIN `hr` s ON KEYS r.manager\r\nWHERE r.office='Mountain View'\r\nAND r.type='employee'\r\nAND DATE_DIFF_MILLIS(r.startDate, NOW_MILLIS) &gt;= 63113904000\r\nORDER BY r.startDate;<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"sect2\">\n<h3 id=\"trueconcurrency\">Concurrency<\/h3>\n<div class=\"paragraph\">\n<p>In Couchbase Server, locking always happens at the document level and there are two types:<\/p>\n<\/div>\n<div class=\"ulist\">\n<ul>\n<li>Pessimistic: no other actor can write to that document until it is released or a timeout is hit<\/li>\n<li>Optimistic: use CAS (check-and-set) values to check if the document has changed since you last touched it and the act accordingly.<\/li>\n<\/ul>\n<\/div>\n<div class=\"paragraph\">\n<p><a href=\"https:\/\/www.couchbase.com\/blog\/optimistic-or-pessimistic-locking-which-one-should-you-pick\/\">Optimistic locking<\/a> can be more efficient, but pessimistic locking may be necessary sometimes. <a href=\"https:\/\/www.couchbase.com\/blog\/optimistic-or-pessimistic-locking-which-one-should-you-pick\/\">Read more about choosing the right type of lock<\/a>.<\/p>\n<\/div>\n<\/div>\n<div class=\"sect2\">\n<h3 id=\"truelibraries-and-integrations\">Libraries and integrations<\/h3>\n<div class=\"paragraph\">\n<p>There are <a href=\"https:\/\/developer.couchbase.com\/open-source-projects\">officially supported SDKs<\/a> for all major languages, including Java, .NET, NodeJS, Python, Go, Ruby and C. You\u2019ll also find community-developed client libraries for languages including Erlang.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>Similarly there are official integrations with <a href=\"https:\/\/projects.spring.io\/spring-data-couchbase\/\">Spring Data<\/a>, <a href=\"https:\/\/developer.couchbase.com\/documentation\/server\/current\/connectors\/intro.html\">Spark, Hadoop, Kafka, Talend, Elasticsearch, and ODBC\/JDBC<\/a>, <a href=\"https:\/\/github.com\/couchbaselabs\/Linq2Couchbase\">Linq2Couchbase<\/a> for .NET, and there\u2019s a <a href=\"https:\/\/www.npmjs.com\/package\/ottoman\">NodeJS ODM called Ottoman<\/a>. If you currently use Mongoose for MongoDB, watch this <a href=\"https:\/\/www.youtube.com\/embed\/wTvDKIQiVgE\">video on Migrating from MongoDB with Ottoman.js<\/a>.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"sect1\">\n<h2 id=\"trueconclusion\">Conclusion<\/h2>\n<div class=\"sectionbody\">\n<div class=\"paragraph\">\n<p>Moving from one document store to another is relatively straightforward, as the broad shape of your data doesn\u2019t need to change all that much (as opposed to a relational migration).<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>As a developer porting an application from MongoDB to Couchbase Server, your main considerations are that you need to:<\/p>\n<\/div>\n<div class=\"ulist\">\n<ul>\n<li>Replace collection namespacing with key naming and document types<\/li>\n<li>Simplify your queries by using N1QL JOINs<\/li>\n<li>Consider where key-value access can be the best choice.<\/li>\n<\/ul>\n<\/div>\n<div class=\"paragraph\">\n<p>If you\u2019re moving from MongoDB to Couchbase Server, you certainly aren\u2019t the first. That\u2019s great news for you because you\u2019ll find people who\u2019ve made the switch before in <a href=\"https:\/\/www.couchbase.com\/forums\/?utm_source=blogs&amp;utm_medium=link&amp;utm_campaign=blogs\">the Couchbase forums<\/a>.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>If you have any questions, comments, or if you find anything inaccurate, please leave a comment or reach out to <a href=\"https:\/\/twitter.com\/mgroves\">me on Twitter<\/a>.<\/p>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Note: this blog post is a revist of Matthew Revell\u2019s Moving from MongoDB to Couchbase Server This is a developer-focused guide to moving your application\u2019s data store from MongoDB to Couchbase Server. If you\u2019re interested in migrating from a relational [&hellip;]<\/p>\n","protected":false},"author":18,"featured_media":13873,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[1814,1816,1819,1812],"tags":[1261,1458,1309],"ppma_author":[8982],"class_list":["post-2454","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-application-design","category-couchbase-server","category-data-modeling","category-n1ql-query","tag-json","tag-migration","tag-mongodb"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.3 (Yoast SEO v27.3) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Moving from MongoDB to Couchbase server (revisited)<\/title>\n<meta name=\"description\" content=\"This post will guide you how to move your application\u2019s data store from MongoDB to Couchbase Server. Also see difference between MongoDB vs Couchbase.\" \/>\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\/moving-from-mongodb-to-couchbase-server-revisited\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Moving from MongoDB to Couchbase server (revisited)\" \/>\n<meta property=\"og:description\" content=\"This post will guide you how to move your application\u2019s data store from MongoDB to Couchbase Server. Also see difference between MongoDB vs Couchbase.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.couchbase.com\/blog\/moving-from-mongodb-to-couchbase-server-revisited\/\" \/>\n<meta property=\"og:site_name\" content=\"The Couchbase Blog\" \/>\n<meta property=\"article:published_time\" content=\"2016-12-12T14:52:51+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-06-14T02:29:36+00:00\" \/>\n<meta name=\"author\" content=\"Matthew Revell, Lead Developer Advocate, EMEA, Couchbase\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Matthew Revell, Lead Developer Advocate, EMEA, Couchbase\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"10 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/moving-from-mongodb-to-couchbase-server-revisited\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/moving-from-mongodb-to-couchbase-server-revisited\\\/\"},\"author\":{\"name\":\"Matthew Revell, Lead Developer Advocate, EMEA, Couchbase\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#\\\/schema\\\/person\\\/6c3060a94353df62a71d4672b3454555\"},\"headline\":\"Moving from MongoDB to Couchbase server (revisited)\",\"datePublished\":\"2016-12-12T14:52:51+00:00\",\"dateModified\":\"2025-06-14T02:29:36+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/moving-from-mongodb-to-couchbase-server-revisited\\\/\"},\"wordCount\":2240,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/moving-from-mongodb-to-couchbase-server-revisited\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/1\\\/2022\\\/11\\\/couchbase-nosql-dbaas.png\",\"keywords\":[\"JSON\",\"migration\",\"mongodb\"],\"articleSection\":[\"Application Design\",\"Couchbase Server\",\"Data Modeling\",\"SQL++ \\\/ N1QL Query\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/moving-from-mongodb-to-couchbase-server-revisited\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/moving-from-mongodb-to-couchbase-server-revisited\\\/\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/moving-from-mongodb-to-couchbase-server-revisited\\\/\",\"name\":\"Moving from MongoDB to Couchbase server (revisited)\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/moving-from-mongodb-to-couchbase-server-revisited\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/moving-from-mongodb-to-couchbase-server-revisited\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/1\\\/2022\\\/11\\\/couchbase-nosql-dbaas.png\",\"datePublished\":\"2016-12-12T14:52:51+00:00\",\"dateModified\":\"2025-06-14T02:29:36+00:00\",\"description\":\"This post will guide you how to move your application\u2019s data store from MongoDB to Couchbase Server. Also see difference between MongoDB vs Couchbase.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/moving-from-mongodb-to-couchbase-server-revisited\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/moving-from-mongodb-to-couchbase-server-revisited\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/moving-from-mongodb-to-couchbase-server-revisited\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/1\\\/2022\\\/11\\\/couchbase-nosql-dbaas.png\",\"contentUrl\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/1\\\/2022\\\/11\\\/couchbase-nosql-dbaas.png\",\"width\":1800,\"height\":630},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/moving-from-mongodb-to-couchbase-server-revisited\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Moving from MongoDB to Couchbase server (revisited)\"}]},{\"@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\\\/6c3060a94353df62a71d4672b3454555\",\"name\":\"Matthew Revell, Lead Developer Advocate, EMEA, Couchbase\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3b38ea45b78371f0008a765ea828bfed91aa97c25981ebf214226402a510b39b?s=96&d=mm&r=gb1bc555cd9166b46d6063003c3b92317\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3b38ea45b78371f0008a765ea828bfed91aa97c25981ebf214226402a510b39b?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3b38ea45b78371f0008a765ea828bfed91aa97c25981ebf214226402a510b39b?s=96&d=mm&r=g\",\"caption\":\"Matthew Revell, Lead Developer Advocate, EMEA, Couchbase\"},\"description\":\"Matthew Revell is a Lead Dev Advocate, EMEA Couchbase. He developed a global strategy for putting Couchbase front in the minds of the product's developers.\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/author\\\/matthew-revell\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Moving from MongoDB to Couchbase server (revisited)","description":"This post will guide you how to move your application\u2019s data store from MongoDB to Couchbase Server. Also see difference between MongoDB vs Couchbase.","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\/moving-from-mongodb-to-couchbase-server-revisited\/","og_locale":"en_US","og_type":"article","og_title":"Moving from MongoDB to Couchbase server (revisited)","og_description":"This post will guide you how to move your application\u2019s data store from MongoDB to Couchbase Server. Also see difference between MongoDB vs Couchbase.","og_url":"https:\/\/www.couchbase.com\/blog\/moving-from-mongodb-to-couchbase-server-revisited\/","og_site_name":"The Couchbase Blog","article_published_time":"2016-12-12T14:52:51+00:00","article_modified_time":"2025-06-14T02:29:36+00:00","author":"Matthew Revell, Lead Developer Advocate, EMEA, Couchbase","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Matthew Revell, Lead Developer Advocate, EMEA, Couchbase","Est. reading time":"10 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.couchbase.com\/blog\/moving-from-mongodb-to-couchbase-server-revisited\/#article","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/moving-from-mongodb-to-couchbase-server-revisited\/"},"author":{"name":"Matthew Revell, Lead Developer Advocate, EMEA, Couchbase","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/6c3060a94353df62a71d4672b3454555"},"headline":"Moving from MongoDB to Couchbase server (revisited)","datePublished":"2016-12-12T14:52:51+00:00","dateModified":"2025-06-14T02:29:36+00:00","mainEntityOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/moving-from-mongodb-to-couchbase-server-revisited\/"},"wordCount":2240,"commentCount":0,"publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/moving-from-mongodb-to-couchbase-server-revisited\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","keywords":["JSON","migration","mongodb"],"articleSection":["Application Design","Couchbase Server","Data Modeling","SQL++ \/ N1QL Query"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.couchbase.com\/blog\/moving-from-mongodb-to-couchbase-server-revisited\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.couchbase.com\/blog\/moving-from-mongodb-to-couchbase-server-revisited\/","url":"https:\/\/www.couchbase.com\/blog\/moving-from-mongodb-to-couchbase-server-revisited\/","name":"Moving from MongoDB to Couchbase server (revisited)","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/moving-from-mongodb-to-couchbase-server-revisited\/#primaryimage"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/moving-from-mongodb-to-couchbase-server-revisited\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","datePublished":"2016-12-12T14:52:51+00:00","dateModified":"2025-06-14T02:29:36+00:00","description":"This post will guide you how to move your application\u2019s data store from MongoDB to Couchbase Server. Also see difference between MongoDB vs Couchbase.","breadcrumb":{"@id":"https:\/\/www.couchbase.com\/blog\/moving-from-mongodb-to-couchbase-server-revisited\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.couchbase.com\/blog\/moving-from-mongodb-to-couchbase-server-revisited\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/moving-from-mongodb-to-couchbase-server-revisited\/#primaryimage","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","width":1800,"height":630},{"@type":"BreadcrumbList","@id":"https:\/\/www.couchbase.com\/blog\/moving-from-mongodb-to-couchbase-server-revisited\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.couchbase.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Moving from MongoDB to Couchbase server (revisited)"}]},{"@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\/6c3060a94353df62a71d4672b3454555","name":"Matthew Revell, Lead Developer Advocate, EMEA, Couchbase","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/3b38ea45b78371f0008a765ea828bfed91aa97c25981ebf214226402a510b39b?s=96&d=mm&r=gb1bc555cd9166b46d6063003c3b92317","url":"https:\/\/secure.gravatar.com\/avatar\/3b38ea45b78371f0008a765ea828bfed91aa97c25981ebf214226402a510b39b?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/3b38ea45b78371f0008a765ea828bfed91aa97c25981ebf214226402a510b39b?s=96&d=mm&r=g","caption":"Matthew Revell, Lead Developer Advocate, EMEA, Couchbase"},"description":"Matthew Revell is a Lead Dev Advocate, EMEA Couchbase. He developed a global strategy for putting Couchbase front in the minds of the product's developers.","url":"https:\/\/www.couchbase.com\/blog\/author\/matthew-revell\/"}]}},"acf":[],"authors":[{"term_id":8982,"user_id":18,"is_guest":0,"slug":"matthew-revell","display_name":"Matthew Revell, Lead Developer Advocate, EMEA, Couchbase","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/3b38ea45b78371f0008a765ea828bfed91aa97c25981ebf214226402a510b39b?s=96&d=mm&r=g","0":null,"1":"","2":"","3":"","4":"","5":"","6":"","7":"","8":""}],"_links":{"self":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/2454","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/users\/18"}],"replies":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/comments?post=2454"}],"version-history":[{"count":0,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/2454\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/media\/13873"}],"wp:attachment":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/media?parent=2454"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/categories?post=2454"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/tags?post=2454"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=2454"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}