We were excited to talk with Gregory (MadPink) Miller recently about his new CouchDB Udemy course (yay for coupon codes!). The course itself helps students learn how to do the following:
- Install and configure CouchDB
- Understand differences between CouchDB and traditional databases
- Create and edit documents and databases
- Security options for CouchDB
- Work with design documents and Map/Reduce to query data
- Work with the Mango Query system to query data
- Utilize replication and clustering
- Perform many actions in bulk
After learning of this amazing resource, we were delighted to continue the conversation and learn more about how Gregory first discovered CouchDB and what his experience has been like employing it in applications.
How did you hear about CouchDB, and why did you choose to use it?
My primary programming language is Livecode which is a cross-platform rapid-application development platform. There is built-in support for SQL type databases, and I grudgingly used it, but was never very satisfied with tabular data. There were no other database drivers or libraries, and I was in the market for something new. Livecode has excellent support for REST APIs, so I began searching.
When I first came across CouchDB, I knew nothing about NoSQL databases… or better yet, I knew nothing but the traditional relational database management system (RDBMS) offerings. I was searching for methods of accessing MySQL through a REST API and for converting JSON to a format that could more easily be inserted into a database. Luckily I started asking questions on a forum and someone sent me a link to CouchDB.
I am going to admit that the old logo with the silhouette relaxing on a couch instantly endeared itself to me. I was practically hooked immediately. Once I downloaded and ran CouchDB, I was totally in love with it. I was amazed that I could finally structure my data exactly how I like it. Most of my app data tends to be in hierarchical trees that would take hours to reformat to be able to insert into a table. So if I want to summarize why I choose to use CouchDB it was, “My data, my way.” No more reformatting, no more having to link tables, no more inserting new columns and joins because I thought of one more thing I needed to add. CouchDB gives me a huge amount of flexibility.
Did you have a specific problem that CouchDB solved?
I actually had specific problems for 2 unrelated projects that I had no idea could be solved with this one simple change.
I had created an application for a local shop that allowed customers to browse images and search for specific kinds of work or examples from a particular artist. All data at the time was saved in local files on a single computer. The problem arose when their business expanded and the data needed to be shared among multiple computers. We tried local sharing, and a few other ideas, but none of the solutions were reliable. Dreading the work ahead, I resigned myself to reformatting the data to go into a MySQL database.
Meanwhile, at my full-time job for a research company, I was creating a CATI (computer-assisted telephone interviewing) system from scratch. The traditional model for this type of software is a server/client setup, where the server does all the heavy lifting, keeps track of call histories and makes all the decisions about what to do next. So I was storing data on the server, it was being translated in to JSON and sent to the client. But it was sloooooow and inefficient.
Discovering CouchDB fixed both my issues. At the shop, I set up CouchDB on one machine and without reformatting, I added all the existing data to a database. Less than a half hour later, all of the machines in the shop were accessing it. Back in the office, I ditched the server model entirely, and using CouchDB and a few design documents, made it so that the client computers could make all the decisions necessary to function. Things sped up considerably and again, I could use the data exactly how it was already structured in the program.
What would you say is the top benefit of using CouchDB?
- Schemaless – I can format my data the way I want, and adding new keys to a record doesn’t require tons of preplanning or refactoring.
- REST API – I can access my databases easily with any programming language, especially Livecode.
- The Changes stream – I use Livecode as a backend system for mobile apps, and the
_changes feed
is great for syncing with local data.
What tools are you using in addition for your infrastructure? Have you discovered anything that pairs well with CouchDB?
Again, my primary programming language Livecode fits very well with CouchDB. I’ve created a library called “Daybed,” available on GitHub, that accesses CouchDB and synchronizes with local files.
What are your future plans with your project? Any cool plans or developments you want to promote?
At this point, I use CouchDB with almost every project I create. I am trying to replace old dated programs at work with new ones that use CouchDB as a backend. For example, we are still using a program based on MS Access that keeps track of all participants in research studies. I am working on a new program to handle all that with CouchDB, that would also integrate with the previously mentioned CATI program.
CouchDB is the backend for an iPad app I have on the Apple app store, with a Mac version coming soon. (Lite version also available)
I’m most excited about my Udemy course on CouchDB, I’m happy to provide a coupon code for CouchDB Blog readers. The course’s curriculum is available for more information.
Use cases are a great avenue for sharing useful technical information. Please consider joining the fun! Additionally, if there’s something you’d like to see covered on the CouchDB blog, we would love to accommodate. Email us!
For more about CouchDB visit couchdb.org or follow us on Twitter at @couchdb.