Lectures Watched
Since January 1, 2014
1500+ courses starting
in June 2017
Peruse my collection of 267
influential people of the past.
View My Class Notes via:
Receive My Class Notes via E-Mail:


Contact Me via E-Mail:
edward [at] tanguay.info
Notes on video lecture:
More Querying in MongoDB
Choose from these words to fill the blanks below:
embedded, skip, idiom, list, interate, union, array, object, string, highlighting, shell
sometimes you want a            of operators
use $or
the shell helps you with this by                         
$and is also available, but there is an easier way to do it in most cases except those are are very complicated
the following is the case because JavaScript              in the shell will simply replace the second "score" with the first
polymorphism query matching
in the statement db.accounts.find( { favorites : "pretzels" } )
if favorites is a             , it looks for a match, if an           , then looks if it is contained in the array
this is a common            when using mongo
but only the top level of the array, no recursing to find a particular field with a particular value
$all operator
find all documenst which have all items in a         
db.accounts.find( { favorites : { $all : ["pretzels","beer" ] }} )
$in operator
find all documenst which have any items in a list
db.accounts.find( { favorites : { $in : ["pretzels","beer" ] }} )
nested documents
when searching for                  data, order is important, so it is important to be consistent
even if you just search for one field db.users.find( { email : { work : "richard@10gen.com" } } ) then it will not find it, but there is another way
cursor object has many methods
use these to step through
you don't do this much from the           , but from a programming language, e.g. python
you specify this, and then perform a query:
first set sort, then perform query
you can combine them:
cur.sort( { name : -1 } ).limit(3); null;
example to list 3
cur.sort( { name : -1 } ).limit(3).skip(2); null;
this means to skip the first two in that ordering, and still show three
processed in this order: sort,         , limit
                 through results with it
db.scores.count({ count : "exam" })
MongoDB Introduction
Installing MongoDB/node.js and Hello Worlds
MongoDB, node.js, Express and SWIG
Basic Querying in MongoDB
More Querying in MongoDB
MongoDB CRUD via Node.js
Comparing RDBMS and MongoDB Schema Design