MongoDB operation instruction in common
- 1.
mongod
Start servicesmongo
to enter the command mode - 2. The
show dbs
display says some database
- 3.db view the database of the current operation
- 4.use switch the current operation of the database without this database will be created
- 5.db. set (analogous to a relational database table) .insertOne () is inserted into a data
- db. collection .find () all data found in this collection
collection of two-dimensional table ===
=== document database
only need to specify where to insert the data, you do not need to manually building a database built form
find()
findOne()
save()