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