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