WorksheetsWeb Apps 03 - MongoDB
Total questions: 12
Worksheet time: 6mins
What is MongoDB?
A file system.
A SQL database.
A NoSQL database.
An Access database.
Which syntax returns the first matching result in a Mongo database?
db.find()
db.Find()
db.findone()
db.findOne()
Which is the best syntax to add a new entry to a Mongo database?
db.insert({"title":"Two Cities"})
db.add("title":"Two Cities")
db.insert({"title","Two Cities"})
db.add("title","Two Cities")
What is the name of the group of related data stored in a Mongo database?
A cell.
A document.
A spreadsheet.
A table.
Which is the best command to run in order to empty your Mongo database?
meteor remove Mongo
meteor list
meteor reset
meteor repair
Which of the following packages prevents writing to the Mongo collection when it is removed?
autopublish
insecure
mongo
tracker
Which function should be used to access the specific parts of a collection that have been made available to the client?
meteor.write()
meteor.publish()
meteor.read()
meteor.subscribe()
Which syntax is correct for declaring a Mongo collection named theFarm?
farmdb = new Mongo.collection('theFarm');
farmdb = new Mongo.Collection('theFarm');
farmdb = new mongo.Collection('theFarm');
farmdb = new mongo.collection('theFarm');
Where should a newly created JavaScript file containing the definition of a Mongo collection be imported?
In the client-side JavaScript code.
In the server-side JavaScript code.
In both the client-side and server-side JavaScript code.
No import is necessary because Meteor detects it automatically.
Which function has the correct syntax to return the number of records stored in a collection?
db.find().count
db.find().count()
db.find.count()
db.find.count
What does the MongoDB find function return?
A cursor.
A pointer.
A record.
An array.
Which block function has the correct syntax to display several documents that have been sent to a template?
{{each photos}}
{{#each photos}}
((each photos))
((#each photos))
