wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Web Apps 03 - MongoDB

Total questions: 12

Worksheet time: 6mins

Name
Class
Date
1.

What is MongoDB?

a)

A file system.

b)

A SQL database.

c)

A NoSQL database.

d)

An Access database.

2.

Which syntax returns the first matching result in a Mongo database?

a)

db.find()

b)

db.Find()

c)

db.findone()

d)

db.findOne()

3.

Which is the best syntax to add a new entry to a Mongo database?

a)

db.insert({"title":"Two Cities"})

b)

db.add("title":"Two Cities")

c)

db.insert({"title","Two Cities"})

d)

db.add("title","Two Cities")

4.

What is the name of the group of related data stored in a Mongo database?

a)

A cell.

b)

A document.

c)

A spreadsheet.

d)

A table.

5.

Which is the best command to run in order to empty your Mongo database?

a)

meteor remove Mongo

b)

meteor list

c)

meteor reset

d)

meteor repair

6.

Which of the following packages prevents writing to the Mongo collection when it is removed?

a)

autopublish

b)

insecure

c)

mongo

d)

tracker

7.

Which function should be used to access the specific parts of a collection that have been made available to the client?

a)

meteor.write()

b)

meteor.publish()

c)

meteor.read()

d)

meteor.subscribe()

8.

Which syntax is correct for declaring a Mongo collection named theFarm?

a)

farmdb = new Mongo.collection('theFarm');

b)

farmdb = new Mongo.Collection('theFarm');

c)

farmdb = new mongo.Collection('theFarm');

d)

farmdb = new mongo.collection('theFarm');

9.

Where should a newly created JavaScript file containing the definition of a Mongo collection be imported?

a)

In the client-side JavaScript code.

b)

In the server-side JavaScript code.

c)

In both the client-side and server-side JavaScript code.

d)

No import is necessary because Meteor detects it automatically.

10.

Which function has the correct syntax to return the number of records stored in a collection?

a)

db.find().count

b)

db.find().count()

c)

db.find.count()

d)

db.find.count

11.

What does the MongoDB find function return?

a)

A cursor.

b)

A pointer.

c)

A record.

d)

An array.

12.

Which block function has the correct syntax to display several documents that have been sent to a template?

a)

{{each photos}}

b)

{{#each photos}}

c)

((each photos))

d)

((#each photos))