The MongoDB Metamorphosis: Thinking about Data as Documents

Kyle Banker (10gen)
General
Location: Room 309- 310
Average rating: ****.
(4.21, 73 ratings)

Inspired by the developing NoSQL movement, many of us Rails developers have gravitated towards MongoDB, a fast, scalable, schema-free, document-oriented database.

But there’s a problem: we’ve all been thinking in terms of migrations, join tables, normalization, and all the other practices born out of RDBMS. This naturally raises many questions about document-oriented modeling:

  • What’s the best way to create a many-to-many relationship, a polymorphic association?
  • When do we nest our data, and when is it best kept in separate collections?
  • How do we represent common data structures like trees and lists?
  • How much denoralization is appropriate?

The first half of the presentation will cover some essential document-based schema design patterns. We’ll consider these in light of MongoDB’s features, as our schemas should always complement the database’s core query, insert, update, and aggregation functions.

Next, we’ll use a common data modeling domain, product catalog management, to contrast RDBMS and document-based modeling strategies. This will shed light on some of the advantages and tradeoffs of moving to a document-oriented system.

Photo of Kyle Banker

Kyle Banker

10gen

Kyle Banker works at 10gen, where he maintains the MongoDB Ruby driver and supports Ruby developers at large. Previously, he built e-commerce and social networking applications in Rails at Alexander Interactive. Originally a languages nerd and a teacher of English lit., Kyle find himself quite at home in the multi-faceted Ruby and Rails communities.

Comments on this page are now closed.

Comments

Picture of Kyle Banker
Kyle Banker
06/15/2010 11:10pm EDT

@rafael thank you, sir!

Rafael Magana
06/15/2010 10:49pm EDT

One of the best talks this RailsConf, no doubt. Congrats, Kyle.

Picture of Kyle Banker
Kyle Banker
06/12/2010 1:32pm EDT

@john thanks for pointing out the theme of candor. i’m sure i could do better in some cases, but glad to see it came through.

John Petersen
06/11/2010 10:22am EDT

A good overview of MongoDB. What I especially liked was the candor when asked if a specific type of app would be a good candidate for Mongo. Kyle candidly said no give the transactional nature of the app in question. All too often, from proponents of specific technologies, we hear what the technology excels at and not enough about areas where the tech may not be a good fit. IMO, knowing what something cannot do or is not well suited is more important than knowing where the tech excels. Kyle made it very clear, how wide Mongo’s lane of fire is.

Picture of Kyle Banker
Kyle Banker
06/11/2010 10:07am EDT

@steven Thanks so much! If you’re ever in NYC, definitely stop by and we’ll finally get a chance to meet up.

Picture of Steven Haddox
Steven Haddox
06/10/2010 6:45pm EDT

Kyle, I didn’t get to meetup with you after your talk (one disadvantage of a huge RailsConf over a much smaller RubyNation I suppose), but you absolutely nailed it. Very well done presentation by far the best NoSQL related session that I attended. Just wish I could have met up later to learn some more about the best ways to integrate it with Rails applications. Keep up the great work!

Picture of Kyle Banker
Kyle Banker
06/09/2010 11:57am EDT

@vince much appreciated.

Vince Hoang
06/09/2010 11:22am EDT

Excellent talk, thanks Kyle

Picture of Kyle Banker
Kyle Banker
06/09/2010 1:30am EDT

@matt thanks so much—glad it was helpful!

Matt Jones
06/09/2010 12:32am EDT

The e-commerce examples were a huge help for understanding the conceptual shift from “rows” to “documents”. Thanks!

Picture of Kyle Banker
Kyle Banker
05/07/2010 12:37pm EDT

@charles. Yes, I’ll make the slide available afterwards.

Charles Davison
05/07/2010 9:57am EDT

Will the presentation or slides be available for this after the event?

Picture of John Bender
John Bender
04/03/2010 1:20pm EDT

Damn excited to see this talk!

co-presented by Ruby Central, Inc. O'Reilly
  • Engine Yard
  • Heroku
  • 8th Light
  • Blue Box Group
  • InfoEther
  • JetBrains
  • New Relic
  • Open Hosting
  • Rhomobile
  • WyeWorks
  • Linux Pro Magazine
  • Chargify

Sponsorship Opportunities

For information on exhibition and sponsorship opportunities at RailsConf, contact Yvonne Romaine at yromaine@oreilly.com.

Download the RailsConf Sponsor/Exhibitor Prospectus

Media Partner Opportunities

For information on trade opportunities with O'Reilly conferences or contact mediapartners@ oreilly.com

Program Ideas

Send us your suggestions for speakers, topics, and activities to rails-idea@oreilly.com.

Press and Media

For media-related inquiries, contact Maureen Jennings at maureen@oreilly.com.

RailsConf Newsletter

To stay abreast of conference news please sign up for the RailsConf newsletter (login required)

Contact Us

View a complete list of RailsConf 2010 contacts.