The MongoDB Metamorphosis: Thinking about Data as Documents
Location: Room 309- 310 Audience level:
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.
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.