The document discusses modeling data in Cassandra using the Chebotko method. It begins by explaining the conceptual, logical, and physical modeling stages of the Chebotko method. It then provides an example of modeling user data in a music database, showing the conceptual model, identifying access patterns, and designing the logical model with tables to satisfy each query. The logical model example shows how to design Cassandra tables for queries about performers, albums, tracks, users and their activities.
23. INSERT INTO user
(username, firstname, lastname, emails)
VALUES
('tlberglund',
'Tim'
'Berglund'
['tim.berglund@datastax.com', 'tlberglund@gmail.com'])
IF NOT EXISTS;
File
Storage
User%Crea(on
33. SELECT *
FROM users
WHERE userName = 'tlberglund' SELECT *
FROM users
WHERE userName = 'pmcfadin'
Coordinator%1 Coordinator%2
34. SELECT *
FROM users
WHERE userName = 'tlberglund' SELECT *
FROM users
WHERE userName = 'pmcfadin'
INSERT INTO users (username, ...)
VALUES ('tlberglund',...);
Coordinator%1 Coordinator%2
35. SELECT *
FROM users
WHERE userName = 'tlberglund' SELECT *
FROM users
WHERE userName = 'pmcfadin'
INSERT INTO users (username, ...)
VALUES ('tlberglund',...);
INSERT INTO users (username, ...)
VALUES ('pmcfadin',...);
Coordinator%1 Coordinator%2
36. INSERT INTO users (username, ...)
VALUES ('tlberglund',...); INSERT INTO users (username, ...)
VALUES ('pmcfadin',...);
LWT
Which user wins?
User
Registration
39. INSERT INTO users (username, ...)
VALUES (‘tlberglund',...)
IF NOT EXISTS;
Coordinator%1 Coordinator%2
40. INSERT INTO users (username, ...)
VALUES (‘tlberglund',...)
IF NOT EXISTS;
INSERT INTO users (username, ...)
VALUES (‘pmcfadin',...)
IF NOT EXISTS;
Coordinator%1 Coordinator%2