MongoDB
Course Code BDSL456B
CIE Marks 50
Teaching Hours/Week (L: T:P: S) 0:0:2:0
SEE Marks 50
Total Hours of Pedagogy 24
Total Marks 100
Credits 01
Experiments
1 a. Illustration of Where Clause, AND,OR operations in MongoDB.
b. Execute the Commands of MongoDB and operations in MongoDB : Insert, Query, Update, Delete
and Projection. (Note: use any collection)
[Refer: Book 1 chapter 4].
2 a. Develop a MongoDB query to select certain fields and ignore some fields of the documents from
any collection.
b. Develop a MongoDB query to display the first 5 documents from the results obtained in a.
[use of limit and find]
[Refer: Book1 Chapter 4, book 2: chapter 5]
3 a. Execute query selectors (comparison selectors, logical selectors ) and list out the results on any
collection
b. Execute query selectors (Geospatial selectors, Bitwise selectors ) and list out the results on any
collection
[Refer: Book 3 Chapter 13]
4 Create and demonstrate how projection operators ($, $elematch and $slice) would be used in the
MondoDB.
[Refer: Book 3 Chapter 14]
5 Execute Aggregation operations ($avg, $min,$max, $push, $addToSet etc.). students encourage to execute several queries to demonstrate various aggregation operators)
[Refer: Book 3 Chapter 15]
6 Execute Aggregation Pipeline and its operations (pipeline must contain $match, $group, $sort, $project, $skip etc. students encourage to execute several queries to demonstrate various aggregation operators)
[refer book 2: chapter 6 ]
7 a. Find all listings with listing_url, name, address, host_picture_url in the listings And Reviews
collection that have a host with a picture url
b. Using E-commerce collection write a query to display reviews summary.
[refer Book2: chapter 6]
8 a. Demonstrate creation of different types of indexes on collection (unique, sparse, compound and
multikey indexes)
b. Demonstrate optimization of queries using indexes.
Refer: Book 2: Chapter 8 and Book 3: Chapter 12]
9 a. Develop a query to demonstrate Text search using catalog data collection for a given word
b. Develop queries to illustrate excluding documents with certain words and phrases
Refer: Book 2: Chapter 9]
10 Develop an aggregation pipeline to illustrate Text search on Catalog data collection.
Refer: Book 2 :Chapter 9]
Suggested Learning Resources:
● BOOK 1: “MongoDB: The Definitive Guide”, Kristina chodorow, 2nd ed O’REILLY, 2013.
● BOOK 2: “MongoDB in Action” by KYLE BANKER et. al. 2nd ed, Manning publication, 2016
● BOOK 3: “MongoDB Complete Guide” by Manu Sharma 1st ed, bpb publication, 2023.
● installation of MongoDB Video: https://www.youtube.com/watch?v=dEm2AS5amyA
● video on Aggregation: https://www.youtube.com/watch?v=vx1C8EyTa7Y
● MongoDB in action book Code download URL: https://www.manning.com/downloads/529
● MongoDB Exercise URL: https://www.w3resource.com/mongodb-exercises/
0 Comments