閱讀本篇前,請先安裝 MongoDB

[MongoDB] Windows 安裝 MongoDB、Windows Install MongoDB

 


 

1. 開啟 Navicat

 

2. 按 Connection

[MongoDB] Use Navicat to manag

 

3. 點選 MongoDB,按 Next

[MongoDB] Use Navicat to manag

 

4. General:

Connection Name: 輸入要的連線名稱。

Type: 保持預設選項 Standalone

Port: MongoDB 預設為 27017

Authentication: 保持預設選項 None

[MongoDB] Use Navicat to manag

 

5. double click connection1 或在 connection1 滑鼠右鍵按 Open Connection 來開啟連線。

[MongoDB] Use Navicat to manag

 

6. 在已連線的 connection1 滑鼠右鍵,按 New Database

[MongoDB] Use Navicat to manag

 

7. 輸入要的 Database Name

[MongoDB] Use Navicat to manag

 

8. double click database1 或在 database1 滑鼠右鍵按 Open Database 來開啟 database1

[MongoDB] Use Navicat to manag

 

9. 在 Collections 滑鼠右鍵 → New Collection → Normal

[MongoDB] Use Navicat to manag

 

10. 輸入要的 Collection Name,按 Save

[MongoDB] Use Navicat to manag

 

11. double click collection1 或在 collection1 滑鼠右鍵按 Open Collection 來開啟 collection1

[MongoDB] Use Navicat to manag

 

12. 按 +

[MongoDB] Use Navicat to manag

 

12. Insert 一筆資料,按 Add (一次只能 Insert 一筆)

[MongoDB] Use Navicat to manag

 

13. 該筆資料已 Insert 進去了。

[MongoDB] Use Navicat to manag

 

 

Reference:https://www.navicat.com/en/company/aboutus/blog/769-working-with-documents-in-navicat-for-mongodb

Reference:https://www.navicat.com/en/company/aboutus/blog/768-mongodb-documents-tutorial.html