How to connect and first use mongoDB

How to connect and first use mongoDB

How to connect and first use mongoDB

After installation mongodb now how we can use or we test to connected with databased ?? for the first you need to run mongod on your terminal. you can use npm or git bash for using two terminal, one for run mongod db terminal server and one again for run monggo command.
Just run command like this
mongod
And then terminal run mongod
After this now you can use npm or VScode other terminal for runing mongo or open mongo.exe on C:\Program Files\MongoDB\Server\4.2\bin\mongo.exe double clik on mongo.exe,and then just run the code
mongo
now you can start using mongodb , for the first you need know about comand monggo just run
help
and mongo display all function for using this db.
Now we can check and try run with
show dbs
And by default terminal displaying admin , config , and local.
Oke now lest try to create mongodb first, and run the code
use firstDB
And then enter.
automaticly db switched on firstDB,and ready to create database. you can check what db you use with run the command
db
And terminal display waht you DB your use.
now lest try to create table or database and run
db.user.insertOne
({
_id: 1,
name: "Francis Nganou"
age: 31

})

And table databased is now creation, but how to check if database created ?? you can run
show collections
And the terminal display databased table.
And now how we can check what a database use it ?? you can run on the terminal
db
And then terminal displaying what database you use it.
Now how to check a database table we create before ?? you can just run the command with
db.user.find()
and terminal is displaying detail about table you created.
Now how about update the data, in mongodb is a freedom database you can customises for what you need about table database. now if you need to update data like create new or insert in to table you can create or run command like this
db.user.updateOne({_id: 1},{$set: {gender:male}})
Now check it with run
db.user.find()
And automaticly you have insert new table on database. yes... gender is a new you insert in to database user table, with mongo you can customise a database what you needed.for exmaple on user one with gender and user two without gender is a easy customises with using mongodb.
Now how to delete data from mongo ?? just simple you can run command
db.user.deleteOne({_id: 1})
And how to delete the databases ?? you must swith or use where database wan to delete, just run with "db" and then with run "use myDB", if you have selected and switch to database wan to delete now you can run commmand
db.dropDatabase
Oke... i hope this Article How to connect and first use mongoDB help you to learn mongoDB.

Read how installtion mongoDB in here →

Text Notes Update

Aplikasi
Temukan aplikasi toko,aplikasi restoran,aplikasi bengkel, aplikasi sekolah, aplikasi invoice , aplikasi akuntansi , aplikasi ekspedisi disini.

Bang Resto Aplikasi Restoran
Aplikasi restoran cafe rumah makan sangat lengkap include website integrasi ,waitrers, kitchen ,kasir, admin, qr code menu digital , whatsapp online order dalam satu app.

Pembuatan Website Cepat dan SEO
Saatnya kini kembangkan website super cepat tanpa database dengan dukungan SEO di dalam nya.

Typography Hockey Computindo
Mesin Kasir , aplikasi kasir , aplikasi toko, aplikasi restoran, aplikasi bengkel, aplikasi sekolah, pembuatan website terbaru.

Lava Aplikasi Toko Grosir dan Eceran.
Kebutuhan untuk penjualan eceran grosir maka menggunakan aplikasi toko lavaapp adalah pilihan terbaik untuk toko minimarket bisnis usaha mu.

Mesin Kasir
Mesin Kasir terbaru untuk toko minimarket dan mesin kasir restoran cafe rumah makan.

Mesin Kasir Restoran
Restoran cafe rumah makan wajib menggunakan mesin kasir ini, lengkap aplikasi software program restoran waiters kitchen kasir admin all in one.

Mesin Kasir Toko
Sempurna dengan barcode system dan touchscreen metode untuk mesin kasir toko minimarket retail shop.

Pembuatan website modern terbaru
Buat web modern bersama kami dengan react, next, remix, gatsby , angular, svelte , blazor wasm untuk solusi terbarik pengembangan site mu.

Mr.RestoPos Aplikasi Restoran
Aplikasi restoran cafe rumah makan super lengkap dengan kemampuan waiters , kitchen display, kasir dan admin dalam satu app integrasi website resto cafe rumah makan.

Explore Notes

Product & Services

Dukungan produk dan layanan kami untuk membantu memajukan bisnis usaha mu.

mesin kasir online

Mesin Kasir

Pilihan mesin kasir terbaik dengan hardware pilihan.

modern website

Website

Pengembangan website modern technology.

aplikasi kasir toko restoran

Applikasi

Aplikasi kerja untuk menunjang bisnis usaha mu.