Skip to main content

Posts

Showing posts with the label What is MongoDB and Why we use MongoDB

Mongodb if else statement

According to MongoDb  docs, $cond "evaluates a Boolean expression to return one of the two specified return expressions". Syntax: { $cond : { if: < expression >,                      then: < true >,                     else: < false >        } } OR { $cond : [<expression>, <true>, <false>] } Example for MongoDb if else statement db . customers . aggregate (    [{          $project:            {              C_Id: 1,              C_Type:     ...

What is MongoDB and Why we use MongoDB?

The MongoDB  is now most popular cross platform NoSQL  open source database management system. The MongoDB is written using the C++ language and developed by 10gen but now it's called MongoDB Inc. The MongoDB  is document oriented database and its store the data in document with JSON format. i.e.     {         UserId: 001,         UserName: 'Anil Singh' ,         EmailID: 'anil@gmail.com' ,         ContactNo : '9016615587',           OtherDetail: [            {                Qualification: "MCA" ,                WorkingArea: 'IT Software' ,      ...