//Create Keyspace test

CREATE KEYSPACE test
	WITH REPLICATION = {'class':'SimpleStrategy','replication_factor':'112'}
	AND DURABLE_WRITES = true;
GO

// Create the following 2 tables with index.

CREATE TABLE "test"."examination"  ( 
	"center_name"    	ascii,
	"aggregate"      	float,
	"code"           	blob,
	"date&time"      	timestamp,
	"machine_address"	inet,
	"roll_no."       	double,
	"semester"       	int,
	"status"         	boolean,
	"student_name"   	text,
	"subject"        	set<text>,
	"total"          	decimal,
	PRIMARY KEY("center_name")
) WITH
	"bloom_filter_fp_chance"='0.02' AND "caching"='{"keys":"ALL", "rows_per_partition":"NONE"}' AND "comment"='IN THIS PARTITIONED KEY IS SET' AND "dclocal_read_repair_chance"='0.2' AND "gc_grace_seconds"='76400' AND "read_repair_chance"='0.3'
	AND compaction = {'class':'SizeTieredCompactionStrategy','bucket_high':'1.5','bucket_low':'1.2','min_sstable_size':'60','tombstone_compaction_interval':'2','tombstone_threshold':'0.5'}
	AND compression = {'sstable_compression':'DeflateCompressor','chunk_length_kb':'32','crc_check_chance':'1.0'}
GO

CREATE INDEX examination_index
ON "test"."examination"("aggregate");
GO

CREATE TABLE "organization"  ( 
	"product_id"  	bigint,
	"entity_id"   	uuid,
	"manager"     	map<text,text>,
	"part"        	list<text>,
	"product_name"	text,
	"release_date"	timeuuid,
	"retailer_id" 	varint,
	PRIMARY KEY("product_id")
) WITH
"bloom_filter_fp_chance"='0.1' AND "caching"='{"keys":"ALL", "rows_per_partition":"NONE"}' AND "dclocal_read_repair_chance"='0.5' AND "gc_grace_seconds"='56123' AND "read_repair_chance"='0.6'
AND compaction = {'class':'LeveledCompactionStrategy','bucket_high':'1.8','bucket_low':'0.7','min_sstable_size':'40','sstable_size_in_mb':'10','tombstone_compaction_interval':'3','tombstone_threshold':'0.5'}
AND compression = {'sstable_compression':'SnappyCompressor','chunk_length_kb':'16'}
GO

CREATE INDEX organization_index
ON "test"."organization"("retailer_id");
GO

