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