MongoDB: windows and linux installation
You can download MongoDB package from below URL : https://www.mongodb.org/downloads Windows Package : https://www.mongodb.org/dr/fastdl.mongodb.org/win32/mongodb-win32-x86_64-2008plus-ssl-3.0.3-signed.msi/download Linux Vesion : https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-rhel62-3.0.3.tgz curl -O http://downloads.mongodb.org/linux/mongodb-linux-x86_64-3.0.1.tgz Server End : Microsoft Windows [Version 6.1.7600] Copyright (c) 2009 Microsoft Corporation. All rights reserved. C:\Users\sahithi> C:\Users\sahithi> C:\Users\sahithi>cd C:/…
[MongoDB]: bsondump – how it works !
[root@myhostname bin]# ./mongo MongoDB shell version: 2.4.11 connecting to: test > > use mydb switched to db mydb > > > for(var i = 1; i <= 10000 ; i++){db.test_collection.insert({“_id” : i , “title” : “How do I create manual…
[MongoDB]: Model Tree Structures
To model hierarchical or nested data relationships, you can use references to implement tree-like structures. The following Tree pattern examples model book categories that have hierarchical relationships. Model Tree Structures with Child References The Child References pattern stores each tree…
MongoDB : Unity JDBC
JDBC Driver for MongoDB® The JDBC driver for MongoDB runs SQL queries against MongoDB for any Java application that supports JDBC. SQL support includes functions, expressions, aggregation, and joins including for collections with nested objects and arrays. See the features…
[MongoDB]: To add mongod to Linux startup
mongod script: #!/bin/bash # mongod – Startup script for mongod # description: Mongo is a scalable, document-oriented database. # chkconfig: 35 85 15 MONGO_USER=mongod if [ `id -nu` != $MONGO_USER -a `id -nu` != “root” ]; then echo “Exiting –…
[MongoDB]: Tag aware/Data centre aware sharding
MongoDB supports tagging a range of shard key values to associate that range with a shard or group of shards. Those shards receive all inserts within the tagged range. The balancer obeys tagged range associations, which enables the following deployment…
[MongoDB]: shutdown script
[root@dbversity bin]$ cat shutdown_script.sh #!/bin/bash BIN=/tmp/mongodb/bin DB=admin HOST=`hostname` UN=adm PW=pwd #PW=`cat /root/.pwd.txt` cd $BIN MONGOPID=`ps -ef | egrep ‘mongod|mongos’ | grep -v egrep | awk ‘{print $2}’` if [ -z $MONGOPID ]; then echo “There are no Mongo processes are…
[MySQL]: YCSB with MySQL
[user@myhostname ~]$ [user@myhostname ~]$ sudo su [sudo] password for user: [Lab root @ myhostname /mysql]# tar -zxvf MySQL-5.6.19-1.el6.x86_64.rpm-bundle.tar.gz MySQL-embedded-5.6.19-1.el6.x86_64.rpm MySQL-devel-5.6.19-1.el6.x86_64.rpm MySQL-client-5.6.19-1.el6.x86_64.rpm MySQL-shared-compat-5.6.19-1.el6.x86_64.rpm MySQL-server-5.6.19-1.el6.x86_64.rpm MySQL-shared-5.6.19-1.el6.x86_64.rpm MySQL-test-5.6.19-1.el6.x86_64.rpm [Lab root @ myhostname /mysql] [Lab root @ myhostname /mysql]# ll -lhtr total 415M -rw-r–r–…
[MongoDB]: how to get better performance for mongoimport operation
1) Check if your db/collection have many indexes? If so we could test if reducing the number of indexes is an option, based on your reads and query patterns. 2) Since prior to MongoDB 3.0, locking is at Database level…
MongoDB Replication video at Dbversity.com
https://www.youtube.com/watch?v=bZsZwkOzh7w&feature=youtu.be