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. Updates all matching documents, not just the first, that match the selector.
32-Bit Integer
$push
Update Modifiers
Multi-updates
2. Deletes documents from the collection based on the selector.
db.<col>.remove({selector});
db.<collection>.find([properties]);
db.<col>.help([commandName]);
$set
3. Returns all the documents matching the optional properties.
db.<collection>.find([properties]);
32-Bit Integer
use <database name>
$where
4. Binary-encoded serialization of mongo documents.
Update Modifiers
$lte
BSON
$nin
5. The standard number representation in the javascript shell.
64-bit floating point numbers
$all
$addToSet
object id
6. In BSON - represents the smallest possible value.
db.commandHelp("commandName")
32-Bit Integer
string
minimum value
7. command to start the mongo shell.
mongo
Object.bsonsize({document});
date
embedded document
8. Standard javascript regular expressions. These can be stored in documents
$where
db.<collection>.findOne([properties]);
regular expression
$gt
9. 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 } }
$all
Update Modifiers
$pushAll
db.getLastError()
10. Adds a document to a collection.
$unset
$gte
db.<collection>.insert({document});
Upsert
11. Operator allowing the partial specification of fields in an embedded document in an array.
$elemMatch
batch insert
help
db.copyDatabase(frmDBName, toDBName, [frmHostName], [user], [pwd]);
12. Query conditional allowing the selector to choose between more than one optional criteria.
$or
$elemMatch
date
$nin
13. changes the database on which you are working.
$rename
use <database name>
$inc
mongod
14. Not supported by the javascript shell and are converted to 64-bit floating point numbers.
null
$in
64-Bit Integer
$size
15. Standard binary data type.
$elemMatch
boolean
db.cloneDatabase(fromhost)
object id
16. command to start the mongodb process.
mongod
$or
help
use <database name>
17. Less than query conditional. ex: db.<col>.find({numVal: {$lt:3}});
$lte
$lt
64-bit floating point numbers
$set
18. Command to get help docs on a specific command at the db level.
$pull
db.help([commandName]);
db.<collection>.find([properties]);
mongo
19. Not equal query conditional. ex: db.<col>.find({numVal: {$ne:3}});
$in
boolean
$ne
db.copyDatabase(frmDBName, toDBName, [frmHostName], [user], [pwd]);
20. Deletes a given field. ex: { $unset : { field : 1} }
$pushAll
$set
db.<col>.remove({selector});
$unset
21. Command to list commands and descriptions of those commands in the context of the database.
show collections
db.<collection>.insert({document});
help
$gte
22. In BSON - represents the largest possible value.
maximum value
mongo
$all
$pull
23. Operator allowing the execution of arbitrary javascript as part of the selector.
Update Modifiers
help
$where
maximum value
24. Command to get help docs on a specific command at the collection level.
db.<col>.remove({selector});
$lte
$elemMatch
db.<col>.help([commandName]);
25. Returns help information for a command.
$pushAll
db.commandHelp("commandName")
64-bit floating point numbers
Update Modifiers
26. command to start the mongo shell.
undefined
$gte
mongo
array
27. Unique 12-byte ID for documents.
BSON
object id
db.runCommand({fsync:1,lock:1,async:1})
$mod
28. Contains query conditional used to check if a value contains the field value.
regular expression
$in
$size
use <database name>
29. Greater than query conditional. ex: db.<col>.find({numVal: {$gt:3}});
$gt
db.getLastError()
db.<collection>.findOne([properties]);
minimum value
30. 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.getLastError()
embedded document
Object.bsonsize({document});
Update Modifiers
31. Removes an element from an array based on the value of the field option being 1 or -1 for last or first element respectively. ex: { $pop : { field : -1 } }
binary data
db.<collection>.insert({document});
embedded document
$pop
32. Less than or equal query conditional. ex: db.<col>.find({numVal: {$lte:3}});
db.getLastError()
$lte
null
db.<collection>.insert({document});
33. 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.
db.runCommand({fsync:1,lock:1,async:1})
Upsert
db.<col>.remove({selector});
db.<collection>.find([properties]);
34. changes the database on which you are working.
batch insert
mongo
use <database name>
db.myCollection.ensureIndex({keypattern},[{options}])
35. Stored as milliseconds since the epoch.
$push
maximum value
$all
date
36. Javascript code. Documents can contain code as values.
$rename
code
db.<collection>.findOne([properties]);
64-Bit Integer
37. Removes all occurrences of a value from a field. ex: { $pull : { field : _value } }
db.getLastError()
undefined
null
$pull
38. Does not contain query conditional used to select documents with the field that is not in the selector list of values.
mongo
$nin
db.getLastError()
$lt
39. Greater than or equal query conditional. ex: db.<col>.find({numVal: {$gte:3}});
$nin
$push
$gte
db.getLastError()
40. Returns the size of a document after it is converted to BSON from the JSON-like original.
$addToSet
Object.bsonsize({document});
BSON
db.cloneDatabase(fromhost)
41. Update modifier used to increment a value. ex: {"$inc":{"counter":2}}
db.cloneDatabase(fromhost)
$inc
null
$in
42. Renames a field from the one indicated to the new field name. ex: { $rename : { old_field_name : new_field_name } }
boolean
mongo
batch insert
$rename
43. 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.
mongo
$mod
batch insert
$nin
44. Returns all the documents matching the optional properties.
help
db.<collection>.find([properties]);
mongod
use <database name>
45. Lists all the collections in the database in use.
show collections
object id
binary data
use <database name>
46. Adds a document to a collection.
db.<collection>.insert({document});
db.<collection>.find([properties]);
object id
32-Bit Integer
47. Syntax used for selectors to be specific to a certain element position within an array.
$pop
db.cloneDatabase(fromhost)
key.index
$lt
48. Returns information about the last operation. Not necessarily error data - the return can contain things like number of records updated.
help
date
db.myCollection.ensureIndex({keypattern},[{options}])
db.getLastError()
49. Operator used in the second argument of the find() call to specify which slice of an array to return for an array field.
$slice
db.<collection>.insert({document});
batch insert
$elemMatch
50. 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.
mongo
use <database name>
$all
db.<collection>.insert({document});