CREATE TABLE LEADER_STATUS_TABLE (
    GROUP_ID VARCHAR2(512) NOT NULL,
    NODE_ID VARCHAR2(512) NOT NULL,
    LAST_HEARTBEAT NUMBER NOT NULL,
    PRIMARY KEY (GROUP_ID)
);

CREATE TABLE CLUSTER_NODE_STATUS_TABLE (
    GROUP_ID VARCHAR2(512) NOT NULL,
    NODE_ID VARCHAR2(512) NOT NULL,
    IS_NEW_NODE INT NOT NULL,
    LAST_HEARTBEAT NUMBER NOT NULL,
    PRIMARY KEY (GROUP_ID,NODE_ID)
);

CREATE TABLE  MEMBERSHIP_EVENT_TABLE (
  GROUP_ID VARCHAR (512) NOT NULL,
  NODE_ID VARCHAR (512) NOT NULL,
  CHANGE_TYPE INT NOT NULL,
  CHANGED_MEMBER_ID VARCHAR (512) NOT NULL
);

CREATE TABLE  REMOVED_MEMBERS_TABLE (
  GROUP_ID VARCHAR (512) NOT NULL,
  NODE_ID VARCHAR (512) NOT NULL,
  REMOVED_MEMBER_ID VARCHAR (512) NOT NULL
);

CREATE TABLE  COORDINATED_TASK_TABLE (
  TASK_NAME VARCHAR (512) NOT NULL,
  DESTINED_NODE_ID VARCHAR (512),
  TASK_STATE VARCHAR (32),
  PRIMARY KEY (TASK_NAME)
);
