当前位置:网站首页>Use of mongodb
Use of mongodb
2022-07-25 10:22:00 【anerl】
Tips : When the article is finished , Directories can be generated automatically , How to generate it, please refer to the help document on the right
List of articles
Preface
MongoDB It's open source 、 High performance 、 A modeless document database , yes NoSQL One of the database products . Its emergence mainly responds to “ Three tenors ” Other questions , It can solve the problem that a large amount of data needs to be stored 、 High concurrent read and write 、 The reality of high availability , For social circles of friends 、 Game points 、 Logistics trajectory 、 Commodity reviews and other businesses . Low architecture cost , Excellent in all aspects .
MongoDB And MySql Compare

Basic use command
1. Create database
use Database name Such as :use articledb
2. View all databases that you have permission to view
show dbs
3. Delete database
db.dropDatabase()
4. Create set
db.createCollection("name") ; name: The name of the set created
5. View the tables in the current library
show collections or show tables
6. Delete the collection
db. Collection name .drop() If the deletion is successful, it will return true
4. Document insertion
Insert a single document :db.collection.insertOne( <document>, { writeConcern: <document> } )
Insert multiple documents :db.collection.insertMany( [<document 1>, <document 2>, ....] { writeConcern: <document> ordered: <boolean> } )
4. View the inserted document
db. Collection name .find() Such as : db.col.find()
Two 、 Operation details

边栏推荐
- Attention is all you need 论文精读笔记 Transformer
- CentOS install redis
- 构建 Dompteur 容器问题小记
- Ansible Deployment Guide
- Erlang (offline deployment)
- 数论--负进制转换
- MySQL solves the problem of not supporting Chinese
- Copy the old project into a web project
- 复现 SSL_Anti-spoofing, 使用 wav2vec 2.0 和数据增强的自动说话人认证的欺骗攻击与深度伪造检测
- C3D模型pytorch源码逐句详析(一)
猜你喜欢
随机推荐
Exception handling exception
UE4源码的获取和编译
Basic knapsack problem
Erlang(离线部署)
Angr(九)——angr_ctf
Leetcode 560 前缀和+哈希表
GUI窗口
【专栏】RPC系列(理论)-夜的第一章
用户喜好
Erlang (offline deployment)
conda 配置深度学习环境 pytorch transformers
数论---最大公约数最小公倍数
Input stream in io stream
C3D模型pytorch源码逐句详析(二)
message from server: “Host ‘xxx.xxx.xxx.xxx‘ is not allowed to connect to this MySQL server“
常用类的小知识
一文学会,三款黑客必备的抓包工具教学
切换 shell 命令行终端(bash/zsh)后,conda 无法使用: command not found
Pytorch 通过 Tensor 某一维的值将 Tensor 分开的方法(简易)
Multithreading deadlock and synchronized








