December 2018
Beginner
826 pages
22h 54m
English
Since we're working with documents and things are being created on the fly (rather than having tables that are populated with a strict dataset), our preceding commands can seem a lot more ad hoc than traditional databases would perform.
When we created our collection, we didn't have to define anything. We simply started writing data inside our test database:
> db.distributions.insert( { name: "Ubuntu", developer: "Canonical Ltd.", initial_year: 2004 } )
From there, we were able to add more data, only to then start querying what we'd just written.
The data we added subsequently didn't really matter, and while there were correlations in the documents we wrote, such as the name, developer, and initial_year fields, there were ...
Read now
Unlock full access