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