MongoDB

MongoDB is a document database which belongs to a family of databases called NoSQL - not only SQL. In MongoDB, records are documents which behave a lot like JSON objects in JavaScript. Values in documents can be looked up by their field’s key. Documents can have some fields/keys and not others, which makes Mongo extremely flexible.



This is different than SQL databases like MySQL and PostgreSQL, where fields correspond to columns in a table and individual records correspond to rows.
5Steps to Run:
1.Download MongoDB
2.Extract the Path
3. Go as Cmd as Following Path :-   cd Downloads/mongodb-osx-x86_64-4.0.2/bin/
4. Run :  iMac:bin Santosh_imac$ mongod
2018-09-19T11:12:24.339+0530 I CONTROL  [main] Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'
2018-09-19T11:12:24.491+0530 I CONTROL  [initandlisten] MongoDB starting : pid=26402 port=27017 ...................................................................................................................


5.open another cmd Run in same path : bin santosh_imac$ mongo


MongoDB shell version v4.0.2
connecting to: mongodb://127.0.0.1:27017
MongoDB server version: 4.0.2
Server has startup warnings: 

2018-09-19T11:12:35.781+0530 I CONTRO


6.  > show dbs

=============================================================================================


7. Show Collections

8. db.collectionname.find()

9.db.createnamecollection.save({"name":"xyz"})

Comments

Popular posts from this blog

SessionStorage, localStorage and Cookies