how to design this Database to mongodb Collections

234 views
Skip to first unread message

Amin Bahrami

unread,
Nov 12, 2015, 1:44:11 AM11/12/15
to mongodb-user
Hello friends.
I want Design this database in MongoDB.


How should I do this? After design this database in mongodb, how can execute like this command in mongodb. (Multiple collection in one MongoDB query)


Thanks


Rhys Campbell

unread,
Nov 12, 2015, 10:31:31 AM11/12/15
to mongodb-user
You're asking for quote a lot of upfront work there. What have you tried first? You basically have the option of a collection per table or nesting some tables as sub-documents in another document.

For "Joins"...

In MongoDB 3.2 you have the option of $lookup - http://slamdata.com/blog/2015/10/21/mongodb-missing-join.html
From 2.6 MongoDB could use $mergeCursors to simulate a join - http://dbattish.tumblr.com/post/108652372056/joins-in-mongodb

Asya Kamsky

unread,
Dec 5, 2015, 12:51:05 AM12/5/15
to mongodb-user
Please keep in mind, $lookup is not a join.  It's a lookup and has more limited usability than joins in general, so it's best not to recommend $lookup as if it's equivalent to joins.

You should definitely not be using $mergeCursors in your application as that's an internal command and is absolutely not guaranteed that it will continue working the way it's described in the blog post.

Asya


--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
 
For other MongoDB technical support options, see: http://www.mongodb.org/about/support/.
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user...@googlegroups.com.
To post to this group, send email to mongod...@googlegroups.com.
Visit this group at http://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/7593537f-f86d-40c5-b3ff-cbfc12b329cb%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Asya Kamsky
Lead Product Manager
MongoDB
Download MongoDB - mongodb.org/downloads
Free MongoDB Monitoring - cloud.mongodb.com
Free Online Education - university.mongodb.com
Get Involved - mongodb.org/community
We're Hiring! - https://www.mongodb.com/careers
Reply all
Reply to author
Forward
0 new messages