O'Reilly Webcast: MongoDB Schema Design: How to Think Non-Relational
Why Stack Overflow recommends it
Stack Overflow users link it as a reference for MongoDB schema design questions, especially how to model one-to-many and many-to-many relationships without relational habits.
Recommended by 2 people across 2 different months, 2013 to 2014.
What it is
A 2012 O'Reilly webcast in which Jared Rosoff of 10gen (MongoDB) explains how to model data in a document database. It covers embedding versus referencing, one-to-many and many-to-many relationships, denormalization, and how schema choices affect query and update efficiency.
What people said
Recommends DMin · 2013-05 · Stack Overflow · on “Locking in MongoDB for a Pintrest like website”
My research in a few other places indicated that it isn't such a bad thing as it initially sounds like. Video from 10gen talking about the global lock : [this video] ( Skip to 55:00 for the global lock question ) Current version of mongodb : 2.4 -- Global lock removal happened in 2.2 Details: [LINK] From watching a couple of other videos on it, the following statements sum up my current understanding of the issue : "10gen rep : The global lock is something we are very serious about. The server wide lock is gone, now it is a database level lock and in the future we plan to make this to collection level.. " "If the record you are trying to update is in the RAM, you will not notice the update becaus
Recommends Nicolas S.Xu · 2014-08 · Stack Overflow · on “Search on multiple collections in MongoDB”
I think there has to be a 2 steps query if the data has many to many relationship per this video from 10gen on youtube: [this video]
Cites Hommer Smith · 2013-02 · Stack Overflow · on “Difference between Embedded Array of Ids and Normalized style in MongoDB”
So, I have been watching this [this video] video in order to learn MongoDB data modeling. In the one to many relationship, the speaker talks about three different kinds: Embedded array / array keys: In a particular document you would have a field that would be an array that references other documents (for example, blog_posts attribute in the user document would store all the ids of the blog posts that the user has created) Embedded tree: Rather than having an array with references to other things, we have documents in documents, completely embedded. Normalized: Which you have two collections and references between each other. So, what would be the difference between the embedded array keys and th
Cites Sammaye · 2014-01 · Stack Overflow · on “Database structure using MongoDb”
First off some good reference for you to look through: [LINK] [LINK] [LINK] [this video] [LINK] Now to basically sum up in relation to your question. You will normally design MongoDB collections around entities (think of an ERD diagram in UML). This means that it is actually quite similar to designing a relational model except you will nested certain detail tables that would normally be separatede out in SQLs flat structure. A good example is a "many-many" relationship. Normally this would be split out into a normalised table but in the case of MongoDB it would be nested within the parent relation document. As an example: "A user can manage many videos and a video can be managed by many users" Su
Cites bbozo · 2014-01 · Stack Overflow · on “Should this be moved to a background task?”
Considering how simple the insert/update logic is and how potentially underperforming any ruby approach will be you might want to consider doing this explicitly through the database. For example, your create_potentials would be something like: insert into potentials select :user_id, id from jobs where :user_id is being passed as a query parameter, and handle set_potential in a similar way (nested query probably in update statement). At some point you might want to move this logic into one of these [LINK] or even fall back into implementing those 2 simple methods in ruby if logic gets complicated, but for now simplest and least overkill approach seems to be to just use SQL, skip background qu