Posts

what are RDBMS Where Clause Equivalents in MongoDB?

Operation Syntax Example RDBMS Equivalent Equality {<key>:<value>} db.mycol.find({"by":"tutorials point"}).pretty() where by = 'tutorials point' Less Than {<key>:{$lt:<value>}} db.mycol.find({"likes":{$lt:50}}).pretty() where likes < 50 Less Than Equals {<key>:{$lte:<value>}} db.mycol.find({"likes":{$lte:50}}).pretty() where likes <= 50 Greater Than {<key>:{$gt:<value>}} db.mycol.find({"likes":{$gt:50}}).pretty() where likes > 50 Greater Than Equals {<key>:{$gte:<value>}} db.mycol.find({"likes":{$gte:50}}).pretty() where likes >= 50 Not Equals {<key>:{$ne:<value>}} db.mycol.find({"likes":{$ne:50}}).pretty() where likes != 50

what are the data types of mongodb

MongoDB supports many datatypes. Some of them are − String  − This is the most commonly used datatype to store the data. String in MongoDB must be UTF-8 valid. Integer  − This type is used to store a numerical value. Integer can be 32 bit or 64 bit depending upon your server. Boolean  − This type is used to store a boolean (true/ false) value. Double  − This type is used to store floating point values. Min/ Max keys  − This type is used to compare a value against the lowest and highest BSON elements. Arrays  − This type is used to store arrays or list or multiple values into one key. Timestamp  − ctimestamp. This can be handy for recording when a document has been modified or added. Object  − This datatype is used for embedded documents. Null  − This type is used to store a Null value. Symbol  − This datatype is used identically to a string; however, it's generally reserved for languages that use a specifi...

what is the difference between mongodb and mysqld

MySQL MongoDB Database Database Table Collection Tuple/Row Document column Field Table Join Embedded Documents Primary Key Primary Key (Default key _id provided by mongodb itself) Database Server and Client Mysqld mongod mysql mongo