From the course: Learning MongoDB

Unlock the full course today

Join today to access over 24,100 courses taught by industry experts.

Challenge: Avoiding joins

Challenge: Avoiding joins - MongoDB Tutorial

From the course: Learning MongoDB

Challenge: Avoiding joins

(upbeat techno music) - [Instructor] All right. It's challenge time. If you're coming from the relational database world, you'll be familiar with joins and the use of multiple tables to construct a result. But we aren't using a relational database. We're using a document database. Now, imagine this scenario; The recipe site is going great. So great, in fact, we're going to publish a book on Kickstarter with our best recipes in it. And the campaign was a great success but now it's time to ship the rewards. We have a couple of sources of data mostly given to us in spreadsheets and CSV dumps. We have a list of backers that has user ID, first name, last name, email, and a backing level. We have a separate list of shipping addresses with a user ID, street name, city, zip state, et cetera. And then lastly, have a completely separate list that has user ID and an item name of their backer reward. And the user may have one or…

Contents