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