欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  数据库

MongoDB中级----关联多表查询

程序员文章站 2024-02-18 17:46:40
...

相关数据存放在一起,针对性的查询可以消除join,性能比分散存储要高且方便

MongoDB中级---->关联多表查询

[日期:2011-08-19] 来源:Linux社区 作者:crazyjixiang [字体:]

DBRef is a more formal specification for creating references between documents. DBRefs (generally) include a collection name as well as an object id. Most developers only use DBRefs if the collection can change from one document to the next. If your referenced collection will always be the same, the manual references outlined above are more efficient.

相关数据存放在一起,针对性的查询可以消除join,性能比分散存储要高且方便