Difficulty: Beginner
Estimated Time: 15 minutes

In this scenario, you will:

  • Create tables for a messaging data use case
  • Populate tables with sample messaging data
  • Design and execute CQL queries over messaging data

This scenario is also available on our datastax.com/dev site, where you can find many more resources to help you succeed with Apache Cassandra™.

In this scenario, you explored:

  • Schema design for a messaging data use case
  • Sample messaging data
  • CQL queries over messaging data

Messaging Data Modeling Example for Cassandra

Step 1 of 7

Create a keyspace

Create the messaging_data keyspace:

CREATE KEYSPACE messaging_data
WITH replication = {
  'class': 'NetworkTopologyStrategy', 
  'DC-Houston': 1 };

Set the current working keyspace:

USE messaging_data;