- Mastering MongoDB 3.x
- Alex Giamas
- 204字
- 2021-08-20 10:10:55
Administration
Using MongoDB should most of the time feel and be transparent to the developer. Since there are no schemas, there is no need for migrations and generally developers find themselves spending less time on administrative tasks in the database world.
That being said, there are several tasks that an experienced MongoDB developer or architect can perform to keep MongoDB up to speed and performing as well as it can.
At the process level, there is the shutDown command to shut down the MongoDB server.
At the database level we have the following:
- dropDatabase
- listCollections
- copyDB or clone to clone a remote database locally
- repairDatabase when our database is not in a consistent state due to an unclean shutdown
Whereas at the collection level there are the following:
- drop to drop a collection
- create to create a collection
- renameCollection to rename a collection
- cloneCollection to clone a remote collection to our local DB
- cloneCollectionAsCapped to clone a collection into a new capped collection
- convertToCapped to convert a collection to a capped one
At the index level we can use the following:
- createIndexes
- listIndexes
- dropIndexes
- reIndex
We will also go through a few other commands that are more important from an administration standpoint.
推薦閱讀
- Hands-On Internet of Things with MQTT
- Canvas LMS Course Design
- Introduction to DevOps with Kubernetes
- 計(jì)算機(jī)應(yīng)用復(fù)習(xí)與練習(xí)
- Mastering Salesforce CRM Administration
- Python Data Science Essentials
- JBoss ESB Beginner’s Guide
- 數(shù)據(jù)庫原理與應(yīng)用技術(shù)
- VB語言程序設(shè)計(jì)
- 網(wǎng)絡(luò)安全技術(shù)及應(yīng)用
- Apache源代碼全景分析(第1卷):體系結(jié)構(gòu)與核心模塊
- Redash v5 Quick Start Guide
- Keras Reinforcement Learning Projects
- 深度學(xué)習(xí)之模型優(yōu)化:核心算法與案例實(shí)踐
- 巧學(xué)活用電腦維護(hù)108問