A CREATE TABLE statement defines a ScyllaDB table by combining the application design with column names, data types, and a primary key. In the restaurant-review application, it turns planned access patterns into runnable tables. section 5.3 section 2.5
A table definition specifies:
- Columns such as TIMEUUID identifiers, TEXT fields, TINYINT scores, DATE values, and collections of frozen user-defined values. section 5.3.1
- A primary key that identifies rows and determines partitioning and sorting; the first key component serves as the partition key. section 2.5
- Optional clustering order, such as id DESC, for returning recent summaries first within author, date, or score partitions. section 5.3.2
Articles table
After creating the image user-defined type, create the main review table with the article identifier as its primary key: CREATE TABLE reviews.articles(id TIMEUUID, title TEXT, author_id TIMEUUID, score TINYINT, date DATE, images SET<FROZEN<image>>, review TEXT, restaurant_name TEXT, PRIMARY KEY (id)); section 5.3.1
Listing 5.3 Building the articles table from your design
cqlsh: reviews> CREATE TABLE reviews.articles(
id TIMEUUID,
title TEXT,
author_id TIMEUUID,
score TINYINT,
date DATE,
images SET<FROZEN<image>>,
review TEXT,
restaurant_name TEXT,
PRIMARY KEY (id)
);
Inspect the complete articles-table listing, including its columns, collection type, and primary-key declaration. section 5.3.1





