Monday, 15 September 2014

Details of the equivalent of joins in Mongodb -


I understand that does not support "Johns" as a relational database, but I'm sure Did not mean that it would really mean what's specific

Does this mean that you can not ask mongodb to do your standards:

  SELECT P.name, j.title FROM person P, job j where p.p_id = J.j_id  

Or does this simply not apply the relevance of reciprocity for you?

I was also hoping to understand how to link it ("joining"?) Related to the collection. I understand that the _id reference for compilation should be used like FK, although I'm not sure whether it will depend on the application to provide compatible code for inclusion, or if MangondoB uses its native language Now, you can join the external external on the Unshared collection in the Mongond 3.2 in the

doing.

  {$ lookup: {from: & lt; To join the collection & gt; localField: & lt; Field from Input Documents & gt; Foreign Field: & lt; From "archive", such as: & lt; Output array field & gt; }}  

See for more information.

However, even if mongodb joins support, this is a non-relational database and therefore you have your application in this way. You should prefer to embed such documents.


No comments:

Post a Comment