CREATE TABLE ATT_CLASSES
(
    ATT_CLASS_ID INTEGER default 0 not null
        primary key,
    ATT_CLASS    TEXT      not null
);
ATT_CLASSES
CREATE TABLE OBJ_CLASSES
(
    OBJ_CLASS_ID INTEGER default 0 not null
        primary key,
    OBJ_CLASS    TEXT      not null
);
OBJ_CLASSES
CREATE TABLE IMG_OBJ
(
    IMG_ID        INTEGER default 0 not null,
    OBJ_SAMPLE_ID INTEGER    default 0 not null,
    OBJ_CLASS_ID  INTEGER              null,
    X             INTEGER              null,
    Y             INTEGER             null,
    W             INTEGER              null,
    H             INTEGER              null,
    primary key (IMG_ID, OBJ_SAMPLE_ID),
    foreign key (OBJ_CLASS_ID) references OBJ_CLASSES (OBJ_CLASS_ID)
);
IMG_OBJ
CREATE TABLE IMG_OBJ_ATT
(
    IMG_ID        INTEGER default 0 not null,
    ATT_CLASS_ID  INTEGER    default 0 not null,
    OBJ_SAMPLE_ID INTEGER    default 0 not null,
    primary key (IMG_ID, ATT_CLASS_ID, OBJ_SAMPLE_ID),
    foreign key (ATT_CLASS_ID) references ATT_CLASSES (ATT_CLASS_ID),
    foreign key (IMG_ID, OBJ_SAMPLE_ID) references IMG_OBJ (IMG_ID, OBJ_SAMPLE_ID)
);
IMG_OBJ_ATT
CREATE TABLE PRED_CLASSES
(
    PRED_CLASS_ID INTEGER default 0 not null
        primary key,
    PRED_CLASS    TEXT     not null
);
PRED_CLASSES
CREATE TABLE IMG_REL
(
    IMG_ID         INTEGER default 0 not null,
    PRED_CLASS_ID  INTEGER    default 0 not null,
    OBJ1_SAMPLE_ID INTEGER    default 0 not null,
    OBJ2_SAMPLE_ID INTEGER   default 0 not null,
    primary key (IMG_ID, PRED_CLASS_ID, OBJ1_SAMPLE_ID, OBJ2_SAMPLE_ID),
    foreign key (PRED_CLASS_ID) references PRED_CLASSES (PRED_CLASS_ID),
    foreign key (IMG_ID, OBJ1_SAMPLE_ID) references IMG_OBJ (IMG_ID, OBJ_SAMPLE_ID),
    foreign key (IMG_ID, OBJ2_SAMPLE_ID) references IMG_OBJ (IMG_ID, OBJ_SAMPLE_ID)
);
IMG_REL
original_column_name,column_name,column_description,data_format,value_description
OBJ_CLASS_ID,OBJECT CLASS ID,unique id number identifying object classes,integer,
OBJ_CLASS,OBJECT CLASS,the explanation about object classes,text,
OBJ_CLASSES
original_column_name,column_name,column_description,data_format,value_description
PRED_CLASS_ID,PREDICTION CLASS ID,the unique prediction id for the class,integer,
PRED_CLASS,PREDICTION CLASS,the caption for the prediction class id,text,
PRED_CLASSES
original_column_name,column_name,column_description,data_format,value_description
IMG_ID,IMAGE ID,the id representing images,integer,
OBJ_SAMPLE_ID,OBJECT SAMPLE ID,the id of the object sample,integer,
OBJ_CLASS_ID,OBJECT CLASS ID,the id indicating class of the objects,integer,
X,,x coordinate ,integer,
Y,,y coordinate ,integer,
W,,width of the bounding box of the object,integer,
H,,height of the bounding box of the object,integer,"commonsense evidence:

bounding box of the object: (x, y, W, H)"
IMG_OBJ
original_column_name,column_name,column_description,data_format,value_description
IMG_ID,IMAGE ID,id number of each image,integer,
ATT_CLASS_ID,ATTRIBUTE CLASS ID,attribute class number for image,integer,"commonsense evidence:

if one IMG_ID has many ATT_CLASS_ID, it refers to that this image has multiple attributes"
OBJ_SAMPLE_ID,OBJECT SAMPLE ID,object sample id,integer,"commonsense evidence:

â¢ if one IMG_ID has many OBJ_SAMPLE_ID, it refers to that this image has multiple objects

â¢ if one ATT_CLASS_ID has many OBJ_SAMPLE_ID, it refers to that this attribute is composed of multiple objects."
IMG_OBJ_ATT
original_column_name,column_name,column_description,data_format,value_description
IMG_ID,IMAGE ID,the image id ,integer,
PRED_CLASS_ID,PREDICTION CLASS ID,the prediction relationship class between objects,integer,"commonsense evidence:

if OBJ1_SAMPLE_ID = OBJ2_SAMPLE_ID, this relationship is the self-relation."
OBJ1_SAMPLE_ID,OBJECT1 SAMPLE ID,the sample id of the first object,integer,
OBJ2_SAMPLE_ID,OBJECT2 SAMPLE ID,the sample id of the second object,integer,"commonsense evidence:

if (OBJ1_SAMPLE_ID, OBJ2_SAMPLE_ID) has multiple PRED_CLASS_ID, it means these two objects have multiple relations."
IMG_REL
original_column_name,column_name,column_description,data_format,value_description
ATT_CLASS_ID,ATTRIBUTE CLASS ID,the unique attribute class ids,integer,
ATT_CLASS,ATTRIBUTE CLASS,the corresponding classes for attributes,text,
ATT_CLASSES