What is MongoDB..... ?
- open source
- cross platform
- document oriented
- leading NoSql database
- written in C++
UBUNTU INSTALLATION
- Download the MongoDB binary file of the latest technology from the site
- Extrace the file from the downloaded archive using the command
tar -zxvf mongodb-linux-x86_64-3.2.4.tgz
- Copy your extracted archive to the installation directory(target directory)
- Give the location of the MOngoDB installation folder to the PATH variable in bashrc. Add below to the .bashrc file
export PATH=<mongodb-install-directory>/bin:$PATH
GETTING STRATED
- navigate to the installation folder
- go to bin folder in it and type
- take another terminal and type
MongoDB configuration file => etc/mongos.conf
Important Terminology
- Database
- Collection
- Document
- Dynamic Schema
Relationship of RDBMS terminology with MongoDB
Working with MongoDB
Below mind-map shows the basic commands when dealing with MongoDB like creating a database, creating a collection, querying a document etc.querying a document
We learnt find() method is used to query a document and find().pretty() to get the display in a formatted way. Below is a screen shot of a simple queryBelow shows commands in querying a document on the basis of some condition.
(in below commands 'mycol' is the collection name)
No comments:
Post a Comment