mapfunction that populates keys from the data in your bucket. Views can also define an additional
reducefunction that is used to aggregate data down, much like in SQL. Finally, one or more views live inside of a design document, which you can query and construct.
designDocumentExists()- Check for the existance of a design document.
getDesignDocument()- Retreive a design document and all its views
deleteDesignDocument()- Delete a design document and all its views from the cluster
viewExists()- Check for the existance of a single view
saveView()- Save/update a view and wait for it to index
asyncSaveView()- Save/update a view but don't wait for it to become usable
deleteView()- Delete a single view from its design document
asyncSaveView()is they either insert or udpate an existing view based on whether it already exists. They also only save to the cluster if the view doesn't exist or is different. This means you can repeatedly call saveView() and nothing will happen on any call but the first. This allows you to specify the views that you need in your application when it starts up and they will only save if neccessary: