Company
Date Published
Author
March 20, 2025
Word count
883
Language
English
Hacker News points
None

Summary

Cassandra has long struggled with data modeling, leading to questions in the Cassandra tag on Stack Overflow. The author, who answered over 1,175 questions about Cassandra data modeling, wrote a blog post in 2015 about result set ordering and how it can be solved using "query tables." However, this approach had limitations, as it required creating new query tables for each different query. In recent years, Cassandra has introduced storage-attached indexes (SAI) in version 5.0, which allow developers to query by non-key columns without the need for separate query tables. SAI can also enforce a sort order on indexed columns, improving upon previous indexing paradigms. The author explores how to use SAI to solve the problem of result set ordering and discusses DataStax's new Data API, which allows developers to work with data in a document paradigm and exposes their data as a RESTful API. This simplifies development and keeps developers focused on their application rather than the database.