Working with CouchDB is a joy for many developers, something we’re reading again and again in this year’s Annual Apache CouchDB User Survey (which you can take part in if you haven’t already). That’s why it’s the relaxing database technology to work with.
But one challenge has persisted: how do you query CouchDB in a way that feels familiar and intuitive if you’re already used to SQL? Enter Structured Query Server (SQS), Neighbourhoodie’s solution to bring the power of SQL to CouchDB.
🎁 It’s our birthday! We’re celebrating 10 years of helping teams achieve success with CouchDB and Offline First by gifting 5 FREE SQS licences back to the CouchDB community. Visit our blog to learn how to claim your licence while they’re still up for grabs.
Some Historical Context
Members of our team have been part of the CouchDB community for over 15 years, and Neighbourhoodie a part of it for 10. In that time, we’ve seen CouchDB become a resilient, flexible database solution used in diverse projects and for a wide array of use-cases. But, even with its strengths, CouchDB’s querying capabilities often left teams longing for the ease — and familiarity — of SQL.
We created SQS to help teams solve that problem. Our goal is simple: make it easy for developers, data analysts, and even product managers, to query CouchDB while preserving its flexibility and performance.
Principles Behind SQS
When we set out to build SQS, we weren’t just solving a convenience problem. We were tackling a long-standing challenge of integrating structured query into CouchDB’s schema-free world. Here are the principles that kept us focused on delivering a tool to enhance the CouchDB ecosystem:
SQS is about helping members of a team feel at home with CouchDB, whether they have a relational or document-based background. It aims to bridge a conceptual gap between the two, without burdening users with complexity.
SQS is designed to enhance the best of CouchDB and make it a more versatile technology, not simply recreate a relational database.
Your enterprise legacy SQL systems can now easily integrate with the newest CouchDB applications and skip migration and infrastructure changes.
How Does SQS Work?
Structured Query Server makes it possible to use SQL SELECT
statements to query and retrieve data from a CouchDB database. To do this, it creates a mirror of the original database in SQLite, where each CouchDB document is represented in a table and categorised by its type
property. The schema for this SQLite database is defined using CouchDB design documents. As the underlying CouchDB data changes, the SQLite copy is automatically kept in sync, just like any other CouchDB views. This setup ensures that SQS functions seamlessly with both CouchDB clusters and single-node instances, providing a consistent querying experience in different deployment scenarios.
What’s the Tradeoff?
CouchDB is designed to scale seamlessly and accommodate multi-node clusters with (way) upwards of millions of documents. While this is its strength, in our experience, most projects make moderate use of this capability. If this sounds like you, then SQS is a good fit. It’s designed to perform as fast as JavaScript View Query Server, and sometimes even outperforms it.
If you want to try it out risk-free, join us for our birthday celebration and grab your FREE licence by sending a very short email with a couple of lines about your project and why SQS is a good fit for your team to sqs@neighbourhood.ie. Check out our blog for more details on this limited special.
Find out more about SQS on our website. We’ve also written an introduction that covers even more installation, set-up and usage topics.
How are you querying CouchDB? Let us know in the comments ⬇️
Do you want to find out when Neighbourhoodie publishes new CouchDB tools or has another giveaway? We’ll occasionally send CouchDB tips and specials right to your inbox when you join our mailing list.
Top comments (0)