<commit_before>alter table CAB2B_DATA_CATEGORY drop foreign key FKFA70BDE8A2330820;
alter table CAB2B_DATA_CATEGORY drop foreign key FKFA70BDE8DF75106F;
alter table DATA_CATEGORIAL_ATTRIBUTE drop foreign key FK782EFCCB34ED55B7;
alter table DATA_CATEGORIAL_CLASS drop foreign key FK13067327F94A5493;
alter table OUTPUT_CLASS_URLS drop foreign key FKE131CD69A638FEFD;
alter table CAB2B_QUERY drop foreign key FKCC34AD9DBC7298A9;

drop table if exists CURATED_PATH; 
drop table if exists CURATED_PATH_TO_PATH;
drop table if exists PATH;
drop table if exists INTER_MODEL_ASSOCIATION;
drop table if exists INTRA_MODEL_ASSOCIATION;
drop table if exists ASSOCIATION;
drop table if exists CAB2B_ID_TABLE;
drop table if exists CAB2B_DATA_CATEGORY;
drop table if exists DATA_CATEGORIAL_ATTRIBUTE;
drop table if exists DATA_CATEGORIAL_CLASS;
drop table if exists OUTPUT_CLASS_URLS;
drop table if exists CAB2B_QUERY;

/*INTERMEDIATE_PATH contains  ASSOCIATION(ASSOCIATION_ID) connected by underscore */
create table PATH(
     PATH_ID           bigint         not null,
     FIRST_ENTITY_ID   bigint         null,
     INTERMEDIATE_PATH varchar(1000)  null,
     LAST_ENTITY_ID    bigint         null,
     primary key (PATH_ID),
     index INDEX1 (FIRST_ENTITY_ID,LAST_ENTITY_ID)
);
/* Possible values for ASSOCIATION_TYPE are 1 and 2
ASSOCIATION_TYPE = 1 represents INTER_MODEL_ASSOCIATION.
ASSOCIATION_TYPE = 2 represents INTRA_MODEL_ASSOCIATION.
*/     
create table ASSOCIATION(
    ASSOCIATION_ID    bigint    not null,
    ASSOCIATION_TYPE  INT(8)    not null ,
    primary key (ASSOCIATION_ID)
);

create table INTER_MODEL_ASSOCIATION(
    ASSOCIATION_ID      bigint  not null references ASSOCIATION(ASSOCIATION_ID),
    LEFT_ENTITY_ID      bigint  not null,
    LEFT_ATTRIBUTE_ID   bigint  not null,
    RIGHT_ENTITY_ID     bigint  not null,
    RIGHT_ATTRIBUTE_ID  bigint  not null,
    primary key (ASSOCIATION_ID) 
);
create table INTRA_MODEL_ASSOCIATION(
    ASSOCIATION_ID    bigint    not null references ASSOCIATION(ASSOCIATION_ID),
    DE_ASSOCIATION_ID bigint    not null,
    primary key (ASSOCIATION_ID) 
);
create table CAB2B_ID_TABLE(
    NEXT_ASSOCIATION_ID    bigint    not null,
    primary key (NEXT_ASSOCIATION_ID)
);
create table CURATED_PATH (
	curated_path_Id BIGINT,
	entity_ids VARCHAR(1000),
	selected boolean,
	primary key (curated_path_Id)
);

/*This is mapping table for many-to-many relationship between tables PATH and CURATED_PATH */
create table CURATED_PATH_TO_PATH (
	curated_path_Id BIGINT references CURATED_PATH (curated_path_Id),
	path_id BIGINT  references PATH (path_id),
	primary key (curated_path_Id,path_id)
);
insert into CAB2B_ID_TABLE(NEXT_ASSOCIATION_ID) value(1);

create table OUTPUT_CLASS_URLS (
   CAB2B_QUERY_ID bigint not null,
   OUTPUT_CLASS_URL varchar(255),
   POSITION integer not null,
   primary key (CAB2B_QUERY_ID, POSITION)
);<commit_msg>Made the primary key fields of CuratedPath and Path table as auto increment<commit_after>alter table CAB2B_DATA_CATEGORY drop foreign key FKFA70BDE8A2330820;
alter table CAB2B_DATA_CATEGORY drop foreign key FKFA70BDE8DF75106F;
alter table DATA_CATEGORIAL_ATTRIBUTE drop foreign key FK782EFCCB34ED55B7;
alter table DATA_CATEGORIAL_CLASS drop foreign key FK13067327F94A5493;
alter table OUTPUT_CLASS_URLS drop foreign key FKE131CD69A638FEFD;
alter table CAB2B_QUERY drop foreign key FKCC34AD9DBC7298A9;

drop table if exists CURATED_PATH; 
drop table if exists CURATED_PATH_TO_PATH;
drop table if exists PATH;
drop table if exists INTER_MODEL_ASSOCIATION;
drop table if exists INTRA_MODEL_ASSOCIATION;
drop table if exists ASSOCIATION;
drop table if exists CAB2B_ID_TABLE;
drop table if exists CAB2B_DATA_CATEGORY;
drop table if exists DATA_CATEGORIAL_ATTRIBUTE;
drop table if exists DATA_CATEGORIAL_CLASS;
drop table if exists OUTPUT_CLASS_URLS;
drop table if exists CAB2B_QUERY;

/*INTERMEDIATE_PATH contains  ASSOCIATION(ASSOCIATION_ID) connected by underscore */
create table PATH(
     PATH_ID           bigint         not null auto_increment,
     FIRST_ENTITY_ID   bigint         null,
     INTERMEDIATE_PATH varchar(1000)  null,
     LAST_ENTITY_ID    bigint         null,
     primary key (PATH_ID),
     index INDEX1 (FIRST_ENTITY_ID,LAST_ENTITY_ID)
);
/* Possible values for ASSOCIATION_TYPE are 1 and 2
ASSOCIATION_TYPE = 1 represents INTER_MODEL_ASSOCIATION.
ASSOCIATION_TYPE = 2 represents INTRA_MODEL_ASSOCIATION.
*/     
create table ASSOCIATION(
    ASSOCIATION_ID    bigint    not null,
    ASSOCIATION_TYPE  INT(8)    not null ,
    primary key (ASSOCIATION_ID)
);

create table INTER_MODEL_ASSOCIATION(
    ASSOCIATION_ID      bigint  not null references ASSOCIATION(ASSOCIATION_ID),
    LEFT_ENTITY_ID      bigint  not null,
    LEFT_ATTRIBUTE_ID   bigint  not null,
    RIGHT_ENTITY_ID     bigint  not null,
    RIGHT_ATTRIBUTE_ID  bigint  not null,
    primary key (ASSOCIATION_ID) 
);
create table INTRA_MODEL_ASSOCIATION(
    ASSOCIATION_ID    bigint    not null references ASSOCIATION(ASSOCIATION_ID),
    DE_ASSOCIATION_ID bigint    not null,
    primary key (ASSOCIATION_ID) 
);
create table CAB2B_ID_TABLE(
    NEXT_ASSOCIATION_ID    bigint    not null,
    primary key (NEXT_ASSOCIATION_ID)
);
create table CURATED_PATH (
	curated_path_Id BIGINT not null auto_increment,
	entity_ids VARCHAR(1000),
	selected boolean,
	primary key (curated_path_Id)
);

/*This is mapping table for many-to-many relationship between tables PATH and CURATED_PATH */
create table CURATED_PATH_TO_PATH (
	curated_path_Id BIGINT references CURATED_PATH (curated_path_Id),
	path_id BIGINT  references PATH (path_id),
	primary key (curated_path_Id,path_id)
);
insert into CAB2B_ID_TABLE(NEXT_ASSOCIATION_ID) value(1);

create table OUTPUT_CLASS_URLS (
   CAB2B_QUERY_ID bigint not null,
   OUTPUT_CLASS_URL varchar(255),
   POSITION integer not null,
   primary key (CAB2B_QUERY_ID, POSITION)
);
{'fraction_non_alphanumeric': 0.04410517387616624, 'fraction_numerical': 0.028498727735368958, 'mean_word_length': 4.696618357487923, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '777231', 'n_tokens_mistral': 2224, 'n_tokens_neox': 2060, 'n_words': 566}