Skip to content

The MongoDB repository is a collection of examples and tutorials for learning MongoDB, a NoSQL document-oriented database system. It provides a basic understanding of how to use MongoDB and its features, making it a great starting point for beginners.

License

Notifications You must be signed in to change notification settings

bhavyapandya07/MongoDB

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

MongoDB

I have added some MongoDB commands for the Database, I will add more commands as i Learn more and more in Mongo, will even add some API which i am currently working on REST API. The List has not been update in the txt file, soon will add more new commands, till than you can work on the commands given by me.


Installation steps

  1. Download MongoDB from this website and make sure you download the community version and not the enterprise version as shown in the image.
    https://www.mongodb.com/try/download/community
    image

  2. Install MongoDB as a service in your device so it will be always running in the background and you dont have to start everytime from the app.
    image
    Here the Data directory can be change as per your way, in any folder.

  3. Then after the install, Close MongoDB and MongoDb Compasss.

    1. go to the install Directory as shown mine, yours might also be same if you installed in the C drive.
    2. C:\Program Files\MongoDB\Server\6.0\bin
    3. copy this path.
    4. do Win+S type ENV and enter to System Environment Variables.
    5. tap on path and tap edit.
    6. in that add new path which we copied on the point ii and apply changes or OK.
  4. Then open your Terminal/Windows PowerShell and type this command shown in the image.
    image

  5. if this doesn't work or shows any error, then just do this things.

    1. go and download this zip file.
    2. https://www.mongodb.com/try/download/shell
    3. This is the MongoDB Shell or you can called it as the Compiler for Mongo. image
    4. Extract this Zip and in this zip go and copy this Mongosh.exe. image
    5. Then go and paste this exe in and MongoDB directory, for mine is this C:\Program Files\MongoDB\Server\6.0\bin (here i have just renamed the Mongosh.exe file into Mongo so it will be easy to type in the Powershell). image
    6. Add this path in the C folder where Mongo is installed C:\data\db.
    7. After this you can again go to the Terminal/PowerShell and type Mongo or Mongosh to start the Database.

Creating a Database

  1. Open MongoDB Compass and tap on Fill in Connection Fields individually. image
  2. After this Screen will be shown then do nothing just tap connect. image
  3. Then Tap on Create Database. image
  4. Name your Database according to you and add a collection name to it whatever you want, do tick any options just fill this 2 cells and tap Create Database.
  5. This type of a Screen will be shown after the creation of database. image
  6. You can tap on the Database and Check Collection. image
  7. Now Everything is set, Start Entering your data in your own database From the PowerShell.

All the powershell commands are given in the .txt file

you can also reffer to this links for understanding the commands

  1. https://www.tutorialspoint.com/mongodb/index.htm
  2. https://www.javatpoint.com/mongodb-tutorial


also remember this things given in the image
unknown
unknown (1)


About

The MongoDB repository is a collection of examples and tutorials for learning MongoDB, a NoSQL document-oriented database system. It provides a basic understanding of how to use MongoDB and its features, making it a great starting point for beginners.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published