Contents
Preface
IntroductionConventions Used in This BookUsing Code ExamplesSafari® Books OnlineHow to Contact UsAcknowledgements1. Why CouchDB?
Learning to RelaxA Different Data ModelReplicationEventual ConsistencyData: Local, Remote, EverywhereCouchDB Deployment and Peformance2. Installation
Installation on LinuxInstallation on Mac OS XUsing HomebrewUsing MacPortsInstallation on WindowsInstallation from SourceConfiguring and Building CouchDBRunning CouchDBNext Steps3. CouchDB Basics
Using FutonManaging Databases and DocumentsConfiguring ReplicationPopulating a Simple DatabaseCreating DatabasesCreating DocumentsUpdating DocumentsDeleting DocumentsDeleting DatabasesCommon OperationsHTTP OperationsErrorsHTTP HeadersRequest HeadersResponse HeadersHTTP URL PathsJSONDocumentsDocument StructureDocument TypesStructure and Consistency4. Design Documents
Creating Design DocumentsShowsViewsView BasicsQuerying a ViewQuerying on Complex DataQuerying Compound DataReduce FunctionsBuilt-in _countBuilt-in _sumBuilt-in _statsCustom reduce functionsError handling in viewsTemporary viewsQuerying View ResultsLists
Chapter 1. Why CouchDB?
Traditional database systems have existed for many years, and they have a familiar structure and expected methods of communicating, inserting, and extracting information. Although complex to condense into a simple statement, most database systems rely on the creation of a specific structure (based on specific fields of information), organized collectively into a record of data. To get information in, you add a record of data, and to get the information out, you query the records by looking for values or ranges within those specific fields.
Apache CouchDB is different and one of a new breed of databases that relies on a different approach to the database structure, methods of storing information, and methods for retrieving it. There are many reasons why this new breed of database systems is required and for much of the motivation behind the development of CouchDB.
In this chapter, we’re going to look at the basics of CouchDB, why it is different, and why the new approach has everybody excited about using CouchDB. CouchDB was produced out of the needs and necessities of the environment. Developers are becoming more savvy every year, with better environments, better tools, and simpler and more straightforward methods for achieving a range of goals.
You only have to look at the Web and the different tools and environments available. It is easy to take the effects of the modern websites for granted, but the functionality of pop-up lists during searches, customization, ...
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.
Read now
Unlock full access