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.
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 Playground – a 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:
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.
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:
- A presentation from Steve Yen, one of the founders of Couchbase: Why Couchbase?
- More details about SQL++ from Lior King, a long time engineer at Couchbase: Climbing the Query Peak
- Please visit the Couchbase Playground, and try Couchbase with your language of choice.
- Download Don Chamberlin’s book, SQL++ for SQL Users
- Sign up for a Couchbase Capella trial for free. No credit card is required. And please let me know how you find the learning curve: we are listening, and want to continuously improve the experience for you.
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.