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