What kind of NoSQL database MongoDB is?
MongoDB Primer

Quiz
•
Computers
•
University
•
Medium
Aka People
Used 36+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
2 mins • 5 pts
Document Oriented
Key Value
Graph
Column Oriented
2.
MULTIPLE CHOICE QUESTION
5 mins • 10 pts
Which of the following is a valid MongoDB JSON document:
{}
{ "user_id"=1, "user_name"="Joe Sanders", "occupation"=["engineer","writer"] }
{ "user_id":1; "user_name":"Joe Sanders"; "occupation":["engineer","writer"] }
{ "user_id":1, "user_name":"Joe Sanders", "occupation":[ "occupation1":"engineer", "occupation2":"writer" ] }
3.
MULTIPLE CHOICE QUESTION
5 mins • 15 pts
What does the output x of the following MongoDB aggregation query result into:
db.posts.aggregate( [ { $group: { _id: "$author", x: { $sum: $likes } } } ] )
Average of likes on all the posts of an author, grouped by author
Number of posts by an author
Sum of likes on all the posts by an author, grouped by author
Sum of likes on all the posts by all the authors
4.
MULTIPLE CHOICE QUESTION
5 mins • 15 pts
Consider that you have the following two documents in the products collection:
{ "_id" : 1, "prices" : [ 60, 100, 200 ] }
{ "_id" : 2, "prices" : [ 20, 90, 150 ] }
What will the following query result into:
db.products.update( { _id: 1, prices: 100 }, { $set: { "prices.$" : 111 } } )
Updates 60 to 100
Updates 100 to 111
Updates 60,100 and 200 to 111
Removes the three elements of the prices array and replaces it only a single element 111
5.
MULTIPLE CHOICE QUESTION
5 mins • 15 pts
Which of the following aggregation query will sort the posts collection with author key ascending:
db.posts.aggregate([ {$sort:{ author:1 } } ])
db.posts.aggregate([ {$sort:{ author:-1 } } ])
db.posts.aggregate([ {author: {$sort: 1} } ])
You need to first use $group or $project or $match command before $sort in the pipeline
6.
MULTIPLE CHOICE QUESTION
5 mins • 15 pts
Which of the following commands create an unique index on author field of the posts collection?
db.posts.createIndex({"author":1 }, {"unique": true});
db.posts.createIndex({"author": unique });
db.posts.createIndex({"author": {$unique:1} });
db.posts.createIndexUnique({"author":1 });
7.
MULTIPLE CHOICE QUESTION
5 mins • 15 pts
In a collection that contains 100 post documents, what does the following command do?
db.posts.find().skip(5).limit(5)
Skip and limit nullify each other. Hence returning the first five documents.
Skips the first five documents and returns the sixth document five times
Skips the first five documents and returns the next five
Limits the first five documents and then return them in reverse order
Create a free account and access millions of resources
Similar Resources on Quizizz
9 questions
BDD Quiz

Quiz
•
University
10 questions
DBMS QUIZZ

Quiz
•
University
10 questions
2C DBMS Theory Quiz 1

Quiz
•
University
15 questions
AWS101 #3

Quiz
•
University - Professi...
10 questions
PAW-Q1-2023

Quiz
•
University
12 questions
Web Apps 03 - MongoDB

Quiz
•
University
10 questions
Express.js

Quiz
•
University
11 questions
Big Data Quizz 2

Quiz
•
University
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade