码迷,mamicode.com
首页 > 数据库 > 详细

【MongoDB】The connection between two tables

时间:2014-10-22 06:28:15      阅读:197      评论:0      收藏:0      [点我收藏+]

标签:mongodb   database   connection   

In mongoDB, there are two general way to connect with two tables. Manual Connection and use DBRef

1. Basically manual connection 

Firstly init the data which was saved in the different collections. 

bubuko.com,布布扣

The result:

bubuko.com,布布扣

2 usage of  DBRef

grammar: 

bubuko.com,布布扣

the example: 

bubuko.com,布布扣

Attention: the above example has some question;


【MongoDB】The connection between two tables

标签:mongodb   database   connection   

原文地址:http://blog.csdn.net/sxb0841901116/article/details/40360375

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!