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 query conditional. ex: db.<col>.find({numVal: {$gt:3}});
$gt
mongo
db.<collection>.insert({document});
$pull
2. Removes all occurrences of a value from a field. ex: { $pull : { field : _value } }
$pull
mongod
$mod
$all
3. changes the database on which you are working.
key.index
$gte
use <database name>
db.cloneDatabase(fromhost)
4. command to start the mongo shell.
document
$where
mongo
db.commandHelp("commandName")
5. Less than query conditional. ex: db.<col>.find({numVal: {$lt:3}});
BSON
db.<col>.help([commandName]);
$lt
$size
6. Not supported by the javascript shell and are converted to 64-bit floating point numbers.
$pullAll
64-Bit Integer
$gt
$lte
7. Operator allowing the execution of arbitrary javascript as part of the selector.
use <database name>
Multi-updates
$lt
$where
8. Set or list of values.
array
$
$pushAll
BSON
9. 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.commandHelp("commandName")
64-bit floating point numbers
$mod
$pullAll
10. changes the database on which you are working.
$pull
mongo
use <database name>
boolean
11. Returns help information for a command.
$ne
db.<collection>.find([properties]);
db.commandHelp("commandName")
date
12. In BSON - represents the largest possible value.
db.<collection>.find([properties]);
maximum value
$pop
$pull
13. A document contained by a parent document. The embedded document is a value of a key in the parent document.
$elemMatch
$set
embedded document
BSON
14. Renames a field from the one indicated to the new field name. ex: { $rename : { old_field_name : new_field_name } }
Upsert
$rename
$pop
Update Modifiers
15. Meta query conditional used to negate the selector.
$gte
$not
embedded document
boolean
16. command to start the mongodb process.
mongod
mongo
$set
help
17. String of arbitrary bytes.
date
$pull
BSON
binary data
18. 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.copyDatabase(frmDBName, toDBName, [frmHostName], [user], [pwd]);
Cursor
$all
use <database name>
19. 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 } }
db.<col>.help([commandName]);
$push
null
document
20. Used to represent both a null value and a nonexistent field.
key.index
Cursor
use <database name>
null
21. 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 } }
$in
$
db.<col>.update({selector},{document});
$pushAll
22. Deletes a given field. ex: { $unset : { field : 1} }
BSON
$size
$unset
$in
23. Returns information about the last operation. Not necessarily error data - the return can contain things like number of records updated.
$pull
$gt
db.getLastError()
use <database name>
24. The local variable representation of a query. Uniquely - the cursor does not hold the results but instead access to the results.
Cursor
$mod
BSON
$pull
25. Binary-encoded serialization of mongo documents.
$or
BSON
db.cloneDatabase(fromhost)
null
26. Creates an index on property(s). Options can describe the type of sorting, uniqueness, etc.
$lte
Multi-updates
code
db.myCollection.ensureIndex({keypattern},[{options}])
27. Returns all the documents matching the optional properties.
db.<collection>.find([properties]);
$or
regular expression
mongod
28. Deletes documents from the collection based on the selector.
mongod
db.<col>.remove({selector});
$mod
Multi-updates
29. Less than or equal query conditional. ex: db.<col>.find({numVal: {$lte:3}});
Update Modifiers
$lte
db.<collection>.find([properties]);
null
30. Command to get help docs on a specific command at the collection level.
BSON
db.<col>.help([commandName]);
db.commandHelp("commandName")
$unset
31. ...
batch insert
db.<collection>.find([properties]);
$gt
$lt
32. 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.
Multi-updates
db.copyDatabase(frmDBName, toDBName, [frmHostName], [user], [pwd]);
$where
$pop
33. Lists all the collections in the database in use.
32-Bit Integer
show collections
undefined
regular expression
34. Adds a document to a collection.
$set
BSON
$size
db.<collection>.insert({document});
35. Used to describe a variable as not having been initialized.
$gte
64-Bit Integer
undefined
db.commandHelp("commandName")
36. Positional operator that holds the position of the first matched array item in the query. Used to find an array member and then manipulate it. ex: {$inc:{'comments.$.votes':1}} where comments looks like: "comments" : [ { "by" : "joe", "votes" : 3 },
db.commandHelp("commandName")
$
db.help([commandName]);
$set
37. Returns all the documents matching the optional properties.
$nin
$lt
db.<collection>.find([properties]);
null
38. Standard javascript regular expressions. These can be stored in documents
regular expression
$mod
db.<collection>.find([properties]);
date
39. Javascript code. Documents can contain code as values.
code
db.<col>.remove({selector});
db.commandHelp("commandName")
batch insert
40. command to start the mongo shell.
64-bit floating point numbers
db.commandHelp("commandName")
mongo
null
41. Adds a document to a collection.
$unset
db.<collection>.insert({document});
db.<collection>.findOne([properties]);
$mod
42. Clone the current database (implied by 'db') from another host.
db.cloneDatabase(fromhost)
$lt
db.<col>.help([commandName]);
db.myCollection.ensureIndex({keypattern},[{options}])
43. Not supported by the javascript shell and are converted to 64-bit floating point numbers.
embedded document
32-Bit Integer
null
db.<col>.remove({selector});
44. The standard number representation in the javascript shell.
mongod
mongo
64-bit floating point numbers
$pullAll
45. Syntax used for selectors to be specific to a certain element position within an array.
key.index
$all
$pop
db.<col>.help([commandName]);
46. Unique 12-byte ID for documents.
$lt
Update Modifiers
db.<col>.update({selector},{document});
object id
47. 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.
undefined
$where
Upsert
mongo
48. Operator allowing the partial specification of fields in an embedded document in an array.
embedded document
db.<collection>.findOne([properties]);
$elemMatch
64-Bit Integer
49. Standard binary data type.
mongo
boolean
$addToSet
mongod
50. Not equal query conditional. ex: db.<col>.find({numVal: {$ne:3}});
$pushAll
$pop
$lte
$ne