SUBJECTS
|
BROWSE
|
CAREER CENTER
|
POPULAR
|
JOIN
|
LOGIN
Business Skills
|
Soft Skills
|
Basic Literacy
|
Certifications
About
|
Help
|
Privacy
|
Terms
|
Email
Search
Test your basic knowledge |
Mongo Db
Start Test
Study First
Subject
:
it-skills
Instructions:
Answer 50 questions in 15 minutes.
If you are not ready to take this test, you can
study here
.
Match each statement with the correct term.
Don't refresh. All questions and answers are randomly picked and ordered every time you load a test.
This is a study tool. The 3 wrong answers for each question are randomly chosen from answers to other questions. So, you might find at times the answers obvious, but you will see it re-enforces your understanding as you take the test each time.
1. The local variable representation of a query. Uniquely - the cursor does not hold the results but instead access to the results.
$pull
db.getLastError()
Object.bsonsize({document});
Cursor
2. Unique 12-byte ID for documents.
$pushAll
$gt
db.<collection>.findOne([properties]);
object id
3. Does not contain query conditional used to select documents with the field that is not in the selector list of values.
$elemMatch
$nin
$ne
64-bit floating point numbers
4. Update call that inserts a new document if no update match is found. Allows the same code to be used for inserts as well as updates.
$push
string
db.commandHelp("commandName")
Upsert
5. Query conditional allowing the selector to choose between more than one optional criteria.
$gte
Upsert
db.<collection>.findOne([properties]);
$or
6. Greater than query conditional. ex: db.<col>.find({numVal: {$gt:3}});
BSON
$gt
document
$lt
7. command to start the mongo shell.
mongo
64-Bit Integer
$all
db.<col>.remove({selector});
8. Returns all the documents matching the optional properties.
db.<collection>.find([properties]);
$all
64-Bit Integer
date
9. Adds a value to the array only if its not in the array already. Otherwise, if the field is not present, it sets the field to the array value. ex: { $addToSet : { a : { $each : [ 3 , 5 , 6 ] } } }
db.<collection>.findOne([properties]);
$pop
$addToSet
object id
10. Appends a value to field - if the field is an existing array. Otherwise it sets the field to the array [value] if field is not present. ex: { $push : { field : value } }
Multi-updates
document
$push
binary data
11. A document contained by a parent document. The embedded document is a value of a key in the parent document.
binary data
object id
db.commandHelp("commandName")
embedded document
12. Less than or equal query conditional. ex: db.<col>.find({numVal: {$lte:3}});
db.<collection>.findOne([properties]);
$not
$addToSet
$lte
13. Stored as milliseconds since the epoch.
mongo
date
db.cloneDatabase(fromhost)
key.index
14. Returns help information for a command.
64-Bit Integer
null
show collections
db.commandHelp("commandName")
15. Meta query conditional used to negate the selector.
object id
$not
$all
db.getLastError()
16. changes the database on which you are working.
$lt
code
use <database name>
$addToSet
17. Updates all matching documents, not just the first, that match the selector.
use <database name>
db.runCommand({fsync:1,lock:1,async:1})
help
Multi-updates
18. The standard number representation in the javascript shell.
db.copyDatabase(frmDBName, toDBName, [frmHostName], [user], [pwd]);
64-bit floating point numbers
$pop
$rename
19. Not supported by the javascript shell and are converted to 64-bit floating point numbers.
null
64-Bit Integer
mongo
32-Bit Integer
20. Update a document in the collection.
mongo
$unset
db.<col>.update({selector},{document});
$rename
21. Used to represent both a null value and a nonexistent field.
code
key.index
null
64-Bit Integer
22. Array specific conditional allowing matching on multiple elements within an array. The operation is non strict on the sequence of the values in the passed selector array.
$gte
db.getLastError()
$all
code
23. command to start the mongodb process.
db.myCollection.ensureIndex({keypattern},[{options}])
mongod
32-Bit Integer
db.<col>.help([commandName]);
24. Command to get help docs on a specific command at the collection level.
db.copyDatabase(frmDBName, toDBName, [frmHostName], [user], [pwd]);
db.<col>.help([commandName]);
$gte
db.<collection>.find([properties]);
25. Returns the size of a document after it is converted to BSON from the JSON-like original.
$size
$push
$set
Object.bsonsize({document});
26. Deletes documents from the collection based on the selector.
db.commandHelp("commandName")
db.<col>.remove({selector});
db.help([commandName]);
regular expression
27. Not supported by the javascript shell and are converted to 64-bit floating point numbers.
db.commandHelp("commandName")
$gt
32-Bit Integer
null
28. Renames a field from the one indicated to the new field name. ex: { $rename : { old_field_name : new_field_name } }
Multi-updates
db.<collection>.find([properties]);
$rename
db.<collection>.insert({document});
29. Lists all the collections in the database in use.
array
show collections
64-Bit Integer
$in
30. set of UTF-8 characters.
$rename
$in
string
Object.bsonsize({document});
31. ...
batch insert
mongo
$size
$slice
32. Removes all occurrences of each value in the passed in array from the field. ex: { $pullAll : { field : value_array } }
undefined
$pullAll
$pull
Update Modifiers
33. Special keys passed in an update call to specify complex update operations - such as alter - adding - or removing keys - and even manipulating arrays and embedded documents.
$
db.commandHelp("commandName")
db.<collection>.insert({document});
Update Modifiers
34. Operator used in the second argument of the find() call to specify which slice of an array to return for an array field.
Update Modifiers
Upsert
$slice
null
35. Operator allowing the partial specification of fields in an embedded document in an array.
$elemMatch
embedded document
$where
$
36. Creates an index on property(s). Options can describe the type of sorting, uniqueness, etc.
$nin
$lt
db.myCollection.ensureIndex({keypattern},[{options}])
use <database name>
37. Standard binary data type.
db.<collection>.find([properties]);
boolean
32-Bit Integer
64-Bit Integer
38. Adds a document to a collection.
db.cloneDatabase(fromhost)
db.<collection>.insert({document});
$pop
show collections
39. Set or list of values.
array
db.<collection>.insert({document});
db.<collection>.findOne([properties]);
$push
40. Array specific conditional used to select based on the length or set-size of an array field value.
$set
$size
$ne
embedded document
41. Javascript code. Documents can contain code as values.
code
db.<collection>.insert({document});
db.<col>.update({selector},{document});
Upsert
42. Returns information about the last operation. Not necessarily error data - the return can contain things like number of records updated.
$set
Update Modifiers
db.getLastError()
db.<collection>.find([properties]);
43. Copies an entire database from one name on one server to another name on another server. Omit frmHostName to copy from one name to another on the same server.
$pushAll
date
db.copyDatabase(frmDBName, toDBName, [frmHostName], [user], [pwd]);
64-Bit Integer
44. Less than query conditional. ex: db.<col>.find({numVal: {$lt:3}});
64-Bit Integer
mongod
$lt
$not
45. Binary-encoded serialization of mongo documents.
mongo
BSON
Multi-updates
64-Bit Integer
46. Command to list commands and descriptions of those commands in the context of the database.
db.cloneDatabase(fromhost)
$inc
$ne
help
47. Meta query conditional generating a modulus with the selector operand. Checks to see if the field value when divided by one value has the remainder of the second value.
$mod
$lte
mongod
document
48. Command to get help docs on a specific command at the db level.
db.<col>.remove({selector});
Cursor
db.help([commandName]);
use <database name>
49. Standard javascript regular expressions. These can be stored in documents
mongod
db.commandHelp("commandName")
regular expression
$
50. Not equal query conditional. ex: db.<col>.find({numVal: {$ne:3}});
$ne
db.<collection>.find([properties]);
db.<collection>.findOne([properties]);
db.<collection>.insert({document});