Showing posts with label mongo db. Show all posts
Showing posts with label mongo db. Show all posts

Wednesday, 21 December 2016

Commands in mongo DB-2

insert document in the collection :


insert  multiple document in the collection:

Tuesday, 20 December 2016

BSON :

BSON  is a computer data interchange format used mainly as a data storage and network transfer format in the MongoDBdatabase.

 It is a binary form for representing simple data structures, associative arrays (called objects or documents in MongoDB), and various data types of specific interest to MongoDB.

 The name "BSON" is based on the term JSON and stands for "Binary JSON".[2]

commands in mongoDB -1

show command:


create database:


drop database:



create collection way 1:



create collection way 2:








drop collection:--> success

drop collection:--> fail





How to Install Mongo DB

step 1: click the following link to download mongo DB
https://www.mongodb.com/download-center#community

step 2:run the file

step 3:go to command prompt type mongo, it show error

step 4:set the PATH VARIABLE as C:\Program Files\MongoDB\Server\3.4\bin

step 5:again  type mongo in command prompt, it will show
                 "api-ms-win-crt-runtime-l1-1-0-dll is not found"

step 6:go for the following link to solve the above problem

Download the Visual C++ Redistributable

For Windows 64-bit
For Windows 32-bit
 http://download.microsoft.com/download/9/3/F/93FCF1E7-E6A4-478B-96E7-D4B285925B00/vc_redist.x86.exe

step 7:down load and run the file

step 8:type mongo in cmd prompt now it will show


step 9: create the following folder :

D:\mongo\data\db

step 10:type following in cmd promt

mongod  d:\mongo\data\db

step 11:

now ready to use

step 12: run mongod --dbpath d:\mongo\data\db