-- eseguire come utente DBCGO
CREATE TABLE DBCGO_DONOR_PP
(
  ID_RICHIESTA                VARCHAR2(23 BYTE),
  MSISDN                      VARCHAR2(15 BYTE),
  CODICE_OPERATORE_DONATING   VARCHAR2(4 BYTE),
  CODICE_OPERATORE_RECIPIENT  VARCHAR2(4 BYTE),
  DATA_TRANSIZIONE_STATO      DATE,
  STATO                       NUMBER(2)
)
TABLESPACE DBCGO_DATA_BIG
PCTUSED    40
PCTFREE    10
INITRANS   1
MAXTRANS   255
STORAGE    (
            INITIAL          256M
            NEXT             10M
            MINEXTENTS       1
            MAXEXTENTS       UNLIMITED
            PCTINCREASE      0
            FREELISTS        1
            FREELIST GROUPS  1
            BUFFER_POOL      DEFAULT
           )
LOGGING 
NOCACHE
NOPARALLEL
NOMONITORING;
CREATE INDEX IDX00_DBCGO_DONOR_PP ON DBCGO_DONOR_PP
(STATO)
NOLOGGING
TABLESPACE DBCGO_IDX_BIG
PCTFREE    10
INITRANS   2
MAXTRANS   255
STORAGE    (
            INITIAL          32M
            NEXT             10M
            MINEXTENTS       1
            MAXEXTENTS       UNLIMITED
            PCTINCREASE      0
            FREELISTS        1
            FREELIST GROUPS  1
            BUFFER_POOL      DEFAULT
           )
NOPARALLEL;
CREATE UNIQUE INDEX PK_DBCGO_DONOR_PP ON DBCGO_DONOR_PP
(ID_RICHIESTA)
NOLOGGING
TABLESPACE DBCGO_IDX_BIG
PCTFREE    10
INITRANS   2
MAXTRANS   255
STORAGE    (
            INITIAL          32M
            NEXT             10M
            MINEXTENTS       1
            MAXEXTENTS       UNLIMITED
            PCTINCREASE      0
            FREELISTS        1
            FREELIST GROUPS  1
            BUFFER_POOL      DEFAULT
           )
NOPARALLEL;
ALTER TABLE DBCGO_DONOR_PP ADD (
  CONSTRAINT PK_DBCGO_DONOR_PP
 PRIMARY KEY
 (ID_RICHIESTA)
    USING INDEX 
    TABLESPACE DBCGO_IDX_BIG
    PCTFREE    10
    INITRANS   2
    MAXTRANS   255
    STORAGE    (
                INITIAL          32M
                NEXT             10M
                MINEXTENTS       1
                MAXEXTENTS       UNLIMITED
                PCTINCREASE      0
                FREELISTS        1
                FREELIST GROUPS  1
               ));
CREATE TABLE DBCGO_RECIPIENT_PP
(
  ID_RICHIESTA                VARCHAR2(23 BYTE),
  MSISDN                      VARCHAR2(15 BYTE),
  CODICE_OPERATORE_DONATING   VARCHAR2(4 BYTE),
  CODICE_OPERATORE_RECIPIENT  VARCHAR2(4 BYTE),
  DATA_TRANSIZIONE_STATO      DATE,
  STATO                       NUMBER(2)
)
TABLESPACE DBCGO_DATA_BIG
PCTUSED    40
PCTFREE    10
INITRANS   1
MAXTRANS   255
STORAGE    (
            INITIAL          256M
            NEXT             10M
            MINEXTENTS       1
            MAXEXTENTS       UNLIMITED
            PCTINCREASE      0
            FREELISTS        1
            FREELIST GROUPS  1
            BUFFER_POOL      DEFAULT
           )
LOGGING 
NOCACHE
NOPARALLEL
NOMONITORING;
CREATE INDEX IDX00_DBCGO_RECIPIENT_PP ON DBCGO_RECIPIENT_PP
(STATO)
NOLOGGING
TABLESPACE DBCGO_IDX_BIG
PCTFREE    10
INITRANS   2
MAXTRANS   255
STORAGE    (
            INITIAL          32M
            NEXT             10M
            MINEXTENTS       1
            MAXEXTENTS       UNLIMITED
            PCTINCREASE      0
            FREELISTS        1
            FREELIST GROUPS  1
            BUFFER_POOL      DEFAULT
           )
NOPARALLEL;
CREATE UNIQUE INDEX PK_DBCGO_RECIPIENT_PP ON DBCGO_RECIPIENT_PP
(ID_RICHIESTA)
NOLOGGING
TABLESPACE DBCGO_IDX_BIG
PCTFREE    10
INITRANS   2
MAXTRANS   255
STORAGE    (
            INITIAL          32M
            NEXT             10M
            MINEXTENTS       1
            MAXEXTENTS       UNLIMITED
            PCTINCREASE      0
            FREELISTS        1
            FREELIST GROUPS  1
            BUFFER_POOL      DEFAULT
           )
NOPARALLEL;
ALTER TABLE DBCGO_RECIPIENT_PP ADD (
  CONSTRAINT PK_DBCGO_RECIPIENT_PP
 PRIMARY KEY
 (ID_RICHIESTA)
    USING INDEX 
    TABLESPACE DBCGO_IDX_BIG
    PCTFREE    10
    INITRANS   2
    MAXTRANS   255
    STORAGE    (
                INITIAL          32M
                NEXT             10M
                MINEXTENTS       1
                MAXEXTENTS       UNLIMITED
                PCTINCREASE      0
                FREELISTS        1
                FREELIST GROUPS  1
               ));
CREATE TABLE DBCGO_PORTING_PP
(
  ID_RICHIESTA                VARCHAR2(23 BYTE),
  MSISDN                      VARCHAR2(15 BYTE),
  CODICE_OPERATORE_DONATING   VARCHAR2(4 BYTE),
  CODICE_OPERATORE_RECIPIENT  VARCHAR2(4 BYTE),
  DATA_TRANSIZIONE_STATO      DATE,
  STATO                       NUMBER(2)
)
TABLESPACE DBCGO_DATA_BIG
PCTUSED    40
PCTFREE    10
INITRANS   1
MAXTRANS   255
STORAGE    (
            INITIAL          256M
            NEXT             10M
            MINEXTENTS       1
            MAXEXTENTS       UNLIMITED
            PCTINCREASE      0
            FREELISTS        1
            FREELIST GROUPS  1
            BUFFER_POOL      DEFAULT
           )
LOGGING 
NOCACHE
NOPARALLEL
NOMONITORING;
CREATE INDEX IDX00_DBCGO_PORTING_PP ON DBCGO_PORTING_PP
(STATO)
NOLOGGING
TABLESPACE DBCGO_IDX_BIG
PCTFREE    10
INITRANS   2
MAXTRANS   255
STORAGE    (
            INITIAL          32M
            NEXT             10M
            MINEXTENTS       1
            MAXEXTENTS       UNLIMITED
            PCTINCREASE      0
            FREELISTS        1
            FREELIST GROUPS  1
            BUFFER_POOL      DEFAULT
           )
NOPARALLEL;
CREATE UNIQUE INDEX PK_DBCGO_PORTING_PP ON DBCGO_PORTING_PP
(ID_RICHIESTA)
NOLOGGING
TABLESPACE DBCGO_IDX_BIG
PCTFREE    10
INITRANS   2
MAXTRANS   255
STORAGE    (
            INITIAL          32M
            NEXT             10M
            MINEXTENTS       1
            MAXEXTENTS       UNLIMITED
            PCTINCREASE      0
            FREELISTS        1
            FREELIST GROUPS  1
            BUFFER_POOL      DEFAULT
           )
NOPARALLEL;
ALTER TABLE DBCGO_PORTING_PP ADD (
  CONSTRAINT PK_DBCGO_PORTING_PP
 PRIMARY KEY
 (ID_RICHIESTA)
    USING INDEX 
    TABLESPACE DBCGO_IDX_BIG
    PCTFREE    10
    INITRANS   2
    MAXTRANS   255
    STORAGE    (
                INITIAL          32M
                NEXT             10M
                MINEXTENTS       1
                MAXEXTENTS       UNLIMITED
                PCTINCREASE      0
                FREELISTS        1
                FREELIST GROUPS  1
               ));        