Please enable JavaScript.
Coggle requires JavaScript to display documents.
NOSQL MONGODB (Advantage (Fexible Data Model, Evolving Data Model, Elastic…
NOSQL MONGODB
-
CRUD operation
Create
-
-
db.user.insert([{name:'raj'},{..}..]): Many doc
db.user.insertMany([{name:'raj'},{..}..]):
-
Read
-
-
-
db.user.find({<filter-condition>},{<fieldname>:1,..})
db.user.find({'name':{$type:2}}): 2=string, 1=numeric
db.user.find({age:{$gte:3,$lte:3}}):3<=age<=13
Update
db.user.update({query-expression},{$set:{<field>:<value>,...}})
db.user.update({name:'raj},{$set:{age:10,name:'rajesh'}})
db.user.updateMany({name:'raj},{$set:{age:10,name:'rajesh'}})
Delete
-
-
db.user.remove({name:'raj'},JustOne=true)
-
Basic operation
Comparison operator: $eq,$gt,$gte,$lt,$lte,$ne
-
Range:{field:{$gte:<lower>,$lte:<uppervalue>}}
Logical operator: $not,$and,$or
-