CREATE TABLE CORE (
    coreid INTEGER PRIMARY KEY,
    core text,
    coredef text);

CREATE INDEX coredef_index ON CORE(coredef);

CREATE TABLE PLATFORM (
    platformid INTEGER PRIMARY KEY,
    platform text );

CREATE INDEX platform_index ON PLATFORM(platform);

CREATE TABLE COMPILERKIND (
    compilerkindid INTEGER PRIMARY KEY, 
    compiler text);

CREATE INDEX compilerkind_index ON COMPILERKIND(compiler);

CREATE TABLE COMPILER (
    compilerid INTEGER PRIMARY KEY,
    compilerkindid INTEGER ,
    version text,
    FOREIGN KEY(compilerkindid) REFERENCES COMPILERKIND(compilerkindid)
    );

CREATE INDEX compiler_index ON COMPILER(compilerkindid,version);

CREATE TABLE TYPE (
    typeid INTEGER PRIMARY KEY,
    type text );

CREATE INDEX type_index ON TYPE(type);

CREATE TABLE CATEGORY (
    categoryid INTEGER PRIMARY KEY,
    category text);

CREATE INDEX category_index ON CATEGORY(category);

INSERT INTO TYPE VALUES(1, "q7");
INSERT INTO TYPE VALUES(2, "q15");
INSERT INTO TYPE VALUES(3, "q31");
INSERT INTO TYPE VALUES(4, "f16");
INSERT INTO TYPE VALUES(5, "f32");
INSERT INTO TYPE VALUES(6, "f64");
INSERT INTO TYPE VALUES(7, "s8");
INSERT INTO TYPE VALUES(8, "u8");
INSERT INTO TYPE VALUES(9, "s16");
INSERT INTO TYPE VALUES(10,"u16");
INSERT INTO TYPE VALUES(11,"s32");
INSERT INTO TYPE VALUES(12,"u32");
INSERT INTO TYPE VALUES(13,"s64");
INSERT INTO TYPE VALUES(14,"u64");

INSERT INTO COMPILERKIND VALUES(1,"AC6");
INSERT INTO COMPILERKIND VALUES(2,"GCC");

INSERT INTO COMPILER VALUES(1,1,"6120001"); 

INSERT INTO CORE VALUES(1,"m0","ARMCM0");
INSERT INTO CORE VALUES(2,"m0p","ARMCM0P");
INSERT INTO CORE VALUES(3,"m3","ARMCM3");
INSERT INTO CORE VALUES(4,"m4f","ARMCM4_FP");
INSERT INTO CORE VALUES(5,"m7","ARMCM7_DP");
INSERT INTO CORE VALUES(6,"m23","ARMCM23");
INSERT INTO CORE VALUES(7,"m33","ARMCM33_DSP_FP");
INSERT INTO CORE VALUES(8,"m35","ARMCM35P_DSP_FP");
INSERT INTO CORE VALUES(9,"a5","ARMCA5");
INSERT INTO CORE VALUES(10,"a7","ARMCA7");
INSERT INTO CORE VALUES(11,"a9","ARMCA9");
INSERT INTO CORE VALUES(12,"a15","ARMCA15");
