0% found this document useful (0 votes)
137 views4 pages

MongoDB Setup & Basic Commands

Aayush Pandey is completing Experiment 2 on MongoDB installation and basic commands. The objective is to install MongoDB and perform basic operations like finding data. The student follows steps to download and install MongoDB, and creates a database and collection. Commands like find() are used to return entire data and find records where the quiz score is greater than 15, demonstrating basic MongoDB queries. The conclusion is that MongoDB was successfully installed and basic commands performed, and MongoDB is an open-source NoSQL database for large scale data storage and retrieval in non-table format.

Uploaded by

Aayush Pandey
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
137 views4 pages

MongoDB Setup & Basic Commands

Aayush Pandey is completing Experiment 2 on MongoDB installation and basic commands. The objective is to install MongoDB and perform basic operations like finding data. The student follows steps to download and install MongoDB, and creates a database and collection. Commands like find() are used to return entire data and find records where the quiz score is greater than 15, demonstrating basic MongoDB queries. The conclusion is that MongoDB was successfully installed and basic commands performed, and MongoDB is an open-source NoSQL database for large scale data storage and retrieval in non-table format.

Uploaded by

Aayush Pandey
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Roll No.

: 18102B0032

Name: Aayush Pandey

Subject: Big Data Analytics (BDA)

Subject In-charge: Pankaj Vanwari

Experiment 2

Title: MongoDB installation and basic commands


Install NoSQL MongoDB and run basic find commands.

Estimated time to complete this experiment: 2 hours

Objective: Getting acquaintance with NoSQL database. Installing MongoDB. Handling


csv or json file for basic operations with MongoDB. Running “select” type queries of SQL
using “find” command of MongoDB.

Expected Outcome of Experiment: To explain how select type queries of SQL can be
performed on MongoDB.

Books/ Journals/ Websites referred:


1. Dan Mcary and Ann Kelly ―Making Sense of NoSQL– A guide for managers and
the rest of us, Manning Press.
2. https://docs.mongodb.com/guides/
3. https://docs.mongodb.com/manual/installation/
4. https://docs.mongodb.com/manual/reference/sql-comparison/

Pre Lab/ Prior Concepts: NIL.

New Concepts to be learned: NoSQL databases and knowing how SLQ features are
supported by them.
Theory:
MongoDB Installation Steps:

Step 1: Download MongoDB Community Server.

Step 2: Click on Setup. Once download is complete open the msi file. Click Next in the
start up Screen.

Step 3: Accept the End-User License Agreement and Click Next.

Step 4: Click on the "complete" button to install all of the components. The custom
option can be used to install selective components or if you want to change the location
of the installation.

Step 5: Select “Run service as Network Service user”. Click next.

Step 6: Click on the Install button to start the installation. Installation begins.
Click Next once completed.

Step 7: Once complete the installation, Click on the Finish button.

Step 8: On completing the installation successfully, you will find the software package in
your C drive. C:\Program Files\MongoDB\Server\4.4\bin.

Step 9: Navigate to the C Drive on your computer and create a new folder
called data here. Inside the data folder, create another folder called db.

Step 10: Create an environment variable for the executable file so that you don’t have to
change the directory structure every time you want to execute the file.

Step 11: After creating an environment path, you can open the command prompt and
just type in mongo and press enter.

Step 12: The mongo server is then generated and is up and running.

Step 13: To verify if it did the setup correctly, type in the command show DBS.

With that, you have successfully installed and set up MongoDB on your Windows
system.
Program: N.A.

Output:
Creating database and collection:

Finding the entire CSV file:


Finding a data record in which column “quiz score” is greater than 15:

Conclusion: In above experiment we have successfully installed MongoDB and


performed basic MongoDB commands.
✓ MongoDB is an open-source document-oriented database that is designed to
store a large scale of data and also allows you to work with that data very
efficiently.
✓ It is categorized under the NoSQL (Not only SQL) database because the storage
and retrieval of data in the MongoDB are not in the form of tables.
✓ We have also used find() method which is used to select documents in a
collection and return a cursor to the selected documents.

You might also like