
    create table SYSTEM (
        "UUID" raw(16) default SYS_GUID() not null,
        "CREATED_ON" date default TO_DATE('01.01.1970','DD.MM.YYYY'),
        "MODIFIED_ON" date default TO_DATE('01.01.1970','DD.MM.YYYY'),
        "RWDU" number(5,0) default 0,
        "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,
        "GROUP" number(5,0) default 0,
        "ANY" number(5,0) default 0,
        "SYSTEM_TYPE" number(10,0) default 0,
        "POSITION" number(10,0) default 0
    );

    alter table SYSTEM 
        add constraint PIDSYSTEM primary key ("UUID");

    alter table SYSTEM 
        add constraint DT568UUID_NOT_NULL check(UUID is not null);

    create table SYSTEMCOND (
        "UUID" raw(16) default SYS_GUID() not null,
        "SYSTEM" raw(16) not null,
        "CREATED_ON" date default TO_DATE('01.01.1970','DD.MM.YYYY'),
        "MODIFIED_ON" date default TO_DATE('01.01.1970','DD.MM.YYYY'),
        "RWDU" number(5,0) default 0,
        "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,
        "GROUP" number(5,0) default 0,
        "ANY" number(5,0) default 0,
        "CHECK_CLASS" varchar2(100 char),
        "PARAMETER" varchar2(100 char),
        "EXPECTED_VALUE" number(5,0) default 0
    );

    alter table SYSTEMCOND 
        add constraint PIDSYSTEMCOND primary key ("UUID");

    alter table SYSTEMCOND 
        add constraint DT569UUID_NOT_NULL check("UUID" is not null);

    alter table SYSTEMCOND 
        add constraint DT569SYSTEM_NOT_NULL check("SYSTEM" is not null);

    alter table SYSTEMCOND 
        add constraint FKSYSTEMCONDID568 
        foreign key ("SYSTEM") 
        references "SYSTEM"        
        on delete cascade
        deferrable;

alter table INTERFACE_PARAMETER add "SYSTEM" raw(16);