Skip to Content
Seven Databases in Seven Weeks, 2nd Edition
book

Seven Databases in Seven Weeks, 2nd Edition

by Luc Perkins, Eric Redmond, Jim Wilson
April 2018
Beginner to intermediate
360 pages
8h 54m
English
Pragmatic Bookshelf
Content preview from Seven Databases in Seven Weeks, 2nd Edition

Day 2: Creating and Querying Views

In CouchDB, a view is a window into the documents contained in a database. Views are the principal way that documents are accessed in all but trivial cases, such as those individual CRUD operations you saw on Day 1. Today, you’ll discover how to create the functions that make up a view. You’ll also learn how to perform ad hoc queries against views using cURL. Finally, you’ll import music data, which will make the views more salient and demonstrate how to use couchrest, a popular Ruby library for working with CouchDB.

Accessing Documents Through Views

A view consists of mapper and reducer functions that are used to generate an ordered list of key-value pairs. Both keys and values can be any valid JSON. The ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Microsoft Power BI - The Complete Masterclass - 2025 EDITION

Microsoft Power BI - The Complete Masterclass - 2025 EDITION

Nikolai Schuler

Publisher Resources

ISBN: 9781680505962Errata Page