MongoDB em 15 minutos



MongoDB em 15 minutos

MongoDB em 15 minutos

Aprenda MongoDB em 15 minutos, sem enrolação.

👉 Curso de PHP, MySQL, HTML5, CSS, Bootstrap4, Javascript ► http://bit.ly/CursoPHPMysql

Documentação do MongoDB ► https://docs.mongodb.com/manual/introduction/

Site do MongoDB ► https://www.mongodb.com
Site do Robo3T ►https://robomongo.org

Comandos utilizados no vídeo:
show dbs;
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}]});

Site do Canal TI ► https://www.canalti.com.br

• Gostou ? Like/Fav
• Quer acompanhar ? Inscreva-se – http://goo.gl/T2hIZN

Comments are closed.