Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
There are many potential ways to interact with CouchDB, but probably the easiest to use is the curl command-line tool. This is really useful because the interaction is about as raw as it gets. You can see the HTTP interface, the basics of the operations, and the structure and format of the information when it comes back. All of this provides you with a good basic understanding of what is going on when you interact with your server.
Let’s get started. Before you can create documents in your
database, you need to create a database in which the documents can be
stored. Your CouchDB instance can support multiple databases on one
system. You should try and keep all of your documents for a single
application within one database. There are a number of reasons for this,
not least of which is that, internally, CouchDB is unable to access the
documents of a different database than the one currently being accessed.
For example, you cannot access documents in the database accounts when viewing the database customers. We’ll talk a little more about that
when we look at document design later in this chapter.