如何在mongodb中联接两个表 [英] how to join two tables in mongodb
问题描述
如何在mongodb中联接两个表.
how to join two tables in mongodb.
例如, 表1:用户 表2:示例
For example, table 1 : users table 2 : examples
这里的users表具有用户名,examples表也具有用户名,因此如何在php中使用mongodb合并两个表字段.
Here users table having username and examples table also having username, so how to combine both table fields using mongodb in php.
请解释该查询.
谢谢
推荐答案
不幸的是,在MongoDB中没有直接的合并/合并操作.无论如何,您可以使用映射和归约功能以适当地合并数据.
Unfortunately there is no merging/joining operation directly in MongoDB. Anyway, you can use the map-and-reduce functionality in order to combine the data appropriately.
根据您的实际问题,以下链接可能会有所帮助:
Depending on your actual problem, the following links might be of help:
http://www .pal-blog.de/entwicklung/mongodb/mapreduce-multiple-mongodb-collections-into-one.html
https://groups.google.com/forum/# !topic/mongodb-user/OQUH_wxYyRg
https://groups.google.com/forum/# !topic/mongodb-user/qxa7ZBTk7sQ
这篇关于如何在mongodb中联接两个表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!