Couchbase Essentials

Book description

Harness the power of Couchbase to build flexible and scalable applications

In Detail

Couchbase is an extremely fast, flexible, and highly scalable database that applies MapReduce techniques and patterns to find data. Whether you need to store unstructured data or be able to store and retrieve vast amounts of data quickly, Couchbase Server is your database!

This book gives you enough information to successfully set up a Couchbase cluster and provides details on basic server maintenance. It then goes on to give you a detailed overview of how to program against Couchbase Server using both its key/value features and its document capabilities. It also introduces you to the concept of creating views using Couchbase's implementation of MapReduce. This book will then conclude with a walkthrough of building an actual application from scratch using Couchbase.

What You Will Learn

  • Download, install, and configure a single-node Couchbase Server cluster

  • Explore the Couchbase Server key/value APIs used to put data in and get data out of a Couchbase bucket

  • Review the basics of MapReduce as a programming model used to transform data structures

  • Create simple secondary indexes using Couchbase MapReduce views

  • Learn how to create advanced views to aggregate data in a Couchbase bucket

  • Understand how to design a schema for documents in a schema-less document database

  • Query for data in a Couchbase bucket using the new query language N1QL

  • Design and develop an application from scratch using Couchbase

  • Table of contents

    1. Couchbase Essentials
      1. Table of Contents
      2. Couchbase Essentials
      3. Credits
      4. About the Author
      5. About the Reviewers
      6. www.PacktPub.com
        1. Support files, eBooks, discount offers, and more
          1. Why subscribe?
          2. Free access for Packt account holders
      7. Preface
        1. What this book covers
        2. What you need for this book
        3. Who this book is for
        4. Conventions
        5. Reader feedback
        6. Customer support
          1. Downloading the example code
          2. Errata
          3. Piracy
          4. Questions
      8. 1. Getting Comfortable with Couchbase
        1. The NoSQL landscape
        2. NoSQL taxonomies
        3. Installing Couchbase
          1. Installing Couchbase on Linux
          2. Installing Couchbase on Windows
          3. Installing Couchbase on Mac OS X
        4. Ports
        5. Running Couchbase for the first time
        6. Exploring the Couchbase Console
        7. Couchbase architecture
          1. Couchbase clusters
          2. Replication
          3. Balancing and rebalancing
        8. Couchbase SDKs
        9. RAM matters
        10. Summary
      9. 2. Using Couchbase CRUD Operations
        1. The Couchbase SDKs
        2. Basic operations
          1. Connecting to your cluster
          2. Creating and updating a record
          3. Reading and deleting records
        3. Advanced CRUD operations
          1. Temporary keys
          2. Appending and incrementing data
        4. Storing complex types
        5. Concurrency and locking
        6. Asynchronous operations
        7. Durability operations
        8. Summary
      10. 3. Creating Secondary Indexes with Views
        1. Couchbase documents
        2. Couchbase indexes
        3. MapReduce
          1. Map functions
          2. Reduce functions
          3. Couchbase MapReduce
          4. Basic mapping
          5. Basic reducing
        4. Couchbase views
        5. Couchbase Console
          1. Development views
          2. Design documents
          3. Creating a view
        6. Querying views
          1. Grouping
          2. Key queries
          3. Eventual consistency
        7. Couchbase SDKs and views
        8. Summary
      11. 4. Advanced Views
        1. Querying by type
        2. Nested collections
        3. Range queries
        4. Multiple keys per document
        5. Compound indexes
        6. Grouping keys
        7. Emitting values
        8. Querying with beer-sample
          1. Querying all documents by type
          2. Counting breweries by location
          3. Finding beer documents by brewery
          4. Collated views
        9. Summary
      12. 5. Introducing N1QL
        1. Installing N1QL
        2. Simple queries
        3. Null or missing properties
        4. String utilities
        5. Aggregation and math
        6. Complex structures
        7. Working with collections
        8. Joins
        9. SDK support
        10. Summary
      13. 6. Designing a Schema-less Data Model
        1. Key design
          1. Keys, metadata, and RAM
          2. Predictable keys
          3. Unpredictable keys
          4. Storing keys
          5. Key restrictions
        2. Document design
          1. Denormalization
          2. Object-to-document mappings
          3. Data types
          4. Document separation
          5. Object schemas
          6. Schema-less structure changes
          7. Object and document properties
          8. Document relationships
          9. Finalizing the schema
        3. Summary
      14. 7. Creating a To-do App with Couchbase
        1. A simple to-do schema
        2. Working with SDKs
          1. A brief overview of MVC
          2. Using SDK clients
        3. Creating a task
        4. Listing tasks
        5. Showing only incomplete tasks
        6. Nested tasks
        7. Summary
      15. A. Couchbase SDKs
        1. Couchbase Java SDK
          1. Current version
          2. How to obtain it
          3. The basics
        2. Couchbase .NET SDK
          1. Current version
          2. How to obtain it
          3. The basics
        3. Couchbase PHP SDK
          1. Current version
          2. How to obtain it
          3. The basics
        4. The Couchbase Node.js SDK
          1. Current version
          2. How to obtain it
          3. The basics
        5. Couchbase Python SDK
          1. Current version
          2. How to obtain it
          3. The basics
        6. Couchbase Ruby SDK
          1. Current version
          2. How to obtain it
          3. The basics
        7. Couchbase C SDK
          1. Current version
          2. How to obtain it
      16. Index

    Product information

    • Title: Couchbase Essentials
    • Author(s): John Zablocki
    • Release date: February 2015
    • Publisher(s): Packt Publishing
    • ISBN: 9781784394493