924
Lectures Watched
Since January 1, 2014
Hundreds of free, self-paced university courses available:
my recommendations here
Peruse my collection of 275
influential people of the past.
View My Class Notes via:
Receive My Class Notes via E-Mail:

VIEW ARCHIVE


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, highlighting, string, list, idiom, object, interate, skip, array, union, 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
cursors
cursor object has many methods
hasNext()
next()
use these to step through
you don't do this much from the           , but from a programming language, e.g. python
limit(5)
you specify this, and then perform a query:
sort()
first set sort, then perform query
you can combine them:
cur.sort( { name : -1 } ).limit(3); null;
skip()
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
counting:
                 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