Heim  >  Artikel  >  Datenbank  >  【MongoDB】Theconnectionbetweentwotables

【MongoDB】Theconnectionbetweentwotables

WBOY
WBOYOriginal
2016-06-07 16:06:141263Durchsuche

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. The result: 2 usage of DBRef grammar: the

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.

\

The result:

\

2 usage of DBRef

grammar:

\

the example:


Attention: the above example has some question;
Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn