Book Image

Learning Underscore.js

By : Alexandru Vasile Pop
Book Image

Learning Underscore.js

By: Alexandru Vasile Pop

Overview of this book

Table of Contents (14 chapters)
Learning Underscore.js
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Using Underscore with MongoDB


In the last decade, we have seen a wide range of successful alternatives to relational databases becoming more and more popular. These alternative databases are usually referred to as NoSQL databases and their common denominator should be read as an abbreviation for "not only SQL". Among such databases that specialize in big data analysis such as Hadoop or that specialize in key-value storage such as Redis, there is MongoDB (with the name derived from "humongous")—a popular document database that recently reached version 3.

MongoDB like other similar document database engines stores data in databases that contain collections of documents:

  • A document is a set of keys and values (or fields) that can be expressed in JSON format and it is stored internally as BSON (binary JSON—a more efficient JSON-derived format). A document can contain other nested documents, and you can visualize it as a JavaScript object literal.

  • A collection is simply a container of documents...