welcome to Tech Bird Mongodb Learning
what is mongodb?
MongoDB is a free and open-source cross-platform document-oriented database program. Classified as a NoSQL database program, MongoDB uses JSON-like documents with schemas.
To get more idea about Mongodb click Here!
First of all Download the Mongodb setup and install it based on your system requirement:
Have any doubts how to install check here!
To start MongoDb
Open cmd
NOTE :
cmd->run as administrator to avoid system error.
goto the respective folder you have installed the mongodb .
Here i have installed Mongodb in the respective directory
C:\mongodb\bin
goto the directory.
Then keep the data and log path by using these command
mongod --directoryperdb --dbpath c:/mongodb/data/db --logpath c:/mongodb/log/mongo.log --logappend --rest --install
this will set the log and data path of the mongodb files and logs
To start the Mongodb
>net start mongodb
it will start the mongo shell
to start the mongo shell
>mongo
To clear the screen
>cls
To disply the db avaiable
>show dbs
Come on let create a simple db named "mycustomer"
>use mycustomer
Note:
use is the keyword and mycustomer is the db name
To check which db ur in this command can be used
>db
it will show the current db you are in.
In next blog we will learn how to create a table in mongodb with comparison with mysql .
Your Comments might help Tech Bird🌱🐦 to Fly Higher..!
So don't FORGET to Subscribe to Tech Bird.
Make your opinion count by posting a comment !
Thank You👍😍!
Come Back to Learn More From TECH BIRD😜✌👻😍
Comments