CQL
Create KeySpace
( same as db in SQL )
CREATE KEYSPACE mykeyspace WITH REPLICATION = {
'class' : 'NetworkTopologyStrategy',
'replication_factor' : 3
};
use mykeyspace;
DESCRIBE mykeyspace;
CREATE TABLE users (
user_id int,
fname text,
lname text,
PRIMARY KEY((user_id))
); Create Table & Insert Data
More Queries
All inserts in Scylla DB (and Cassandra) are actually upserts (insert/update). There can be only one set of values for each unique primary key. If we insert again with the same primary key, the values will be updated.
Data Modelling
Map
Set
List
Last updated
Was this helpful?