MongoDBElasticSearchRDMS类比

Posted youngxuebo

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了MongoDBElasticSearchRDMS类比相关的知识,希望对你有一定的参考价值。

SQL术语/概念MongoDB术语/概念ElasticSearch术语/概念解释/说明
databasedatabaseIndex数据库
tablecollectiontype数据库表/集合
rowdocumentdocument数据记录行/文档
columnfieldfield数据字段/域
indexensureIndexIndices索引
table joins表连接,MongoDB不支持
primary keyprimary key主键,MongoDB自动将_id字段设置为主键

mongo的聚合操作和mysql的查询做下类比:

SQL 操作/函数mongodb聚合操作
where$match
group by$group
having$match
select$project
order by$sort
limit$limit
sum()$sum
count()$sum
join$lookup (v3.2 新增)

以上是关于MongoDBElasticSearchRDMS类比的主要内容,如果未能解决你的问题,请参考以下文章