MCQGeeks
0 : 0 : 1
CBSE
JEE
NTSE
NEET
English
UK Quiz
Quiz
Driving Test
Practice
Games
Quiz
Computer Science
Mongodb
Quiz 3
1
2
3
4
5
6
7
Q.1
What is the preferred format to store geospatial data in MongoDB?
Latitude, longitude
XML
GeoJSON
BSON
Q.2
What does a MongoDB collection consist of?
data
documents
fields
rows
Q.3
Which MongoDB shell command should you use to back up a database?
restore
backup
mongobackup
mongodump
Q.4
Which command returns a specific document in the user’s collection?
db.users.find({_id: 1})
db.users.seek({_id: 1})
db.users.query({_id: 1})
Q.5
In MongoDB, what does a projection do?
allows you to do a calculation on the results
allows you to run queries on the server
allows you to select which fields should be in the return data
allows you to format the results for a display
Q.6
What option can be passed to start the MongoDB shell without connecting to a database?
-db=null
–shell-only
–free
-nodb
Q.7
Given a customer collection which includes fields for gender and city, which aggregate pipeline shows the number of female customers in each city? (Alternative: How can you view the execution performance statistics for a query?)
db.members.aggregate([ {$match: {gender: “Female”}}, {$group: {_id: {city: “$city”}, number: {$sum: 1}}}, {$sort :{number: -1}}])
db.members.find({$match: {gender: “Female”}}, {$group: {\_id: {city: “$city”}, number: {$sum: 1}}}.$sort ({number: -1})
db.members.find([ {$match: {gender: “Female”}}, {$group: {_id: {city: “$city”}, number: {$sum: 1}}}, {$sort :{number: -1}}])
db.members.aggregate([ {$match: {gender: “Female”}}, {$sort :{number: -1}}])
0 h : 0 m : 1 s
1
2
3
4
5
6
7
Report Question
×
What's an issue?
Question is wrong
Answer is wrong
Other Reason
Want to elaborate a bit more? (optional)
Support mcqgeeks.com by disabling your adblocker.
×
Please disable the adBlock and continue.
Thank you.
Reload page