Maison  >  Article  >  base de données  >  【MongoDB】Theconnectionbetweentwotables

【MongoDB】Theconnectionbetweentwotables

WBOY
WBOYoriginal
2016-06-07 16:06:141264parcourir

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;
Déclaration:
Le contenu de cet article est volontairement contribué par les internautes et les droits d'auteur appartiennent à l'auteur original. Ce site n'assume aucune responsabilité légale correspondante. Si vous trouvez un contenu suspecté de plagiat ou de contrefaçon, veuillez contacter admin@php.cn