
4 Data types in ScyllaDB
This chapter covers
- The basic types ScyllaDB uses to store strings, numbers, dates, IDs, and more
- The collection types Scylla uses to aggregate data
- When to use each of these types to fit your design’s needs
In the last chapter, you learned about query-first design, using it to expand your restaurant review database into the beginnings of a database schema for a full-blown restaurant review application. Starting with the requirements, you determined the queries your app needed to run, the tables those queries run against, and the primary keys for those tables. The chapter ended on a cliffhanger: what data goes into those tables, and what are the data types associated with that data? Here, you’ll learn the answer to those great mysteries.
In this chapter, you’ll focus on the fifth question of query-first design (figure 4.1): what data goes in these tables? To answer this question, you need to know what data types ScyllaDB supports so that you can best represent your data in your schema.
Figure 4.1 Having designed your tables and queries, it’s time to determine the data types and fields you need to store.

The most basic building blocks of data modeling are the values and the types you give them. In Scylla, every column has a type, and every value in that column shares that type. Scylla supports a rich variety of types—more than just numbers and text. In this chapter, you’ll explore the tools you have to give meaning to your data.