CREATE TABLE COLLECTIONS
(
  COLID Integer NOT NULL,
  NAME Varchar(50),
  PARTNAME Varchar(25),
  TRACKING_ORNO Varchar(25),
  AMOUNTPAID Float,
  ISSUEDBY Varchar(50),
  ISSUEDDATE Date,
  P_NUM Integer,
  UI_ID Integer,
  PRIMARY KEY (COLID)
);

ALTER TABLE COLLECTIONS ADD
  FOREIGN KEY (P_NUM) REFERENCES PARTICULARS (P_NUM) ON UPDATE CASCADE ON DELETE CASCADE;
ALTER TABLE COLLECTIONS ADD
  FOREIGN KEY (UI_ID) REFERENCES USERS (UI_ID) ON UPDATE CASCADE ON DELETE CASCADE;
GRANT DELETE, INSERT, REFERENCES, SELECT, UPDATE
 ON COLLECTIONS TO  SYSDBA WITH GRANT OPTION;

