CouchDB is a new breed of database for the Internet, geared to meet the needs of today's dynamic web applications. With this concise introduction, you'll learn how CouchDB's simple model for storing, processing, and accessing data makes it ideal for the type of data and rapid response users now demand from your applications-and how easy CouchDB is to set up, deploy, maintain, and scale. The code-packed examples in this book will help you learn how to work with documents, populate a simple database, replicate data from one database to another, and a host of other tasks. Install CouchDB on Lin.;Table of Contents; Preface; Introduction; Conventions Used in This Book; Using Code Examples; Safari® Books Online; How to Contact Us; Acknowledgements; Chapter 1. Why CouchDB?; Learning to Relax; A Different Data Model; Replication; Eventual Consistency; Data: Local, Remote, Everywhere; CouchDB Deployment and Peformance; Chapter 2. Installation; Installation on Linux; Installation on Mac OS X; Using Homebrew; Using MacPorts; Installation on Windows; Installation from Source; Configuring and Building CouchDB; Running CouchDB; Next Steps; Chapter 3. CouchDB Basics; Using Futon Table of Contents 5 Preface 7 Introduction 7 Conventions Used in This Book 7 Using Code Examples 8 Safari庐 Books Online 8 How to Contact Us 9 Acknowledgements 9 Chapter聽1.聽Why CouchDB? 11 Learning to Relax 12 A Different Data Model 13 Replication 14 Eventual Consistency 16 Data: Local, Remote, Everywhere 17 CouchDB Deployment and Peformance 18 Chapter聽2.聽Installation 19 Installation on Linux 19 Installation on Mac OS X 20 Using Homebrew 20 Using MacPorts 20 Installation on Windows 21 Installation from Source 21 Configuring and Building CouchDB 21 Running CouchDB 22 Next Steps 22 Chapter聽3.聽CouchDB Basics 25 Using Futon 25 Managing Databases and Documents 27 Configuring Replication 29 Populating a Simple Database 30 Creating Databases 31 Creating Documents 32 Updating Documents 34 Deleting Documents 34 Deleting Databases 35 Common Operations 35 HTTP Operations 36 Errors 37 HTTP Headers 38 Request Headers 38 Response Headers 39 HTTP URL Paths 39 JSON 41 Documents 42 Document Structure 42 Document Types 44 Structure and Consistency 44 Chapter聽4.聽Design Documents 47 Creating Design Documents 51 Shows 53 Views 56 View Basics 57 Querying a View 59 Querying on Complex Data 60 Querying Compound Data 62 Reduce Functions 63 Built-in _count 68 Built-in _sum 70 Built-in _stats 71 Custom reduce functions 72 Error handling in views 74 Temporary views 75 Querying View Results 75 Lists 76 CouchDB is a new breed of database for the Internet, geared to meet the needs of today{u2019}s dynamic web applications. With this concise introduction, you{u2019}ll learn how CouchDB{u2019}s simple model for storing, processing, and accessing data makes it ideal for the type of data and rapid response users now demand from your applications{u2014}and how easy CouchDB is to set up, deploy, maintain, and scale. The code-packed examples in this book will help you learn how to work with documents, populate a simple database, replicate data from one database to another, and a host of other tasks. Install CouchDB on Linux, Mac OS X, Windows, or (if you must) from the source code Interact with data through CouchDB{u2019}s RESTful API, and use standard HTTP operations, such as PUT, GET, POST, and DELETE Use Futon{u2014}CouchDB{u2019}s web-based interface{u2014} to manage databases and documents, and to configure replications Learn how to create, update, and delete documents in JSON format, and how to create and delete databases Work with design documents to get the formatting and indexing your application requires This concise guide contain everything you need to begin storing and retrieving information through CouchDB. You'll learn the basic of this document-oriented database, including its simple model for storing, processing, and accessing data.