MongoDB Tutorial - 5 - Commands

Опубликовано: 02 Ноябрь 2024
на канале: JsWiz
8,466
61

Learn how to add to, modify and find documents within a mongodb collection.

Full Course: http://jswiz.net

Its a good idea to get to know these commands in the shell before diving into Node and Mongoose because the code we write will end up using a lot of these methods and look very similar.

Lets start off by creating a new database. We can do that with the 'use' command. So we'll say Use example. Now, since we're Using this database, we can do stuff with it - like creating and modifying collections and documents.

useful commands for adding, modifying, removing, finding

$upsert needed when record doesn't exist