Google News
logo
CouchDB - Interview Questions
Can Views update documents or databases?
No. Views are always read-only for databases and their documents.
 
Views are used for the following purpose :
 
* It filters the document from the database to find relevant data for a particular process.
* Extracting data from documents and present it in a specific order.
* Building indexes to find the document by any value or structure that resides in them and use these indexes to represent the relationship between documents.
* Finally, with views, you can make all sorts of calculations on the data in your documents

For example :
 
If documents represent your company's financial transactions, a view can answer the question of what the spending was in the last week, month, or year.
Advertisement