Skip to main content

Posts

Showing posts with the label MongoDB

MongoDB Tutorials : Aggregation Framework

MongoDB Aggregation Framework groups set of documents together and performs certain operation on this grouped documents and returns results in the form of documents. MongoDB aggregation answer to those query which requires grouping of documents. Aggregation framework works on three type of model Aggregation pipeline Map Reduce Single Purpose Aggregation Operations Now let see how MongoDB Aggregation Framework works with simple example. Suppose you are MongoDB application developer in a respected company and you have been given a MongoDB database that holds information about human population which is distributed according to cities and their states. here is one sample document. { "city" : "ACMAR" , "loc" : [ - 86.51557 , 33.584132 ], "pop" : 6055 , "state" : "AL" , "_id" : "3500

MongoDb : CRUD Operations Using Java

This article will show you how to use Java to perform CRUD operations on MongoDB records. If you're new to MongoDB, we recommend starting with the Getting Started With MongoDB tutorial. To begin, we'll establish a Person and Person Images table (a collection in MongoDB) to make CRUD operations in MongoDB easier. Define Data Structure The following is the data structure of the Person  and  Person Images  table (collection in MongoDB). Person id Int (primary) username String first_name String last_name String email String description String birthdate Date country String state String city String lat String lang Strin

MongoDB: Getting Started With CRUD Operations

MongoDB is a No-SQL open source database system that stores information in documents. MongoDB was created with excellent performance and accessibility in mind. A document is a collection of fields and value pair combinations that are stored in BSON (binary representation of JSON records), which is the native data type in most languages. MongoDB uses collections to hold groups of documents. Now let’s see the basic operations that can be handled in MongoDB.           Create           Read           Update          Delete collectively called the "CRUD operation" Create Operation MongoDB performs atomic creation operations on single documents. It adds a new document to the selected collection. db .{ collection_name }. insert ({ field => value , field => value , field => value , }); The value could be a simple datatype or something more complex (document or array). The Crea

Subscribe for latest tutorial updates

* indicates required