MongoDB Concepts 1
Quiz
•
Information Technology (IT)
•
University
•
Practice Problem
•
Medium
Albert Gil
Used 27+ times
FREE Resource
Enhance your content in a minute
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which document formats are typically used for documents stored in a document-based NoSQL database?
XML and CSV format.
XML and JSON format.
CSV and JSON format.
PDF and JSON format.
Answer explanation
Document-based NoSQL databases commonly use XML and JSON formats for storing data due to their flexibility and ability to represent complex structures. Thus, the correct answer is XML and JSON format.
2.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which of the following tasks cannot be completed with an aggregation pipeline? (Select one.)
Filtering for relevant pieces of data
Finding data from outside sources
Grouping documents
Calculating total values from a field across many documents
Answer explanation
The aggregation pipeline can filter, group, and calculate values from documents within the database. However, it cannot access or find data from outside sources, making 'Finding data from outside sources' the correct choice.
3.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
You have a collection that contains zip codes in the United States. Here’s a sample document from this collection:
{ "_id": ObjectId('5c8eccc1caa187d17ca6eea2'),
"city": "EVERGREEN",
"zip": "36401",
"loc": { "y": 31.458009, "x": 86.925771 },
"pop": 8556, "state": "AL" }
What will the output of this aggregation pipeline be? (Select one.)
db.zips.aggregate([ { $match: { "state": "CA" } }, { $group: { "_id": "$zip" } } ])
One document for each city located in California (CA)
One document for each zip code located in California (CA)
The total number of documents that contain a zip code in the state of California (CA)
All documents that contain a zip where the state is California (CA)
Answer explanation
The aggregation pipeline first filters documents to only those with state 'CA'. Then, it groups by zip code, resulting in one document for each unique zip code in California.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the $count stage return? (Select one.)
A single document with one field that contains the value set to the number of documents at this stage in the aggregation pipeline.
The number of groups in an aggregation pipeline.
A set number of documents from the aggregation pipeline.
A single document that contains the number of fields that have been modified in an aggregation pipeline.
Answer explanation
The $count stage returns a single document with one field that indicates the total number of documents processed at that point in the aggregation pipeline, making the first choice correct.
5.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which query operator in MongoDB is used to compare if a value is greater than another?
$lt
$gte
$gt
$eq
Answer explanation
In MongoDB, the $gt operator is used to compare if a value is greater than another. The other options serve different purposes: $lt checks for less than, $gte for greater than or equal to, and $eq for equality.
6.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which of the following is not a valid stage in an aggregation pipeline in MongoDB?
$match
$sort
$join
$group
Answer explanation
In MongoDB's aggregation pipeline, valid stages include $match, $sort, and $group. However, $join is not a valid stage; instead, MongoDB uses $lookup for joining collections.
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Given the following document in a products collection:
{ "_id": ObjectId('5c8eccc1caa187d17ca6eea2'),
"name": "Laptop",
"price": 1200,
"category": "Electronics"}
What does the query db.products.find({ price: { $lt: 1500 } }) return?
All documents with a price less than 1500.
All documents with a price greater than 1500.
All documents with a price equal to 1500.
No documents, since $lt is not a valid operator.
Answer explanation
The query db.products.find({ price: { $lt: 1500 } }) returns all documents with a price less than 1500. Since the document has a price of 1200, it meets this condition.
Create a free account and access millions of resources
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
12 questions
Borders and Shades in Word 2010 Quiz
Quiz
•
10th Grade - University
12 questions
TEST 5
Quiz
•
University
5 questions
ICT 2 - PRODUCTIVITY TOOL
Quiz
•
University
15 questions
CMS: Chapter IV Quiz
Quiz
•
University
15 questions
Advance software testing
Quiz
•
University
15 questions
ИТПД-1
Quiz
•
University
12 questions
Data Center UK 14
Quiz
•
University
12 questions
ARQUITETURA - UNIDADE 2
Quiz
•
University
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
15 questions
4:3 Model Multiplication of Decimals by Whole Numbers
Quiz
•
5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
The Best Christmas Pageant Ever Chapters 1 & 2
Quiz
•
4th Grade
12 questions
Unit 4 Review Day
Quiz
•
3rd Grade
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
Discover more resources for Information Technology (IT)
26 questions
Christmas Movie Trivia
Lesson
•
8th Grade - Professio...
7 questions
Different Types of Energy
Interactive video
•
4th Grade - University
20 questions
Slopes and Slope-Intercept Form
Quiz
•
8th Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
7 questions
Biomolecules (Updated)
Interactive video
•
11th Grade - University
20 questions
Winter/Holiday Trivia
Quiz
•
KG - University
10 questions
WINTER WIN Time - ELA - 12/9/2025
Quiz
•
KG - University
7 questions
Human Impact on Resources
Interactive video
•
4th Grade - University
