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. Returns one document matching the optional properties.
$gte
$addToSet
db.<collection>.findOne([properties]);
db.commandHelp("commandName")
2. A document contained by a parent document. The embedded document is a value of a key in the parent document.
$push
regular expression
embedded document
db.<col>.remove({selector});
3. Meta query conditional used to negate the selector.
$in
$not
$gt
$set
4. Greater than or equal query conditional. ex: db.<col>.find({numVal: {$gte:3}});
$pushAll
Upsert
$gte
$elemMatch
5. Adds a document to a collection.
db.<col>.update({selector},{document});
help
db.<collection>.insert({document});
maximum value
6. Greater than query conditional. ex: db.<col>.find({numVal: {$gt:3}});
$push
$gt
db.help([commandName]);
64-Bit Integer
7. Stored as milliseconds since the epoch.
$rename
db.myCollection.ensureIndex({keypattern},[{options}])
date
db.copyDatabase(frmDBName, toDBName, [frmHostName], [user], [pwd]);
8. Syntax used for selectors to be specific to a certain element position within an array.
$pop
key.index
maximum value
mongo
9. Positional operator that holds the position of the first matched array item in the query. Used to find an array member and then manipulate it. ex: {$inc:{'comments.$.votes':1}} where comments looks like: "comments" : [ { "by" : "joe", "votes" : 3 },
mongo
help
db.copyDatabase(frmDBName, toDBName, [frmHostName], [user], [pwd]);
$
10. Returns help information for a command.
code
db.commandHelp("commandName")
Upsert
batch insert
11. command to start the mongo shell.
$lt
db.<col>.help([commandName]);
mongo
BSON
12. changes the database on which you are working.
regular expression
use <database name>
$elemMatch
32-Bit Integer
13. Not supported by the javascript shell and are converted to 64-bit floating point numbers.
Cursor
$or
64-Bit Integer
undefined
14. Not supported by the javascript shell and are converted to 64-bit floating point numbers.
$elemMatch
object id
$not
32-Bit Integer
15. Renames a field from the one indicated to the new field name. ex: { $rename : { old_field_name : new_field_name } }
array
$where
$rename
$all
16. ...
mongo
batch insert
string
db.cloneDatabase(fromhost)
17. Operator allowing the execution of arbitrary javascript as part of the selector.
BSON
Object.bsonsize({document});
$elemMatch
$where
18. The standard number representation in the javascript shell.
array
$lte
64-bit floating point numbers
object id
19. String of arbitrary bytes.
$in
$size
binary data
code
20. Data structure used to store all other data in mongo databases.
$nin
document
key.index
$elemMatch
21. Command to get help docs on a specific command at the db level.
array
db.<col>.remove({selector});
db.cloneDatabase(fromhost)
db.help([commandName]);
22. Less than query conditional. ex: db.<col>.find({numVal: {$lt:3}});
db.<col>.remove({selector});
use <database name>
document
$lt
23. Returns all the documents matching the optional properties.
use <database name>
embedded document
db.<collection>.find([properties]);
db.commandHelp("commandName")
24. Removes all occurrences of a value from a field. ex: { $pull : { field : _value } }
code
$pull
$unset
document
25. In BSON - represents the smallest possible value.
$mod
minimum value
Update Modifiers
$pull
26. Contains query conditional used to check if a value contains the field value.
Update Modifiers
$in
$ne
mongod
27. 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.
db.runCommand({fsync:1,lock:1,async:1})
embedded document
db.<collection>.findOne([properties]);
$all
28. Array specific conditional used to select based on the length or set-size of an array field value.
$unset
db.<collection>.insert({document});
$pushAll
$size
29. Returns information about the last operation. Not necessarily error data - the return can contain things like number of records updated.
db.<col>.help([commandName]);
mongo
db.getLastError()
$in
30. In BSON - represents the largest possible value.
embedded document
maximum value
db.<collection>.find([properties]);
$elemMatch
31. Less than or equal query conditional. ex: db.<col>.find({numVal: {$lte:3}});
db.<collection>.find([properties]);
$pushAll
$lte
db.getLastError()
32. Updates all matching documents, not just the first, that match the selector.
Multi-updates
$set
$rename
db.getLastError()
33. command to start the mongodb process.
$pushAll
null
mongod
$lte
34. Deletes documents from the collection based on the selector.
$or
db.cloneDatabase(fromhost)
db.<col>.remove({selector});
minimum value
35. 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 } }
maximum value
$push
binary data
array
36. Returns help information for a command.
show collections
mongod
db.commandHelp("commandName")
$nin
37. Lists all the collections in the database in use.
Object.bsonsize({document});
show collections
$inc
$gt
38. changes the database on which you are working.
$size
null
$not
use <database name>
39. Flushes all pending writes to data files. The lock option allows one to safely snapshot the database's data files. The async option returns focus to the console immediately while the task runs in the background.
binary data
use <database name>
db.<col>.remove({selector});
db.runCommand({fsync:1,lock:1,async:1})
40. Javascript code. Documents can contain code as values.
$unset
code
batch insert
$mod
41. Deletes a given field. ex: { $unset : { field : 1} }
$ne
db.<collection>.insert({document});
$unset
$elemMatch
42. Deletes documents from the collection based on the selector.
mongo
$where
db.<col>.remove({selector});
64-bit floating point numbers
43. 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.
db.help([commandName]);
Upsert
$unset
minimum value
44. Does not contain query conditional used to select documents with the field that is not in the selector list of values.
db.cloneDatabase(fromhost)
$
$nin
mongo
45. Standard binary data type.
$addToSet
boolean
$nin
$pushAll
46. 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.
db.<col>.update({selector},{document});
Multi-updates
db.copyDatabase(frmDBName, toDBName, [frmHostName], [user], [pwd]);
$addToSet
47. Appends each value in the value_array to the field - if field is an existing array. Otherwise - it sets the field to the array value_array - if field is not present ex: { $pushAll : { field : value_array } }
db.<collection>.find([properties]);
embedded document
$pushAll
$pullAll
48. Operator used in the second argument of the find() call to specify which slice of an array to return for an array field.
db.runCommand({fsync:1,lock:1,async:1})
$slice
date
$unset
49. Used to describe a variable as not having been initialized.
db.cloneDatabase(fromhost)
undefined
regular expression
db.commandHelp("commandName")
50. command to start the mongodb process.
db.help([commandName]);
use <database name>
mongod
$pull