liveBook · Manning

Cassandra persistence

As explained in Spring in Action, Sixth Edition

Cassandra persistence is the storage and retrieval of application data in Cassandra tables using Cassandra's data model.

Cassandra persistence maps application domain types to Cassandra tables so their data can be stored and retrieved. Spring Data Cassandra uses mapping annotations rather than JPA annotations. section 4.1.3

The main mapping choices are:

  • Annotate Ingredient with @Table("ingredients") and its identifier with @PrimaryKey. section 4.1.3

A stored taco

A tacos row can contain a time-based UUID, name, creation date, and an ingredients collection containing values such as Flour Tortilla, Carnitas, Sour Cream, Salsa, and Cheddar.

How Spring in Action, Sixth Edition covers it

How deep it goes
Explains table, primary-key, partition-key, UUID, and user-defined-type mappings, but does not show repository operations.
Examples
Uses Ingredient, Taco, TacoOrder, Cassandra classes, user-defined types, and a queried tacos row.
What it assumes
Assumes domain classes and JPA-style mapping experience, then contrasts those annotations with Cassandra-specific mappings.
What you can do after
Apply Spring Data Cassandra annotations to map domain classes and model related values without relational joins.
How it connects
Connects Spring Data Cassandra annotations with domain types, partition keys, UUIDs, denormalization, and user-defined types.

This explainer was generated by Manning's knowledge graph from the text of Spring in Action, Sixth Edition. The section links point to the parts of the book it draws on.