CREATE SCHEMA PUBLIC AUTHORIZATION DBA
CREATE MEMORY TABLE CONTACT(ID INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,NAME VARCHAR(75),EMAIL VARCHAR(75),PHONE VARCHAR(75))
CREATE MEMORY TABLE CONTACTTOCONTACTJOINTABLE(PARENTCONTACTID INTEGER NOT NULL,CHILDCONTACTID INTEGER NOT NULL,PRIMARY KEY(PARENTCONTACTID,CHILDCONTACTID),CONSTRAINT SYS_FK_48 FOREIGN KEY(PARENTCONTACTID) REFERENCES CONTACT(ID),CONSTRAINT SYS_FK_49 FOREIGN KEY(CHILDCONTACTID) REFERENCES CONTACT(ID))
ALTER TABLE CONTACT ALTER COLUMN ID RESTART WITH 4
CREATE USER SA PASSWORD ""
GRANT DBA TO SA
SET WRITE_DELAY 10
SET SCHEMA PUBLIC
INSERT INTO CONTACT VALUES(1,'olivier','olivier@yahoo.com','16506193726')
INSERT INTO CONTACT VALUES(2,'angela','angela@yahoo.com','4312432432432')
INSERT INTO CONTACT VALUES(3,'john','john@yahoo.com','432432432432')
INSERT INTO CONTACTTOCONTACTJOINTABLE VALUES(1,2)
INSERT INTO CONTACTTOCONTACTJOINTABLE VALUES(2,1)
INSERT INTO CONTACTTOCONTACTJOINTABLE VALUES(2,3)
INSERT INTO CONTACTTOCONTACTJOINTABLE VALUES(3,2)
