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. 

【MongoDB】The connection between two tables_java

The result:

【MongoDB】The connection between two tables_mongodb_02

2 usage of  DBRef

grammar: 

【MongoDB】The connection between two tables_java_03

the example: 

【MongoDB】The connection between two tables_java_04

Attention: the above example has some question;