Keys and Search restrictions in Cassandra

  1. Start Cassandra on local
cassandra -f
cqlsh
cqlsh> CREATE KEYSPACE sample WITH replication = {'class':'SimpleStrategy', 'replication_factor' : 1};
cqlsh> USE sample;
CREATE TABLE employee(emp_id int, emp_name text, emp_city text, emp_sal varint,emp_phone varint, PRIMARY KEY(emp_id));
  1. Allow filtering
CREATE TABLE employee_by_name(emp_id int, emp_name text, emp_city text, emp_sal varint,emp_phone varint, PRIMARY KEY(emp_name));

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store