MongoDB术语
数据库 | ElasticSearch | MongoDB |
database | es库 | database |
table表 | index索引 | collection数据集合 |
row行(记录) | document文档(json) | document文档(json) |
column字段列 | field域 | field域 |
index索引 | - | index索引 |
join表关联查询 | - | - |
pk主键 | _id | _id |
MongoDB数据结构
UserList:[ { userId: "1001", username: "lee", age: 18 }, { userId: "1002", username: "jay", age: 20, sex: "boy" }, ]
- UserList --> collection
- {} --> document
- 属性 --> column