Misconceptions about NoSQL have been around for as long as NoSQL itself. It’s always good to get different perspectives, so I’m kicking off a new blog series about NoSQL misconceptions, specifically when it comes to two of the top document database companies in the world: Couchbase and MongoDB.

I’m going to address some of the misconceptions that Mongo has made about Couchbase and NoSQL and¬†some of the more common misconceptions and misunderstandings that I’ve heard in the developer community in general.

NoSQL means you can’t write SQL

I can’t really blame anyone for this misconception. It’s right in the name! And for many NoSQL databases, such as Mongo, this is absolutely true. However, NoSQL can also mean “Not Only SQL,” and Couchbase is the first JSON document database to truly fulfill that promise.

With Couchbase, data can be accessed in multiple ways:

    • Simple and efficient Key-value lookup
    • SQL++ querying (previously called “N1QL”)
    • Full-Text Search
    • Analytics (also with SQL++)
    • Mobile sync

Couchbase is a multi-model database: you can start with simple-to-understand key-value operations and progress to SQL++ or Full-Text Search when you need those services. It’s all the same pool of data: no need to bolt on extra tools or integrations. It’s all in the box with Couchbase.

Couchbase isn’t the only NoSQL database exploring SQL: Microsoft’s CosmosDB and Amazon’s PartiQL also offer some degree of SQL compatibility (albeit not as full-featured as Couchbase’s SQL++). But the adoption of SQL++ as a standard makes for a more natural transition from legacy/relational databases.

SQL++ for SQL Users by Don Chamberlin

I’d also recommend a resource for further research: SQL++ for SQL Users, a book by one of the inventors of SQL, Don Chamberlain (also available for free download, courtesy of Couchbase).

NoSQL has a steep learning curve

With all these ways to interact with data, it must be complicated. Mongo specifically calls out Couchbase: “this growth in functionality comes at a cost: an explosion in complexity for developers“.

However, you do not need to use all these tools right away. You can start with a familiar SQL query or a simple-to-use key-value API. Later, when your use case requires it, you can advance to more complex SQL++ for flexibility, sub-document API for performance,or a full-text search index for efficient searching.

When it comes to issues with learning NoSQL databases, they’ve been all but eliminated when it comes to Couchbase compared to others. Couchbase has constantly been working to make the developer experience smoother, including:

    • Couchbase Playgrounda completely free, in-browser experience to modify and execute code samples for all SDKs (Java, Node.js, Python, .NET, PHP, Ruby, Scala, Go, C++, and Kotlin).
    • Couchbase Capella¬†– a fully managed and hosted Database-as-a-Service (DBaaS) to reduce the overhead and time needed to perform administrative tasks. Just get a connection string and start coding.

And, I’ll again mention SQL++ because SQL is the most popular language in the world for working with data. Consider this side-by-side comparison of a SQL++ query and a Mongo query, which both return the same result:

NoSQL Query examples Mongodb vs. Couchbase

Not only is the SQL example more concise and arguably more readable than the proprietary Mongo query language, but it’s also a standard language understood by a large percentage of developers and software professionals.

Couchbase has invested in the SQL standard for years, and in a challenging hiring market, SQL can be a skill that makes the NoSQL learning curve much less steep.

More resources

Since this blog post is on Couchbase.com, of course I am biased. So, make sure to do some further research.

Here are some resources that can help you:

What’s next?

In the next post, I’ll dig into more misconceptions: is Couchbase “just” a key-value store? Is Couchbase missing critical text search functionality? And how does Couchbase compare in these areas to other leading NoSQL databases like Mongo?

Want to discuss this further? You are welcome to join the Couchbase Discord for further conversation, questions, and answers with the Couchbase staff and community.

Author

Posted by Matthew Groves

Matthew D. Groves is a guy who loves to code. It doesn't matter if it's C#, jQuery, or PHP: he'll submit pull requests for anything. He has been coding professionally ever since he wrote a QuickBASIC point-of-sale app for his parent's pizza shop back in the 90s. He currently works as a Senior Product Marketing Manager for Couchbase. His free time is spent with his family, watching the Reds, and getting involved in the developer community. He is the author of AOP in .NET, Pro Microservices in .NET, a Pluralsight author, and a Microsoft MVP.

Leave a reply