Create the MongoDB database(NoSQL)
you can install mongodb on windows.then you have to open another directory in C:/data/db. beacause you have to store your data.
then go the MongoDB's bin Directory and open command prompt and then type the "mongod" in the terminal.it is the start point of the mongodb server.
these are the basic mongodb package components:
you can start mongo client tool by using administrative CMD prompt and then type
" mongo "
Create the database using commands and input some data:
show dbs- displaying the databases
use dbname-use the database
show collections
use collectionnmae
db.collectionname.find()- print the data in row
db.collectionnmae.find().pretty()-print the data in coloumn
Restore and Backup the database
you can install mongodb on windows.then you have to open another directory in C:/data/db. beacause you have to store your data.
then go the MongoDB's bin Directory and open command prompt and then type the "mongod" in the terminal.it is the start point of the mongodb server.
these are the basic mongodb package components:
you can start mongo client tool by using administrative CMD prompt and then type
" mongo "
Create the database using commands and input some data:
show dbs- displaying the databases
use dbname-use the database
show collections
use collectionnmae
db.collectionname.find()- print the data in row
db.collectionnmae.find().pretty()-print the data in coloumn
How to Backup and the Restore the database:
Open the another cmd prompt(Administor account) and type mongodump.Then it will be creates a folder called dump.
If you are deletes the database or collections,then you can restore it back.
Restore and Backup the database
thank you!
Comments
Post a Comment