text: CREATE TABLE R_OFFENCE
  (
  	OFFENCE_ID NUMBER NOT NULL
  		CONSTRAINT XPKR_OFFENCE
  			PRIMARY KEY,
  	CODE CHAR(5) NOT NULL,
  	DESCRIPTION VARCHAR2(300) NOT NULL,
  	ABBREVIATION VARCHAR2(50),
  	MAIN_CATEGORY_CODE CHAR(3) NOT NULL,
  	SELECTABLE CHAR NOT NULL
  		CONSTRAINT YES_OR_NO12
  			CHECK (SELECTABLE IN ('N','Y')),
  	MAIN_CATEGORY_DESCRIPTION VARCHAR2(200) NOT NULL,
  	ROW_VERSION NUMBER DEFAULT 0 NOT NULL,
  	MAIN_CATEGORY_ABBREVIATION VARCHAR2(50) NOT NULL,
  	OGRS_OFFENCE_CATEGORY_ID NUMBER NOT NULL
  		REFERENCES R_STANDARD_REFERENCE_LIST,
  	SUB_CATEGORY_CODE CHAR(2) NOT NULL,
  	SUB_CATEGORY_DESCRIPTION VARCHAR2(200) NOT NULL,
  	FORM_20_CODE VARCHAR2(50),
  	SUB_CATEGORY_ABBREVIATION VARCHAR2(50),
  	TRAINING_SESSION_ID NUMBER,
  	CJIT_CODE VARCHAR2(6),
  	CREATED_BY_USER_ID NUMBER(22) NOT NULL,
  	CREATED_DATETIME DATE NOT NULL,
  	LAST_UPDATED_USER_ID NUMBER(22) NOT NULL,
  	LAST_UPDATED_DATETIME DATE NOT NULL,
  	CONSTRAINT XAK1R_OFFENCE
  		UNIQUE (CODE, TRAINING_SESSION_ID, OFFENCE_ID)
  );
  
  CREATE TABLE MAIN_OFFENCE
  (
  	MAIN_OFFENCE_ID NUMBER NOT NULL
  		CONSTRAINT XPKMAIN_OFFENCE
  			PRIMARY KEY,
  	OFFENCE_DATE DATE NOT NULL,
  	OFFENCE_COUNT NUMBER NOT NULL
  		CONSTRAINT GREATER_THAN_07
  			CHECK (OFFENCE_COUNT > 0),
  	EVENT_ID NUMBER NOT NULL
  		REFERENCES EVENT,
  	TICS NUMBER,
  	VERDICT VARCHAR2(1)
  		CONSTRAINT VERDICT
  			CHECK (VERDICT IN ('G', 'N', 'M')),
  	SOFT_DELETED NUMBER NOT NULL
  		CONSTRAINT TRUE_OR_FALSE57
  			CHECK (SOFT_DELETED IN (0, 1)),
  	PARTITION_AREA_ID NUMBER NOT NULL
  		REFERENCES PARTITION_AREA,
  	ROW_VERSION NUMBER DEFAULT 0 NOT NULL,
  	OFFENCE_ID NUMBER NOT NULL
  		REFERENCES R_OFFENCE,
  	TRAINING_SESSION_ID NUMBER,
  	OFFENDER_ID NUMBER NOT NULL
  		REFERENCES OFFENDER,
  	ORGANISATIONS T_ARR_ORGANISATIONS,
  	CREATED_BY_USER_ID NUMBER(22) NOT NULL,
  	CREATED_DATETIME DATE NOT NULL,
  	LAST_UPDATED_USER_ID NUMBER(22) NOT NULL,
  	LAST_UPDATED_DATETIME DATE NOT NULL,
  	CONSTRAINT XAK1MAIN_OFFENCE
  		UNIQUE (EVENT_ID, OFFENCE_ID, OFFENCE_DATE, MAIN_OFFENCE_ID)
  );
  
  create table ADDITIONAL_OFFENCE
  (
  	ADDITIONAL_OFFENCE_ID NUMBER not null
  		constraint XPKADDITIONAL_OFFENCE
  			primary key,
  	OFFENCE_DATE DATE,
  	OFFENCE_COUNT NUMBER,
  	EVENT_ID NUMBER not null
  		references EVENT,
  	SOFT_DELETED NUMBER not null
  		constraint TRUE_OR_FALSE37
  			check (SOFT_DELETED IN (0, 1)),
  	PARTITION_AREA_ID NUMBER not null
  		references PARTITION_AREA,
  	ROW_VERSION NUMBER default 0 not null,
  	CREATED_BY_USER_ID NUMBER not null,
  	CREATED_DATETIME DATE not null,
  	LAST_UPDATED_USER_ID NUMBER not null,
  	LAST_UPDATED_DATETIME DATE not null,
  	OFFENCE_ID NUMBER not null
  		references R_OFFENCE,
  	TRAINING_SESSION_ID NUMBER,
  	constraint XAK1ADDITIONAL_OFFENCE
  		unique (EVENT_ID, OFFENCE_ID, OFFENCE_DATE, ADDITIONAL_OFFENCE_ID)
  );
  