上一篇有提到 MongoDB Compass,而且也已經裝好了,那就來介紹一下吧
MongoDB Compass 是官方做的圖形介面工具用來操作架好的 MongoDB service,這樣就不用什麼事情都辛苦的用 mongo shell 操作了

輸入想要連接的 MongoDB service,uri 要以 mongodb:// 開頭,再加上 ip 和 port

MongoDB 的結構是是這樣,在一個 MongoDB service 底下可以建立好幾個 database,在 database 底下有多個 collection,在 collection 底下才是一筆又一筆的資料,在 MongoDB 叫做 document 是 MongoDB 中最小的資料單位
點選左下方的 + icon

然後輸入想要的 database 和 collection 名稱,然後點選 Create Database 就行了

選擇想要加入資料的 database 和 collection 然後點選 ADD DATA,如果要直接增加一個 document,那就選 Insert Document 然後就可以手動增加資料了

然後上面有一個 filter 搜尋欄可以用來找想要的資料,搜尋的語法在下一篇會提到
