concept variety in category mongoDB

appears as: variety, varieties, The variety
MongoDB in Action, Second Edition: Covers MongoDB version 3.0

This is an excerpt from Manning's book MongoDB in Action, Second Edition: Covers MongoDB version 3.0.

This listing shows a JSON document representing an article on a social news site (think Reddit or Twitter). As you can see, a document is essentially a set of property names and their values. The values can be simple data types, such as strings, numbers, and dates. But these values can also be arrays and even other JSON documents . These latter constructs permit documents to represent a variety of rich data structures. You’ll see that the sample document has a property, tags , which stores the article’s tags in an array. But even more interesting is the comments property , which is an array of comment documents.

You’ve now seen the document data model in practice, and we’ve demonstrated a variety of common MongoDB operations on that data model. You’ve learned how to create indexes and have seen an example of index-based performance improvements through the use of explain(). In addition, you should be able to extract information about the collections and databases on your system, you now know all about the clever $cmd collection, and if you ever need help, you’ve picked up a few tricks for finding your way around.