Creating Views in MongoDB


 

This article is part of Robert Sheldon’s continuing series on Mongo DB. To see all of the items in the series, click here.

Like many relational database systems, MongoDB supports the use of views. A view is a read-only object in a MongoDB database that works much like a collection, except that the data is not persisted to disk. MongoDB retrieves the view’s documents from the source collection when a client calls the view. In this sense, a view is essentially a saved query that MongoDB runs at the time the view is invoked.

This article, which is part of