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