Skip to content

The Query Changed the Data Model

Six connected lessons on key-value access, alternate identities, document modeling, change streams and Cassandra query tables.

Start series →

Follow the decisions in order

  1. Part 1 of 6

    Senior

    The profile lookup takes 3 ms. Why does a new filter scan every customer?

    Decide when keyed lookup is sufficient, when a scan is unacceptable and what freshness contract a separate read model needs.

  2. Part 2 of 6

    Staff

    The phone lookup found a user. Why did it return the wrong account?

    Distinguish secondary lookup from uniqueness, then protect reassignment of an alternate key across separate records.

  3. Part 3 of 6

    Senior

    The post loads in one read. Why is adding one comment becoming expensive?

    Choose embedding versus referencing from boundedness, lifecycle, query shape and single-document atomicity.

  4. Part 4 of 6

    Staff · AI Engineering reading

    The CDC consumer is healthy again. Did it miss three days of changes?

    Recover a MongoDB change-stream projection after oplog history loss, differentiating updateLookup from event-time state.

  5. Part 5 of 6

    Senior

    The inbox query is simple. Why does Cassandra need another table?

    Derive Cassandra partitions, clustering order, bucketing and denormalized tables from concrete user queries.

  6. Part 6 of 6

    Staff

    Both writes were in one batch. Why did a reader see only one?

    Distinguish Cassandra logged-batch atomic application from isolation, and assign authority and repair for duplicated query tables.