Home - Yash-777/mongo-java-driver GitHub Wiki

MySQL uses directories and files to store databases and tables, database and table names are case sensitive if they are located on a file system that has case-sensitive file names.

mongod.exe --port 27017 --logpath /var/log/mongodb.log --dbpath D:\mongodb\data

echo Configurating. Waiting ... 
cd "C:\Program Files (x86)\MySQL\MySQL Server 5.5\bin\" 
mysqlinstanceconfig.exe -i -q ServiceName=MySQL RootPassword=mypassword ServerType=DEVELOPER DatabaseType=INODB Port=myport Charset=utf8 
echo Done. 
echo Creating access to user. Waiting ... 
cd "C:\Program Files (x86)\MySQL\MySQL Server 5.5\bin\" 
mysql.exe -uroot -pmypassword -e "GRANT ALL PRIVILEGES ON *.* TO 'appsadmin'@'%' IDENTIFIED BY 'YYYYYPASS';
mysql -uroot -pmypassword --execute="FLUSH PRIVILEGES;"
echo Done.

C:\mongodb-win32-i386-2.6.5-rc4\bin\mongod --dbpath C:\UserFolder\WEBEXE\mongodb\db --logpath=C:\UserFolder\WEBEXE\mongodb\db\log.txt --install

C++ language is used for writing and implementing mongodb.

`db.dropDatabse()` command is used to drop the database.

Remove() method is used to remove the document form the collection.

Limit() method is used to limit the records in database.
db.COLLECTION_NAME.find().limit(NUMBER) syntax is used.
db.COLLECTION_NAME.find().sort({KEY:1}) syntax is used for sorting the documents.
db.COLLECTION_NAME.find().limit(NUMBER).skip(NUMBER).

Update() and save() methods are used to update the documents into a collection.

db.COLLECTION_NAME.update(
   { _id: 100 },
   { $set:
      {
        "tags.1": "rain gear",
        "ratings.0.rating": 2
      }
   }
)