Taste of Riak

Denormalization

If you're coming from a relational database, the easiest way to get your application's feet wet with NoSQL is to denormalize your data into related chunks. For example, with a customer database, you might have separate tables for customers, addresses, preferences, etc. In Riak, you can denormalize all that associated data into a single object and store it into a Customer bucket. You can keep pulling in associated data until you hit one of the big denormalization walls:

  • Size limits (objects greater than 1MB)
  • Shared/referential Data (data that the object doesn't “own”)
  • Differences in access patterns (objects that get read/written once vs. often)

At one of these points we will have to split the model.