Summary

In this chapter, we looked at ways to model relationships between objects that go beyond the straightforward parent-child relationships, which are captured elegantly by a compound primary key. We found that query-driven schema design motivated us to create multiple representations of the follow relationship; each representation was optimized to answer a specific question about follows. This led us to a denormalized schema, wherein each follow has multiple representations in our database.

While our denormalized schema requires more write operations than a normalized one and extra care at the application level to ensure the different representations of follows are consistent with one another, we end up with a better overall performance ...

Get Learning Apache Cassandra - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.