Monday, October 13, 2014

NoSql

1)
Advance stuff can be taken from tutorial point
http://www.tutorialspoint.com/mongodb/
u can learn abt relationshiops (embedded docs and references)

(but it is using console )

2)
more details about mongo crud operations etc
http://docs.mongodb.org/manual/reference/method/db.collection.find/

foreing keys
using generated object ids (1:n)
{
   "name": "Tom Benzamin",
   age:23
   "dep_ids": ObjectId("543b968daac4771b60848b8a")
   
}
(m:n)
{
   "_id":ObjectId("52ffc33cd85242f436000001"),
   "contact": "987654321",
   "dob": "01-01-1991",
   "name": "Tom Benzamin",
   "address_ids": [
      ObjectId("52ffc4a5d85242602e000000"),
      ObjectId("52ffc4a5d85242602e000001")
   ]
}
or just use _id field to reference..
need to separately retrieve and display

3)
 Using mongoVUE
install mongoVUE
      1 start d server

  • Extract MongoDB zip file and move its contents to a location of your choice (eg: c:\mongodb).
  • install mongoVUE (next next etc)
  • create folder called "data" parallel to bin folder inside mongodb folder
  • mongod.exe --dbpath "C:\mondogb\data"  This will show waiting for connections message on the console output which indicates that the mongod.exe process is running successfully.
     2 start monogoVUE (graphical interface)
            create connection...   server:localhost port:27017  ..give any name

No comments:

Post a Comment