
    create table BELASTUNG_POOL (
        "UUID" raw(255) default SYS_GUID() not null,
        "CONFIG_ID" raw(255) default SYS_GUID() not null,
        "CREATED_ID" raw(255) default SYS_GUID() null,
        "CREATED_ON" date default TO_DATE('01.01.1970','DD.MM.YYYY') not null,
        "MODIFIED_ON" date default TO_DATE('01.01.1970','DD.MM.YYYY') not null,
        "RWDU" number(5,0) default 0 not null,
        "CREATED_BY" varchar2(20 char),
        "MODIFIED_BY" varchar2(20 char),
        "OWN_LIC" varchar2(4 char),
        "OPC" varchar2(8 char),
        "OWNER" number(5,0) default 0 not null,
        "GROUP" number(5,0) default 0 not null,
        "ANY" number(5,0) default 0 not null,
        "TASK_ID" varchar2(18 char),
        "RES_ID" varchar2(20 char),
        "CT_ID" varchar2(8 char),
        "PR_ID" varchar2(18 char),
        "DATE" date default TO_DATE('01.01.1970','DD.MM.YYYY') not null,
        "LOAD_ACT" number default 0 not null,
        "COMMENT" varchar2(80 char),
        "LOAD_DESCRIPTION_2" varchar2(80 char),
        "OU_CCTR_TO_BE_LOADED" varchar2(8 char),
        "TIME_START" number(10,0) default 0 not null,
        "TIME_END" number(10,0) default 0 not null,
        "OU_CCTR_OF_RES" varchar2(8 char),
        "ITEM" number(10,0) default 0 not null,
        "PERSON_INT_PAY_OBL" number default 0 not null,
        "PERSON_EXT_PAY_OBL" number default 0 not null,
        "MAT_COSTS_PAY_OBL" number default 0 not null,
        "INVESTM_PAY_OBLIG" number default 0 not null,
        "MISCEL_PAY_OBLIG" number default 0 not null,
        "PAY_OBLIGATION" number default 0 not null,
        "OBLIGO_RECORD" number(5,0) default 0 not null,
        "STORNO_RECORD" varchar2(20 char),
        "RELEASED" number(5,0) default 0 not null,
        "PR_TYPE" number(5,0) default 0 not null,
        "RESOURCE_TYPE" varchar2(2 char),
        "STORNO_TYPE" varchar2(20 char),
        "SAP_DATE" date default TO_DATE('01.01.1970','DD.MM.YYYY') not null,
        "IS_RELEASED" number(5,0) default 0 not null,
        "STATUS" number(5,0) default 0 not null,
        "TRANSFERRED_ON" varchar2(80 char),
        "PSP_ELEMENT" varchar2(40 char),
        "ACTIVITY" varchar2(40 char),
        "BASIC_UNIT" varchar2(4 char),
        "POSTING_TYPE" number(5,0) default 0 not null,
        "TASK_NAME" varchar2(80 char),
        "PR_TECHNICAL" varchar2(18 char)
    );

    create table INTERFACE_CONFIG (
        "UUID" raw(255) default SYS_GUID() not null,
        "COPY_OF" raw(255) default SYS_GUID() null,
        "COPIED_BY" varchar2(20 char),
        "COPIED_ON" date default TO_DATE('01.01.1970','DD.MM.YYYY') not null,
        "SOURCE_MODULE" varchar2(16 char),
        "TARGET_MODULE" varchar2(16 char),
        "POOL_MODULE" varchar2(16 char),
        "CREATED_ON" date default TO_DATE('01.01.1970','DD.MM.YYYY') not null,
        "MODIFIED_ON" date default TO_DATE('01.01.1970','DD.MM.YYYY') not null,
        "RWDU" number(5,0) default 0 not null,
        "CREATED_BY" varchar2(20 char),
        "MODIFIED_BY" varchar2(20 char),
        "OWN_LIC" varchar2(4 char),
        "OPC" varchar2(8 char),
        "OWNER" number(5,0) default 0 not null,
        "GROUP" number(5,0) default 0 not null,
        "ANY" number(5,0) default 0 not null,
        "POOL_TABLE" varchar2(4 char),
        "DESCRIPTION" varchar2(40 char),
        "LOGLEVEL" number(10,0) default 0 not null,
        "FINISHED" number(5,0) default 0 not null,
        "TEMPLATE" number(5,0) default 0 not null,
        "TRANSFERRED_ON" varchar2(80 char)
    );

    create table INTERFACE_LOGGING (
        "UUID" raw(255) default SYS_GUID() not null,
        "CONFIG_ID" raw(255) default SYS_GUID() not null,
        "CREATED_ON" date default TO_DATE('01.01.1970','DD.MM.YYYY') not null,
        "MODIFIED_ON" date default TO_DATE('01.01.1970','DD.MM.YYYY') not null,
        "RWDU" number(5,0) default 0 not null,
        "CREATED_BY" varchar2(20 char),
        "MODIFIED_BY" varchar2(20 char),
        "OWN_LIC" varchar2(4 char),
        "OPC" varchar2(8 char),
        "OWNER" number(5,0) default 0 not null,
        "GROUP" number(5,0) default 0 not null,
        "ANY" number(5,0) default 0 not null,
        "TEXT" varchar2(4000 char),
        "LOGLEVEL" number(10,0) default 0 not null,
        "OBJECT" raw(255) default SYS_GUID() not null,
        "TIMESTAMP" varchar2(20 char)
    );

    create table INTERFACE_MAPPING (
        "UUID" raw(255) default SYS_GUID() not null,
        "CONFIG_ID" raw(255) default SYS_GUID() not null,
        "PARENT_ID" raw(255) default SYS_GUID() null,
        "CREATED_ON" date default TO_DATE('01.01.1970','DD.MM.YYYY') not null,
        "MODIFIED_ON" date default TO_DATE('01.01.1970','DD.MM.YYYY') not null,
        "RWDU" number(5,0) default 0 not null,
        "CREATED_BY" varchar2(20 char),
        "MODIFIED_BY" varchar2(20 char),
        "OWN_LIC" varchar2(4 char),
        "OPC" varchar2(8 char),
        "OWNER" number(5,0) default 0 not null,
        "GROUP" number(5,0) default 0 not null,
        "ANY" number(5,0) default 0 not null,
        "POSITION" number(5,0) default 0 not null,
        "OBJECT" varchar2(1000 char),
        "TYPE" number(10,0) default 0 not null
    );

    create table INTERFACE_PARAMETER (
        "UUID" raw(255) default SYS_GUID() not null,
        "CONFIG_ID" raw(255) default SYS_GUID() not null,
        "SOURCE" varchar2(16 char),
        "CREATED_ON" date default TO_DATE('01.01.1970','DD.MM.YYYY') not null,
        "MODIFIED_ON" date default TO_DATE('01.01.1970','DD.MM.YYYY') not null,
        "RWDU" number(5,0) default 0 not null,
        "CREATED_BY" varchar2(20 char),
        "MODIFIED_BY" varchar2(20 char),
        "OWN_LIC" varchar2(4 char),
        "OPC" varchar2(8 char),
        "OWNER" number(5,0) default 0 not null,
        "GROUP" number(5,0) default 0 not null,
        "ANY" number(5,0) default 0 not null,
        "NAME" varchar2(100 char),
        "VALUE" varchar2(1000 char)
    );

    create table MAPPING_PARAMETER (
        "UUID" raw(255) default SYS_GUID() not null,
        "MAPPING_ID" raw(255) default SYS_GUID() not null,
        "CREATED_ON" date default TO_DATE('01.01.1970','DD.MM.YYYY') not null,
        "MODIFIED_ON" date default TO_DATE('01.01.1970','DD.MM.YYYY') not null,
        "RWDU" number(5,0) default 0 not null,
        "CREATED_BY" varchar2(20 char),
        "MODIFIED_BY" varchar2(20 char),
        "OWN_LIC" varchar2(4 char),
        "OPC" varchar2(8 char),
        "OWNER" number(5,0) default 0 not null,
        "GROUP" number(5,0) default 0 not null,
        "ANY" number(5,0) default 0 not null,
        "NAME" varchar2(100 char),
        "VALUE" varchar2(1000 char)
    );

    create table MITARBEITER_POOL (
        "UUID" raw(255) default SYS_GUID() not null,
        "CONFIG_ID" raw(255) default SYS_GUID() not null,
        "CREATED_ON" date default TO_DATE('01.01.1970','DD.MM.YYYY') not null,
        "MODIFIED_ON" date default TO_DATE('01.01.1970','DD.MM.YYYY') not null,
        "RWDU" number(5,0) default 0 not null,
        "CREATED_BY" varchar2(20 char),
        "MODIFIED_BY" varchar2(20 char),
        "OWN_LIC" varchar2(4 char),
        "OPC" varchar2(8 char),
        "OWNER" number(5,0) default 0 not null,
        "GROUP" number(5,0) default 0 not null,
        "ANY" number(5,0) default 0 not null,
        "STATUS" number(5,0) default 0 not null,
        "TRANSFERRED_ON" varchar2(80 char),
        "CODE" varchar2(20 char),
        "NAME_COMPLETE" varchar2(200 char),
        "EMAIL" varchar2(80 char),
        "START_DATE" date default TO_DATE('01.01.1970','DD.MM.YYYY') not null,
        "END_DATE" date default TO_DATE('01.01.1970','DD.MM.YYYY') not null,
        "BIRTHDATE" date default TO_DATE('01.01.1970','DD.MM.YYYY') not null,
        "NAME" varchar2(80 char),
        "PRENAME" varchar2(80 char),
        "NATIVE_LANGUAGE" varchar2(6 char),
        "FOREIGN_LANGUAGE" varchar2(6 char),
        "GENDER" number(5,0) default 0 not null,
        "TITLE" varchar2(40 char),
        "CATEGORIE" varchar2(50 char),
        "PHONE1" varchar2(20 char),
        "PHONE2" varchar2(20 char),
        "PHONE3" varchar2(20 char),
        "FAX" varchar2(20 char),
        "STREET" varchar2(50 char),
        "POSTAL_CODE" varchar2(6 char),
        "CITY" varchar2(30 char),
        "COUNTRY" varchar2(6 char),
        "STARTUP_MODULE" varchar2(16 char),
        "CURRENCY" varchar2(4 char),
        "OS_LOGIN" varchar2(40 char),
        "OU_STRUCTURE_ACCESS" varchar2(16 char),
        "USERS_RES_RSC" varchar2(20 char),
        "LANGUAGE" varchar2(6 char),
        "SKIN_ID" varchar2(8 char),
        "OUTLOOK_PROF_NAME" varchar2(40 char),
        "OUTLOOK_PROF_PW" varchar2(20 char),
        "DAY_FORMAT" varchar2(8 char),
        "NUMBER_FORMAT" varchar2(8 char),
        "CURRENCY_FORMAT" varchar2(8 char),
        "CALENDAR" varchar2(20 char),
        "START_PERIOD" date default TO_DATE('01.01.1970','DD.MM.YYYY') not null,
        "END_PERIOD" date default TO_DATE('01.01.1970','DD.MM.YYYY') not null,
        "UNITS_DAY" number default 0 not null,
        "FACTOR_AMOUNT" number default 0 not null,
        "LEFT_ON" date default TO_DATE('01.01.1970','DD.MM.YYYY') not null,
        "DEF_MIN_LOAD" number default 0 not null,
        "AUT_REP_HRS_WORKED" number(5,0) default 0 not null,
        "LOAD_LIMIT" number(5,0) default 0 not null,
        "CALENDAR_IS_ACTIVE" number(5,0) default 0 not null,
        "SUM_OF_EFFORT" number(5,0) default 0 not null,
        "SUMMARIZE_PERIODS" number(5,0) default 0 not null,
        "TITLE2" varchar2(30 char),
        "RES_TO_BE_PLANED" number(5,0) default 0 not null,
        "SAP_COST_CENTER" varchar2(20 char),
        "SAP_POSTING_RANGE" varchar2(10 char),
        "RES_CLASS_1" varchar2(2 char),
        "RES_CLASS_2" varchar2(20 char),
        "OU_CCTR_ID" varchar2(8 char),
        "DEF_LOAD_PROFILE" varchar2(8 char),
        "DEF_MAX_LOAD" number default 0 not null,
        "RES_STRUCTURE_CODE" varchar2(20 char),
        "RESOURCE_TYPE" varchar2(2 char),
        "SHORT_LONG_TERM_PL" varchar2(2 char),
        "WITHOUT_COST_CALC" number(5,0) default 0 not null,
        "VAC_CREDIT_LAST_YR" number default 0 not null,
        "VAC_CREDIT_CURR_YR" number default 0 not null,
        "FLEXHRS_CRED_PR_YEAR" number default 0 not null,
        "CALC_BASIS_DATE" number default 0 not null,
        "POSITION" number default 0 not null,
        "PARENT_RES_ID" varchar2(20 char),
        "ANONYMIZE_TO" varchar2(20 char),
        "RHW_OVERLAP_COMPL_2" number(5,0) default 0 not null,
        "REP_TYPE" number(5,0) default 0 not null,
        "ADJUSTMENT_BY_EFFORT" number(5,0) default 0 not null,
        "DEF_COST_TYPE" varchar2(8 char),
        "CONVERSION_FACTOR_ID" varchar2(8 char),
        "CREATE_STAKEHOLDER" number(5,0) default 0 not null
    );
    
    alter table BELASTUNG_POOL 
        add constraint PID563DT563 primary key ("UUID");

    alter table INTERFACE_CONFIG 
        add constraint PID560DT560 primary key ("UUID");

    alter table INTERFACE_LOGGING 
        add constraint PID564DT564 primary key ("UUID");

    alter table INTERFACE_MAPPING 
        add constraint PID562DT562 primary key ("UUID");

    alter table INTERFACE_PARAMETER 
        add constraint PID561DT561 primary key ("UUID");

    alter table MAPPING_PARAMETER 
        add constraint PID565DT565 primary key ("UUID");

    alter table MITARBEITER_POOL 
        add constraint PID566DT566 primary key ("UUID");

    alter table BELASTUNG_POOL 
        add constraint SBELASTUNG_POOLID560 
        foreign key ("CONFIG_ID") 
        references INTERFACE_CONFIG        
        on delete cascade;

    alter table INTERFACE_CONFIG 
        add constraint SINTERFACE_CONFIGID405C 
        foreign key ("POOL_MODULE") 
        references DT405        
        on delete cascade;

    alter table INTERFACE_CONFIG 
        add constraint SINTERFACE_CONFIGID405B 
        foreign key ("TARGET_MODULE") 
        references DT405        
        on delete cascade;

    alter table INTERFACE_CONFIG 
        add constraint SINTERFACE_CONFIGID405A 
        foreign key ("SOURCE_MODULE") 
        references DT405        
        on delete cascade;

    alter table INTERFACE_LOGGING 
        add constraint SINTERFACE_LOGGINGID560 
        foreign key ("CONFIG_ID") 
        references INTERFACE_CONFIG        
        on delete cascade;

    alter table INTERFACE_MAPPING 
        add constraint SINTERFACE_MAPPINGID560 
        foreign key ("CONFIG_ID") 
        references INTERFACE_CONFIG        
        on delete cascade;
        
    alter table INTERFACE_PARAMETER 
        add constraint SINTERFACE_PARAMETERID560 
        foreign key ("CONFIG_ID") 
        references INTERFACE_CONFIG        
        on delete cascade;

    alter table MAPPING_PARAMETER 
        add constraint SMAPPING_PARAMETERID562 
        foreign key ("MAPPING_ID") 
        references INTERFACE_MAPPING        
        on delete cascade;

    alter table MITARBEITER_POOL 
        add constraint SMITARBEITER_POOLID560 
        foreign key ("CONFIG_ID") 
        references INTERFACE_CONFIG        
        on delete cascade;
    
    