DROP TABLE IF EXISTS triples;
CREATE TABLE triples (
	matrix_id INTEGER NOT NULL,
	relation TEXT NOT NULL,
	head TEXT NOT NULL,
	modifier TEXT NOT NULL,
	hash TEXT NOT NULL,
	amount INTEGER NOT NULL,
	PRIMARY KEY (matrix_id, relation, head, modifier)
);

DROP INDEX IF EXISTS triples_hash_index;
CREATE INDEX triples_hash_index ON triples(hash);
	
