Published On Jan 6, 2021
In this video you will learn about MongoDB in practice in 15 minutes and without hassle.
Are you looking for a PROGRAMMING course?
🛑Laravel 11 Course: https://go.hotmart.com/V88252854H
MongoDB documentation ► https://docs.mongodb.com/manual/intro...
MongoDB website ► https://www.mongodb.com
Robo3T website ►https://robomongo.org
Commands used in the video:
showdbs;
use canalti;
show collections;
db.createCollection("item");
db.item.insert({ "name": "Item 1", "price": 10.0 });
db.item.find();
db.item.insertMany([ { "name": "Item 2", "price": 20.0 }, { "name": "Item 3", "price": 30.0 }]);
db.item.find().limit(1);
db.item.find({_id: ObjectId("5ff5f14c92040feeff5e12d7")});
db.item.find({name: "Item 2"});
db.item.find({name: "Item 2"}, {name: 1});
db.item.find({name: "Item 2"}, {_id: 0, name: 1});
db.item.find().count();
db.item.find({name: "Item 2"}).count();
db.item.remove({_id: ObjectId("5ff5f14c92040feeff5e12d8")});
db.item.update({_id: ObjectId("5ff5f0f092040feeff5e12d6")}, {$set: {price: 30.00}});
db.item.update({_id: ObjectId("5ff5f0f092040feeff5e12d6")}, {$set: {name: "Item 11", price: 30.00}});
db.item.find({price: { $gt: 25 }});
db.item.find({price: { $eq: 25 }});
db.item.find({price: { $gt: 25 }});
db.item.find({price: { $lt: 25 }});
db.item.find({price: { $in: [20.0, 30.0] }});
db.item.find({price: { $lt: 20.0 }});
db.item.find({price: { $lte: 20.0 }});
db.item.find({price: { $gt: 30 }});
db.item.find({price: { $gte: 30 }});
db.item.find({price: { $ne: 30 }});
db.item.find({price: { $nin: [20.0, 30.0] }});
db.item.find({$and: [{name: "Item 11"}, {price: 30.0}]});
db.item.find({$or: [{name: "Item 12"}, {price: 30.0}]});
⭐️ Follow me on Instagram:
/ canalti_oficial
⭐️ Want to follow along? Sign up - http://goo.gl/T2hIZN