Search:

Search all manuals
Search this manual
Manual
Couchbase Client Library: Java 1.1
Community Wiki and Resources
Download Client Library
JavaDoc
Couchbase Developer Guide 2.0
Couchbase Server Manual 2.0
Java Client Library
SDK Forum
Wiki: Java Client Library
Additional Resources
Community Wiki
Community Forums
Couchbase SDKs
Parent Section
1 Getting Started
Chapter Sections
Chapters

1.3. Working with Documents

1.3.1. Creating and Updating Documents
1.3.2. Reading Documents
1.3.3. Deleting Documents
1.3.4. JSON Encoding/Decoding

A document in Couchbase Server consists of a unique key, a value and us stored in a bucket. A document can be anything, but it is recommended to use the JSON format. JSON is very convenient for storing structured data with little overhead, and is also used inside the View engine. This means that if you want to get most out of Couchbase Server 2.0, use JSON.

The Java SDK doesn't come with a JSON library bundled and leaves it up to you to choose your favorite one. If you are not sure which one to use, the GSON library is a very good choice (and it's what we'll use in later examples). You can download it directly (and include it in your CLASSPATH) or get it through Maven.

The following chapter introduces the basic operations that you can use as the fundamental building blocks of your application.