CREATE SCHEMA PUBLIC AUTHORIZATION DBA
CREATE MEMORY TABLE TIPOMATERIAL(PKTIPOMATERIAL INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 0) NOT NULL PRIMARY KEY,TIPO VARCHAR(256) NOT NULL)
CREATE MEMORY TABLE MATERIAL(PKMATERIAL INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 0) NOT NULL PRIMARY KEY,FKTIPOMATERIAL INTEGER NOT NULL,NOME VARCHAR(1204),TRATAMENTO VARCHAR(1204),MODULOELASTICIDADE VARCHAR(256),POISSON VARCHAR(256),DUREZANUCLEO VARCHAR(256),TENSAOESCOAMENTO VARCHAR(256),TENSAOADMISSIVELFLEXAO VARCHAR(256),TENSAOADMISSIVELCONTATO VARCHAR(256),CONSTRAINT SYS_FK_55 FOREIGN KEY(FKTIPOMATERIAL) REFERENCES TIPOMATERIAL(PKTIPOMATERIAL) ON DELETE CASCADE ON UPDATE CASCADE)
CREATE MEMORY TABLE FATORSERVICO(PKFATORSERVICO INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 0) NOT NULL PRIMARY KEY,NOMECARGA VARCHAR(256) NOT NULL,VALUE1 DOUBLE NOT NULL,VALUE2 DOUBLE NOT NULL,VALUE3 DOUBLE NOT NULL)
ALTER TABLE TIPOMATERIAL ALTER COLUMN PKTIPOMATERIAL RESTART WITH 5
ALTER TABLE MATERIAL ALTER COLUMN PKMATERIAL RESTART WITH 46
ALTER TABLE FATORSERVICO ALTER COLUMN PKFATORSERVICO RESTART WITH 3
CREATE USER SA PASSWORD ""
GRANT DBA TO SA
SET WRITE_DELAY 10
SET SCHEMA PUBLIC
INSERT INTO TIPOMATERIAL VALUES(0,'A\u00e7o')
INSERT INTO TIPOMATERIAL VALUES(1,'Bronze')
INSERT INTO TIPOMATERIAL VALUES(2,'Ferros Fundidos Cinzentos')
INSERT INTO TIPOMATERIAL VALUES(3,'Ferros Fundidos Nodulares')
INSERT INTO TIPOMATERIAL VALUES(4,'Ferros Fundidos Vermiculares')
INSERT INTO MATERIAL VALUES(0,0,'1020','Sem tratamento','205E3','0.29','140','330','155','430')
INSERT INTO MATERIAL VALUES(1,0,'1035','Sem tratamento','205E3','0.29','180','370','185','480')
INSERT INTO MATERIAL VALUES(2,0,'1040','Sem tratamento','205E3','0.29','190','415','195','490')
INSERT INTO MATERIAL VALUES(3,0,'1045','Sem tratamento','205E3','0.29','200','460','200','505')
INSERT INTO MATERIAL VALUES(4,0,'1050','Sem tratamento','205E3','0.29','230','475','210','540')
INSERT INTO MATERIAL VALUES(5,0,'1060','Sem tratamento','205E3','0.29','200','550','215','560')
INSERT INTO MATERIAL VALUES(6,0,'1035','T\u00eampera em \u00f3leo e Revenimento','205E3','0.29','200','550','215','560')
INSERT INTO MATERIAL VALUES(7,0,'1040','T\u00eampera em \u00f3leo e Revenimento','205E3','0.29','210','562','225','574')
INSERT INTO MATERIAL VALUES(8,0,'1045','T\u00eampera em \u00f3leo e Revenimento','205E3','0.29','230','570','235','600')
INSERT INTO MATERIAL VALUES(9,0,'1050','T\u00eampera em \u00f3leo e Revenimento','205E3','0.29','250','585','245','625')
INSERT INTO MATERIAL VALUES(10,0,'1060','T\u00eampera em \u00f3leo e Revenimento','205E3','0.29','280','617','255','672')
INSERT INTO MATERIAL VALUES(11,0,'1040','T\u00eampera por indu\u00e7\u00e3o e Revenimento','205E3','0.29','200','560','236','1010')
INSERT INTO MATERIAL VALUES(12,0,'1045','T\u00eampera por indu\u00e7\u00e3o e Revenimento','205E3','0.29','210','572','240','1028')
INSERT INTO MATERIAL VALUES(13,0,'1050','T\u00eampera por indu\u00e7\u00e3o e Revenimento','205E3','0.29','230','590','245','1048')
INSERT INTO MATERIAL VALUES(14,0,'1060','T\u00eampera por indu\u00e7\u00e3o e Revenimento','205E3','0.29','240','600','253','1075')
INSERT INTO MATERIAL VALUES(15,0,'1020','T\u00eampera em \u00f3leo, revenimento e cementa\u00e7\u00e3o','205E3','0.29','160','480','192','1180')
INSERT INTO MATERIAL VALUES(16,0,'1340','T\u00eampera em \u00f3leo e Revenimento','205E3','0.29','250','580','280','730')
INSERT INTO MATERIAL VALUES(17,0,'4130','T\u00eampera em \u00f3leo e Revenimento','205E3','0.29','270','730','315','775')
INSERT INTO MATERIAL VALUES(18,0,'4140','T\u00eampera em \u00f3leo e Revenimento','205E3','0.29','300','800','335','810')
INSERT INTO MATERIAL VALUES(19,0,'4320','T\u00eampera em \u00f3leo e Revenimento','205E3','0.29','320','845','360','840')
INSERT INTO MATERIAL VALUES(20,0,'4340','T\u00eampera em \u00f3leo e Revenimento','205E3','0.29','350','910','385','880')
INSERT INTO MATERIAL VALUES(21,0,'1340','T\u00eampera por indu\u00e7\u00e3o e Revenimento','205E3','0.29','260','550','295','1100')
INSERT INTO MATERIAL VALUES(22,0,'4130','T\u00eampera por indu\u00e7\u00e3o e Revenimento','205E3','0.29','270','700','305','1130')
INSERT INTO MATERIAL VALUES(23,0,'4140','T\u00eampera por indu\u00e7\u00e3o e Revenimento','205E3','0.29','280','780','313','1170')
INSERT INTO MATERIAL VALUES(24,0,'4320','T\u00eampera por indu\u00e7\u00e3o e Revenimento','205E3','0.29','290','810','320','1190')
INSERT INTO MATERIAL VALUES(25,0,'4340','T\u00eampera por indu\u00e7\u00e3o e Revenimento','205E3','0.29','310','880','345','1220')
INSERT INTO MATERIAL VALUES(26,0,'4120','T\u00eampera em \u00f3leo, revenimento e cementa\u00e7\u00e3o','205E3','0.29','280','1100','430','1350')
INSERT INTO MATERIAL VALUES(27,0,'4320','T\u00eampera em \u00f3leo, revenimento e cementa\u00e7\u00e3o','205E3','0.29','340','1180','480','1470')
INSERT INTO MATERIAL VALUES(28,0,'8620','T\u00eampera em \u00f3leo, revenimento e cementa\u00e7\u00e3o','205E3','0.29','360','1250','505','1580')
INSERT INTO MATERIAL VALUES(29,0,'4320','T\u00eampera em \u00f3leo, revenimento e nitreta\u00e7\u00e3o','205E3','0.29','280','850','370','980')
INSERT INTO MATERIAL VALUES(30,0,'4340','T\u00eampera em \u00f3leo, revenimento e nitreta\u00e7\u00e3o','205E3','0.29','320','950','410','1100')
INSERT INTO MATERIAL VALUES(31,0,'Nitralloy','T\u00eampera em \u00f3leo, revenimento e nitreta\u00e7\u00e3o','205E3','0.29','260','800','370','1200')
INSERT INTO MATERIAL VALUES(32,1,'Liga 2C','Fundido em areia','110E3','0.31','60','125','40','205')
INSERT INTO MATERIAL VALUES(33,1,'B-148 Liga','Tratado termicamente','115E3','0.31','105','225','162','445')
INSERT INTO MATERIAL VALUES(34,2,'A48 Classe 20','Sem tratamento','75E3','0.29','156','152','35','380')
INSERT INTO MATERIAL VALUES(35,2,'A48 Classe 30','Sem tratamento','100E3','0.29','210','214','60','480')
INSERT INTO MATERIAL VALUES(36,2,'A48 Classe 40','Sem tratamento','120E3','0.29','235','293','90','550')
INSERT INTO MATERIAL VALUES(37,3,'A536 60-40-18','Recozido','80E3','0.29','160','276','180','560')
INSERT INTO MATERIAL VALUES(38,3,'A536 80-55-06','Temperado em \u00f3leo e Revenimento','80E3','0.29','180','379','190','570')
INSERT INTO MATERIAL VALUES(39,3,'A536 100-70-03','Temperado em \u00f3leo e Revenimento','90E3','0.29','230','483','220','690')
INSERT INTO MATERIAL VALUES(40,3,'A536 120-90-02','Temperado em \u00f3leo e Revenimento','90E3','0.29','260','621','240','760')
INSERT INTO MATERIAL VALUES(41,4,'45007','Sem tratamento','90E3','0.29','165','310','70','500')
INSERT INTO MATERIAL VALUES(42,4,'50005','Sem tratamento','90E3','0.29','180','345','90','540')
INSERT INTO MATERIAL VALUES(43,4,'53007','Sem tratamento','90E3','0.29','195','365','110','570')
INSERT INTO MATERIAL VALUES(44,4,'80002','Sem tratamento','95E3','0.29','240','552','145','645')
INSERT INTO FATORSERVICO VALUES(0,'carga uniforme',1.0E0,1.25E0,1.75E0)
INSERT INTO FATORSERVICO VALUES(1,'carga impactos leves',1.25E0,1.5E0,2.0E0)
INSERT INTO FATORSERVICO VALUES(2,'carga medio impacto',1.5E0,1.75E0,2.25E0)
