First, the database operation
1. View the current database name
2. View all database names
3. Toggles the database if the database does not exist and is not created until the database is created when the data is inserted or the collection is created
4. Delete the currently pointing database and do nothing if the database does not exist
Second, set operation
1. Create a Collection
2. View a collection of current databases
3. Delete Collection
Third, data additions and deletions to change
1. Inserting data
Note: If you do not specify _ID,MONGODB when inserting data, you will automatically assign a
2. Update data
3. Save Data
4. Delete
iv. data Query
1. Search All
2. Querying a single piece of data
3. Format Query
comparison Operators
4. query for age greater than or equal to 18
logical operators $or and and
5. Scope Query
6. Gets the specified data entry limit
7. Skip the specified entry skip
8. Projection (just show the fields you want to see)
9. Sort
10. Statistics Count
11. Go to heavy distinct
Five, aggregate function
Aggregate
Common expressions
For example:total number of students, average age
Pivot data (that is, the data is displayed in categories)
For example: statistics on student gender and student name
Vi. Index
1. Create an index
2. The ability to create unique indexes to implement unique constraints
3. View all indexes on a document
4. Delete Index
Vii. Backup
1. Backing up data
2. Recovering Data
MongoDB Database Common Operations