MongoDB = одна из самых популярных документоориентированных СУБД с открытым исходным кодом
		
Использует JSON-подобные документы и схему БД:
		
			
		
| показать существующие базы | show dbs | 
| Заюзать базу | use [dbase name] | 
| показать существующие коллекции в базе | show collections | 
| добавить документ в коллекцию unicorn | db.unicorns.insert({name: 'Leto', gender: 'm', home: 'Arrakeen', worm: false}) db.unicorns.insert({name: 'Aurora', dob: new Date(1991, 0, 24, 13, 0), loves: ['carrot', 'grape'], weight: 450, gender: 'f', vampires: 43}) | 
| удаление всех документов в коллекции | db.unicorns.remove() | 
| Дропнуть базу | db.dropDatabase() | 
| имя индекса, базы данных и коллекции, для которой индекс был создан, а также полей, которые включены в него. | db.system.indexes.find() | 
| найти всё подряд И ВЫВЕСТИ ВСЁ ЭТО КРАСИВО с переносом строк, а не кучей | db.[pathtocollection].find().pretty() | 
| найти со значением полей содержащих "snacks", i — case insensitive | db.[pathtocollection].find({ type: /snacks/i }) | 
| найти со значением полей type равному "snacks" | db.[pathtocollection].find({ type: "snacks" }) | 
| найти со значением полей type равному "snacks" и вывести с форматированием | db.[pathtocollection].find({ type: "snacks" }).pretty() | 
| найти все документы, для которых вывести только поля name и gender (_id включается всегда по-умолчанию, поэтому его надо отключать отдельно) | db.[pathtocollection].find(null,{name: 1, _id:0, gender:1}) | 
| найти все документы и вывести значения всех их полей, где отсутствует (false) поле vampires | db.[pathtocollection].find({vampires: {$exists: false}}) | 
| 
				$gt	Matches values that are greater than the value specified in the query. $gte Matches values that are greater than or equal to the value specified in the query. $in Matches any of the values that exist in an array specified in the query. $lt Matches values that are less than the value specified in the query. $lte Matches values that are less than or equal to the value specified in the query. $ne Matches all values that are not equal to the value specified in the query. $nin Matches values that do not exist in an array specified to the query.  | 
			db.[pathtocollection].find({ type: 'food', price: {$lt: 9.95}}) | 
| найти документы с полем type равным food ИЛИ snacks ($in вместо $or выгоднее использовать если поиск идёт внутри поля) | db.DBNAME.find( { type: { $in: [ 'food', 'snacks' ] } } ) | 
| найти всех самок единорогов, которые или любят яблоки, или любят апельсины, или весят менее 500 фунтов. | db.DBNAME.find({gender: 'f', $or: [{loves: 'apple'}, {loves: 'orange'}, {weight: {$lt: 500}}]}) |