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
25
questions in
10 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. Less than or equal query conditional. ex: db.<col>.find({numVal: {$lte:3}});
object id
$slice
$lte
db.myCollection.ensureIndex({keypattern},[{options}])
2. Deletes documents from the collection based on the selector.
$unset
db.<col>.remove({selector});
object id
db.cloneDatabase(fromhost)
3. Operator used in the second argument of the find() call to specify which slice of an array to return for an array field.
$slice
string
$pullAll
key.index
4. Standard javascript regular expressions. These can be stored in documents
regular expression
$inc
db.<col>.update({selector},{document});
$lte
5. Contains query conditional used to check if a value contains the field value.
db.<col>.remove({selector});
$in
document
$pop
6. 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 } }
$pop
$push
$slice
$ne
7. Creates an index on property(s). Options can describe the type of sorting, uniqueness, etc.
$pushAll
db.commandHelp("commandName")
db.myCollection.ensureIndex({keypattern},[{options}])
maximum value
8. 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})
use <database name>
$pop
mongod
9. Less than query conditional. ex: db.<col>.find({numVal: {$lt:3}});
regular expression
db.runCommand({fsync:1,lock:1,async:1})
$lt
$ne
10. Binary-encoded serialization of mongo documents.
date
BSON
db.<collection>.find([properties]);
$inc
11. command to start the mongo shell.
mongo
document
array
key.index
12. Greater than or equal query conditional. ex: db.<col>.find({numVal: {$gte:3}});
$gte
$push
Object.bsonsize({document});
document
13. Update modifier used to increment a value. ex: {"$inc":{"counter":2}}
$slice
db.<collection>.findOne([properties]);
$inc
Update Modifiers
14. Returns all the documents matching the optional properties.
db.<collection>.find([properties]);
$nin
$all
$elemMatch
15. Update a document in the collection.
db.cloneDatabase(fromhost)
Object.bsonsize({document});
$rename
db.<col>.update({selector},{document});
16. command to start the mongodb process.
$or
$nin
mongod
32-Bit Integer
17. 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.
64-Bit Integer
$pop
$all
$pushAll
18. Array specific conditional used to select based on the length or set-size of an array field value.
db.commandHelp("commandName")
regular expression
$size
$ne
19. 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 } }
use <database name>
$pushAll
mongo
mongod
20. String of arbitrary bytes.
binary data
db.<col>.remove({selector});
string
mongod
21. Adds a document to a collection.
batch insert
db.<collection>.insert({document});
db.<collection>.findOne([properties]);
db.myCollection.ensureIndex({keypattern},[{options}])
22. In BSON - represents the smallest possible value.
minimum value
code
$addToSet
$in
23. A document contained by a parent document. The embedded document is a value of a key in the parent document.
db.runCommand({fsync:1,lock:1,async:1})
db.getLastError()
db.<collection>.insert({document});
embedded document
24. Standard binary data type.
Upsert
boolean
db.<collection>.find([properties]);
regular expression
25. Used to describe a variable as not having been initialized.
undefined
mongod
Multi-updates
mongo