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. Command to get help docs on a specific command at the db level.
$slice
regular expression
$pushAll
db.help([commandName]);
2. 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.
use <database name>
$not
db.copyDatabase(frmDBName, toDBName, [frmHostName], [user], [pwd]);
$set
3. Used to describe a variable as not having been initialized.
$elemMatch
undefined
$push
db.commandHelp("commandName")
4. ...
$push
$all
use <database name>
batch insert
5. Meta query conditional used to negate the selector.
$not
$pop
mongo
code
6. Operator used in the second argument of the find() call to specify which slice of an array to return for an array field.
$slice
db.<collection>.find([properties]);
$all
embedded document
7. command to start the mongo shell.
mongo
$or
db.help([commandName]);
Cursor
8. Operator allowing the partial specification of fields in an embedded document in an array.
$elemMatch
$pull
$gt
$ne
9. Array specific conditional used to select based on the length or set-size of an array field value.
$set
mongod
$size
$inc
10. Returns all the documents matching the optional properties.
64-bit floating point numbers
db.<collection>.find([properties]);
$mod
db.cloneDatabase(fromhost)
11. In BSON - represents the largest possible value.
maximum value
$ne
$push
db.<collection>.find([properties]);
12. Returns help information for a command.
db.<collection>.insert({document});
db.commandHelp("commandName")
array
$elemMatch
13. 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})
$not
$inc
embedded document
14. Greater than query conditional. ex: db.<col>.find({numVal: {$gt:3}});
$inc
string
minimum value
$gt
15. Deletes documents from the collection based on the selector.
undefined
db.<col>.remove({selector});
$lte
db.commandHelp("commandName")
16. Creates an index on property(s). Options can describe the type of sorting, uniqueness, etc.
$pushAll
db.myCollection.ensureIndex({keypattern},[{options}])
$unset
db.<collection>.find([properties]);
17. 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.
$or
regular expression
db.runCommand({fsync:1,lock:1,async:1})
64-Bit Integer
18. Returns help information for a command.
db.commandHelp("commandName")
db.cloneDatabase(fromhost)
db.help([commandName]);
$slice
19. set of UTF-8 characters.
Multi-updates
$where
BSON
string
20. 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 } }
$mod
$pop
$pushAll
$in
21. Deletes a given field. ex: { $unset : { field : 1} }
$unset
db.<col>.remove({selector});
$inc
64-Bit Integer
22. 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
db.commandHelp("commandName")
null
db.commandHelp("commandName")
23. 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.
$
db.help([commandName]);
$mod
Update Modifiers
24. The local variable representation of a query. Uniquely - the cursor does not hold the results but instead access to the results.
Cursor
$slice
$lt
db.<collection>.insert({document});
25. command to start the mongo shell.
db.<col>.remove({selector});
$not
mongo
$set
26. Command to list commands and descriptions of those commands in the context of the database.
help
$nin
$push
$lt
27. Query conditional allowing the selector to choose between more than one optional criteria.
$or
mongo
$lt
Update Modifiers
28. Operator allowing the execution of arbitrary javascript as part of the selector.
db.<collection>.insert({document});
$slice
key.index
$where
29. Returns information about the last operation. Not necessarily error data - the return can contain things like number of records updated.
db.<collection>.insert({document});
db.getLastError()
db.cloneDatabase(fromhost)
BSON
30. Adds a document to a collection.
undefined
$set
db.<collection>.insert({document});
db.<collection>.findOne([properties]);
31. command to start the mongodb process.
$
mongod
$not
db.commandHelp("commandName")
32. Renames a field from the one indicated to the new field name. ex: { $rename : { old_field_name : new_field_name } }
$rename
regular expression
db.cloneDatabase(fromhost)
embedded document
33. Stored as milliseconds since the epoch.
minimum value
64-bit floating point numbers
date
Multi-updates
34. Not equal query conditional. ex: db.<col>.find({numVal: {$ne:3}});
$ne
db.myCollection.ensureIndex({keypattern},[{options}])
db.<collection>.find([properties]);
$where
35. Data structure used to store all other data in mongo databases.
minimum value
mongo
Update Modifiers
document
36. Update a document in the collection.
object id
$pullAll
db.<col>.update({selector},{document});
db.cloneDatabase(fromhost)
37. Less than or equal query conditional. ex: db.<col>.find({numVal: {$lte:3}});
Multi-updates
BSON
$lte
Update Modifiers
38. Contains query conditional used to check if a value contains the field value.
$in
db.<col>.remove({selector});
$pull
$inc
39. In BSON - represents the smallest possible value.
32-Bit Integer
minimum value
$
db.<collection>.find([properties]);
40. The standard number representation in the javascript shell.
64-bit floating point numbers
regular expression
db.<col>.remove({selector});
key.index
41. 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.
db.commandHelp("commandName")
$all
Upsert
null
42. Syntax used for selectors to be specific to a certain element position within an array.
embedded document
key.index
db.<col>.help([commandName]);
db.<collection>.find([properties]);
43. 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.
$all
$gte
$push
Upsert
44. 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 } }
key.index
$pop
code
64-Bit Integer
45. changes the database on which you are working.
db.<collection>.findOne([properties]);
$where
use <database name>
64-bit floating point numbers
46. Removes all occurrences of each value in the passed in array from the field. ex: { $pullAll : { field : value_array } }
$pullAll
document
$nin
embedded document
47. Clone the current database (implied by 'db') from another host.
db.<col>.update({selector},{document});
db.<collection>.insert({document});
embedded document
db.cloneDatabase(fromhost)
48. command to start the mongodb process.
$
use <database name>
mongod
array
49. Greater than or equal query conditional. ex: db.<col>.find({numVal: {$gte:3}});
$gte
64-Bit Integer
Cursor
db.help([commandName]);
50. Used to represent both a null value and a nonexistent field.
Multi-updates
null
date
$