CREATE KEYSPACE cql3ks WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1 };
USE cql3ks;

CREATE TABLE test (a int PRIMARY KEY, b int);
CREATE TABLE moredata (x int PRIMARY KEY, y int);
INSERT INTO test (a,b) VALUES (1,1);
INSERT INTO test (a,b) VALUES (2,2);
INSERT INTO test (a,b) VALUES (3,3);
INSERT INTO moredata (x, y) VALUES (4,4);
INSERT INTO moredata (x, y) VALUES (5,5);
INSERT INTO moredata (x, y) VALUES (6,6);

CREATE TABLE compotable (a int, b int, c text, d text, PRIMARY KEY (a,b,c));
INSERT INTO compotable (a, b , c , d ) VALUES ( 1,1,'One','match');
INSERT INTO compotable (a, b , c , d ) VALUES ( 2,2,'Two','match');
INSERT INTO compotable (a, b , c , d ) VALUES ( 3,3,'Three','match');
INSERT INTO compotable (a, b , c , d ) VALUES ( 4,4,'Four','match');

create table compmore (id int PRIMARY KEY, x int, y int, z text, data text);
INSERT INTO compmore (id, x, y, z,data) VALUES (1,5,6,'Fix','nomatch');
INSERT INTO compmore (id, x, y, z,data) VALUES (2,6,5,'Sive','nomatch');
INSERT INTO compmore (id, x, y, z,data) VALUES (3,7,7,'Seven','match');
INSERT INTO compmore (id, x, y, z,data) VALUES (4,8,8,'Eight','match');
INSERT INTO compmore (id, x, y, z,data) VALUES (5,9,10,'Ninen','nomatch');


CREATE TABLE collectiontable(m text PRIMARY KEY, n map<text, text>);
UPDATE collectiontable SET n['key1'] = 'value1' WHERE m = 'book1';
UPDATE collectiontable SET n['key2'] = 'value2' WHERE m = 'book2';
UPDATE collectiontable SET n['key3'] = 'value3' WHERE m = 'book3';
UPDATE collectiontable SET n['key4'] = 'value4' WHERE m = 'book4';


