Loading data into MongoDB
MongoDB is a type of NoSQL database, called a document store. Data is stored in JSON-like arrays in a format called BSON (binary JSON), which allows for quick and scalable queries. Java Script Object Notation (JSON), are name/value pairs that can be nested to store complex data. Another way of thinking of a MongoDB document is that they are akin to a multidimensional array. Like many NoSQL databases, the schema structure is dynamic. This means that the descriptors of a dataset can be added, removed, or not even required for records to be stored into a given document.
Getting ready
We will continue to use the Lahman's Baseball Database mentioned earlier in the chapter to load MongoDB and later use it to query for specific data. Before we can do anything else though, we need to make sure that we have an instance of MongoDB to play with, either locally on a virtual machine or elsewhere. To download a copy of MongoDB, check out the website at http://www.monodb/org/downloads...