· 6 years ago · Jun 10, 2019, 12:08 AM
1██████╗ ███████╗███╗ ███╗ ██████╗ ███╗ ██╗███████╗ █████╗ ██████╗
2██╔══██╗██╔════╝████╗ ████║██╔═══██╗████╗ ██║██╔════╝██╔══██╗██╔══██╗
3██║ ██║█████╗ ██╔████╔██║██║ ██║██╔██╗ ██║███████╗███████║██║ ██║
4██║ ██║██╔══╝ ██║╚██╔╝██║██║ ██║██║╚██╗██║╚════██║██╔══██║██║ ██║
5██████╔╝███████╗██║ ╚═╝ ██║╚██████╔╝██║ ╚████║███████║██║ ██║██████╔╝
6╚═════╝ ╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══╝╚══════╝╚═╝ ╚═╝╚═════╝
7
8
9███╗ ██╗███████╗██╗ ██╗███████╗███████╗ ██████╗
10████╗ ██║██╔════╝██║ ██║██╔════╝██╔════╝██╔════╝
11██╔██╗ ██║█████╗ ██║ █╗ ██║███████╗█████╗ ██║
12██║╚██╗██║██╔══╝ ██║███╗██║╚════██║██╔══╝ ██║
13██║ ╚████║███████╗╚███╔███╔╝███████║███████╗╚██████╗
14╚═╝ ╚═══╝╚══════╝ ╚══╝╚══╝ ╚══════╝╚══════╝ ╚═════╝
15
16-------------------------------------------------------------------------------------------------
17
18I am DemonSad <3
19
20Target : https://www.ans.gov.br/ ( Agência Nacional Da Saúde Suplementar )
21
22Greetings: TioSan, Angel, Cloudmore, NedLock
23
24-- ------------------------------------------------------------------------------------------------
25"A CADA PASSO UMA POLÊMICA"
26---------------------------------------------------------------------------------------------------
27
28/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
29/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
30/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
31/*!40101 SET NAMES utf8 */;
32
33/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
34/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
35/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
36
37
38--
39-- Create schema pes06_2_1
40--
41
42CREATE DATABASE IF NOT EXISTS pes06_2_1;
43USE pes06_2_1;
44
45--
46-- Definition of table `algoritmo`
47--
48CREATE TABLE `algoritmo` (
49 `id_variavel` int(11) NOT NULL auto_increment,
50 `nome` varchar(250) NOT NULL default '',
51 `id_projeto` varchar(100) NOT NULL default '',
52 `valor` varchar(250) NOT NULL default '',
53 PRIMARY KEY (`id_variavel`),
54 UNIQUE KEY `nome` (`nome`,`id_projeto`)
55) ENGINE=MyISAM DEFAULT CHARSET=latin1;
56
57--
58-- Dumping data for table `algoritmo`
59--
60
61/*!40000 ALTER TABLE `algoritmo` DISABLE KEYS */;
62/*!40000 ALTER TABLE `algoritmo` ENABLE KEYS */;
63
64
65--
66-- Definition of table `axioma`
67--
68CREATE TABLE `axioma` (
69 `id_axioma` int(11) NOT NULL auto_increment,
70 `axioma` varchar(250) NOT NULL default '',
71 `id_projeto` int(11) default '30',
72 PRIMARY KEY (`id_axioma`),
73 UNIQUE KEY `axioma` (`axioma`,`id_projeto`)
74) ENGINE=MyISAM DEFAULT CHARSET=latin1;
75
76--
77-- Dumping data for table `axioma`
78--
79
80/*!40000 ALTER TABLE `axioma` DISABLE KEYS */;
81/*!40000 ALTER TABLE `axioma` ENABLE KEYS */;
82
83
84--
85-- Definition of table `cenario`
86--
87CREATE TABLE `cenario` (
88 `id_cenario` int(11) NOT NULL auto_increment,
89 `id_projeto` int(11) NOT NULL default '0',
90 `data` date NOT NULL default '0000-00-00',
91 `titulo` varchar(255) NOT NULL default '',
92 `objetivo` text NOT NULL,
93 `contexto` text NOT NULL,
94 `atores` text NOT NULL,
95 `recursos` text NOT NULL,
96 `episodios` text NOT NULL,
97 `excecao` text,
98 PRIMARY KEY (`id_cenario`,`data`),
99 UNIQUE KEY `IDX_cenario_2` (`id_projeto`,`titulo`)
100) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
101
102--
103-- Dumping data for table `cenario`
104--
105
106/*!40000 ALTER TABLE `cenario` DISABLE KEYS */;
107INSERT INTO `cenario` (`id_cenario`,`id_projeto`,`data`,`titulo`,`objetivo`,`contexto`,`atores`,`recursos`,`episodios`,`excecao`) VALUES
108 (1,6,'0000-00-00','teste','teste','teste','teste\r\npessoa\r\nestudante','teste\r\ndindin\r\nnada','pessoa\r\ndindin','teste');
109/*!40000 ALTER TABLE `cenario` ENABLE KEYS */;
110
111
112--
113-- Definition of table `centocen`
114--
115CREATE TABLE `centocen` (
116 `id_cenario_from` int(11) NOT NULL default '0',
117 `id_cenario_to` int(11) NOT NULL default '0',
118 PRIMARY KEY (`id_cenario_from`,`id_cenario_to`)
119) ENGINE=MyISAM DEFAULT CHARSET=latin1;
120
121--
122-- Dumping data for table `centocen`
123--
124
125/*!40000 ALTER TABLE `centocen` DISABLE KEYS */;
126/*!40000 ALTER TABLE `centocen` ENABLE KEYS */;
127
128
129--
130-- Definition of table `centolex`
131--
132CREATE TABLE `centolex` (
133 `id_cenario` int(11) NOT NULL default '0',
134 `id_lexico` int(11) NOT NULL default '0',
135 PRIMARY KEY (`id_cenario`,`id_lexico`)
136) ENGINE=MyISAM DEFAULT CHARSET=latin1;
137
138--
139-- Dumping data for table `centolex`
140--
141
142/*!40000 ALTER TABLE `centolex` DISABLE KEYS */;
143/*!40000 ALTER TABLE `centolex` ENABLE KEYS */;
144
145
146--
147-- Definition of table `conceito`
148--
149CREATE TABLE `conceito` (
150 `id_conceito` int(11) NOT NULL auto_increment,
151 `nome` varchar(250) NOT NULL default '',
152 `descricao` varchar(250) NOT NULL default '',
153 `namespace` varchar(250) default NULL,
154 `id_projeto` int(11) NOT NULL default '30',
155 PRIMARY KEY (`id_conceito`),
156 UNIQUE KEY `nome` (`nome`,`id_projeto`)
157) ENGINE=MyISAM DEFAULT CHARSET=latin1;
158
159--
160-- Dumping data for table `conceito`
161--
162
163/*!40000 ALTER TABLE `conceito` DISABLE KEYS */;
164/*!40000 ALTER TABLE `conceito` ENABLE KEYS */;
165
166
167--
168-- Definition of table `hierarquia`
169--
170CREATE TABLE `hierarquia` (
171 `id_hierarquia` int(11) NOT NULL auto_increment,
172 `id_projeto` int(11) NOT NULL default '0',
173 `id_conceito` int(11) NOT NULL default '0',
174 `id_subconceito` int(11) NOT NULL default '0',
175 PRIMARY KEY (`id_hierarquia`,`id_projeto`,`id_conceito`,`id_subconceito`)
176) ENGINE=MyISAM DEFAULT CHARSET=latin1;
177
178--
179-- Dumping data for table `hierarquia`
180--
181
182/*!40000 ALTER TABLE `hierarquia` DISABLE KEYS */;
183/*!40000 ALTER TABLE `hierarquia` ENABLE KEYS */;
184
185
186--
187-- Definition of table `impacto`
188--
189CREATE TABLE `impacto` (
190 `id_impacto` int(11) NOT NULL auto_increment,
191 `id_lexico` int(11) NOT NULL default '0',
192 `impacto` varchar(250) NOT NULL default '',
193 PRIMARY KEY (`id_lexico`,`impacto`),
194 UNIQUE KEY `id_impacto` (`id_impacto`)
195) ENGINE=MyISAM DEFAULT CHARSET=latin1;
196
197--
198-- Dumping data for table `impacto`
199--
200
201/*!40000 ALTER TABLE `impacto` DISABLE KEYS */;
202/*!40000 ALTER TABLE `impacto` ENABLE KEYS */;
203
204
205--
206-- Definition of table `lexico`
207--
208CREATE TABLE `lexico` (
209 `id_lexico` int(11) NOT NULL auto_increment,
210 `id_projeto` int(11) NOT NULL default '0',
211 `data` date NOT NULL default '0000-00-00',
212 `nome` varchar(64) NOT NULL default '',
213 `tipo` varchar(15) default NULL,
214 `nocao` text NOT NULL,
215 `impacto` text,
216 PRIMARY KEY (`id_lexico`,`data`),
217 UNIQUE KEY `IDX_lexico_2` (`id_projeto`,`nome`)
218) ENGINE=MyISAM DEFAULT CHARSET=latin1;
219
220--
221-- Dumping data for table `lexico`
222--
223
224/*!40000 ALTER TABLE `lexico` DISABLE KEYS */;
225/*!40000 ALTER TABLE `lexico` ENABLE KEYS */;
226
227
228--
229-- Definition of table `lextolex`
230--
231CREATE TABLE `lextolex` (
232 `id_lexico_from` int(11) NOT NULL default '0',
233 `id_lexico_to` int(11) NOT NULL default '0',
234 PRIMARY KEY (`id_lexico_from`,`id_lexico_to`)
235) ENGINE=MyISAM DEFAULT CHARSET=latin1;
236
237--
238-- Dumping data for table `lextolex`
239--
240
241/*!40000 ALTER TABLE `lextolex` DISABLE KEYS */;
242/*!40000 ALTER TABLE `lextolex` ENABLE KEYS */;
243
244
245--
246-- Definition of table `participa`
247--
248CREATE TABLE `participa` (
249 `id_usuario` int(11) NOT NULL default '0',
250 `id_projeto` int(11) NOT NULL default '0',
251 `gerente` int(1) NOT NULL default '0',
252 PRIMARY KEY (`id_usuario`,`id_projeto`)
253) ENGINE=MyISAM DEFAULT CHARSET=latin1;
254
255--
256-- Dumping data for table `participa`
257--
258
259/*!40000 ALTER TABLE `participa` DISABLE KEYS */;
260INSERT INTO `participa` (`id_usuario`,`id_projeto`,`gerente`) VALUES
261 (8,6,1),
262 (5,7,1),
263 (1,7,0),
264 (2,7,0),
265 (3,7,0),
266 (4,7,0),
267 (6,7,0),
268 (7,7,0),
269 (8,7,0);
270/*!40000 ALTER TABLE `participa` ENABLE KEYS */;
271
272
273--
274-- Definition of table `pedidocen`
275--
276CREATE TABLE `pedidocen` (
277 `id_pedido` int(11) NOT NULL auto_increment,
278 `id_usuario` int(11) NOT NULL default '0',
279 `id_projeto` int(11) NOT NULL default '0',
280 `tipo_pedido` varchar(7) NOT NULL default '',
281 `aprovado` int(1) NOT NULL default '0',
282 `id_cenario` int(11) default NULL,
283 `titulo` varchar(255) NOT NULL default '',
284 `objetivo` text NOT NULL,
285 `contexto` text NOT NULL,
286 `atores` text NOT NULL,
287 `recursos` text NOT NULL,
288 `episodios` text,
289 `justificativa` text,
290 `id_status` int(1) default NULL,
291 `excecao` text,
292 PRIMARY KEY (`id_pedido`)
293) ENGINE=MyISAM DEFAULT CHARSET=latin1;
294
295--
296-- Dumping data for table `pedidocen`
297--
298
299/*!40000 ALTER TABLE `pedidocen` DISABLE KEYS */;
300/*!40000 ALTER TABLE `pedidocen` ENABLE KEYS */;
301
302
303--
304-- Definition of table `pedidocon`
305--
306CREATE TABLE `pedidocon` (
307 `id_pedido` int(11) NOT NULL auto_increment,
308 `id_usuario` int(11) NOT NULL default '0',
309 `id_projeto` int(11) NOT NULL default '0',
310 `tipo_pedido` varchar(7) NOT NULL default '',
311 `aprovado` int(1) NOT NULL default '0',
312 `id_conceito` int(11) default NULL,
313 `nome` varchar(255) NOT NULL default '',
314 `descricao` text NOT NULL,
315 `namespace` text NOT NULL,
316 `justificativa` text,
317 `id_status` int(1) default NULL,
318 PRIMARY KEY (`id_pedido`)
319) ENGINE=MyISAM DEFAULT CHARSET=latin1;
320
321--
322-- Dumping data for table `pedidocon`
323--
324
325/*!40000 ALTER TABLE `pedidocon` DISABLE KEYS */;
326/*!40000 ALTER TABLE `pedidocon` ENABLE KEYS */;
327
328
329--
330-- Definition of table `pedidolex`
331--
332CREATE TABLE `pedidolex` (
333 `id_pedido` int(11) NOT NULL auto_increment,
334 `id_usuario` int(11) NOT NULL default '0',
335 `id_projeto` int(11) NOT NULL default '0',
336 `tipo_pedido` varchar(7) NOT NULL default '',
337 `aprovado` int(1) NOT NULL default '0',
338 `id_lexico` int(11) NOT NULL default '0',
339 `nome` varchar(64) NOT NULL default '',
340 `nocao` text NOT NULL,
341 `impacto` text NOT NULL,
342 `justificativa` text,
343 `id_status` int(1) default NULL,
344 `tipo` varchar(20) default NULL,
345 PRIMARY KEY (`id_pedido`)
346) ENGINE=MyISAM DEFAULT CHARSET=latin1;
347
348--
349-- Dumping data for table `pedidolex`
350--
351
352/*!40000 ALTER TABLE `pedidolex` DISABLE KEYS */;
353/*!40000 ALTER TABLE `pedidolex` ENABLE KEYS */;
354
355
356--
357-- Definition of table `pedidorel`
358--
359CREATE TABLE `pedidorel` (
360 `id_pedido` int(11) NOT NULL auto_increment,
361 `id_usuario` int(11) NOT NULL default '0',
362 `id_projeto` int(11) NOT NULL default '0',
363 `tipo_pedido` varchar(7) NOT NULL default '',
364 `aprovado` int(1) NOT NULL default '0',
365 `id_relacao` int(11) default NULL,
366 `nome` varchar(255) NOT NULL default '',
367 `justificativa` text,
368 `id_status` int(1) default NULL,
369 PRIMARY KEY (`id_pedido`)
370) ENGINE=MyISAM DEFAULT CHARSET=latin1;
371
372--
373-- Dumping data for table `pedidorel`
374--
375
376/*!40000 ALTER TABLE `pedidorel` DISABLE KEYS */;
377/*!40000 ALTER TABLE `pedidorel` ENABLE KEYS */;
378
379
380--
381-- Definition of table `projeto`
382--
383CREATE TABLE `projeto` (
384 `id_projeto` int(11) NOT NULL default '0',
385 `nome` varchar(128) NOT NULL default '',
386 `data_criacao` date NOT NULL default '0000-00-00',
387 `descricao` text NOT NULL,
388 `id_status` int(50) default NULL,
389 PRIMARY KEY (`id_projeto`)
390) ENGINE=MyISAM DEFAULT CHARSET=latin1;
391
392--
393-- Dumping data for table `projeto`
394--
395
396/*!40000 ALTER TABLE `projeto` DISABLE KEYS */;
397INSERT INTO `projeto` (`id_projeto`,`nome`,`data_criacao`,`descricao`,`id_status`) VALUES
398 (1,'novo','2004-10-13','novo',NULL),
399 (2,'aa','2004-10-13','aa',NULL),
400 (3,'novoprojeto','2004-10-13','descricao projeto testes',NULL),
401 (4,'ultimo','2004-10-13','ultimo',NULL),
402 (5,'teste123','2004-10-13','testeasa',NULL),
403 (6,'projeto','2004-10-13','projteste',NULL),
404 (7,'teste','2004-10-13','',NULL);
405/*!40000 ALTER TABLE `projeto` ENABLE KEYS */;
406
407
408--
409-- Definition of table `publicacao`
410--
411CREATE TABLE `publicacao` (
412 `id_projeto` int(11) NOT NULL default '0',
413 `data_publicacao` date NOT NULL default '0000-00-00',
414 `versao` varchar(15) NOT NULL default '',
415 `XML` longtext NOT NULL,
416 PRIMARY KEY (`id_projeto`,`versao`)
417) ENGINE=MyISAM DEFAULT CHARSET=latin1;
418
419--
420-- Dumping data for table `publicacao`
421--
422
423/*!40000 ALTER TABLE `publicacao` DISABLE KEYS */;
424/*!40000 ALTER TABLE `publicacao` ENABLE KEYS */;
425
426
427--
428-- Definition of table `relacao`
429--
430CREATE TABLE `relacao` (
431 `id_relacao` int(11) NOT NULL auto_increment,
432 `nome` varchar(250) NOT NULL default '',
433 `id_projeto` int(11) default '30',
434 PRIMARY KEY (`id_relacao`),
435 UNIQUE KEY `nome` (`nome`,`id_projeto`)
436) ENGINE=MyISAM DEFAULT CHARSET=latin1;
437
438--
439-- Dumping data for table `relacao`
440--
441
442/*!40000 ALTER TABLE `relacao` DISABLE KEYS */;
443/*!40000 ALTER TABLE `relacao` ENABLE KEYS */;
444
445
446--
447-- Definition of table `relacao_conceito`
448--
449CREATE TABLE `relacao_conceito` (
450 `id_conceito` int(11) NOT NULL default '0',
451 `id_relacao` int(11) NOT NULL default '0',
452 `predicado` varchar(250) NOT NULL default '',
453 `id_projeto` int(11) NOT NULL default '30',
454 PRIMARY KEY (`id_conceito`,`id_relacao`,`predicado`,`id_projeto`)
455) ENGINE=MyISAM DEFAULT CHARSET=latin1;
456
457--
458-- Dumping data for table `relacao_conceito`
459--
460
461/*!40000 ALTER TABLE `relacao_conceito` DISABLE KEYS */;
462/*!40000 ALTER TABLE `relacao_conceito` ENABLE KEYS */;
463
464
465--
466-- Definition of table `sinonimo`
467--
468CREATE TABLE `sinonimo` (
469 `id_sinonimo` int(50) NOT NULL auto_increment,
470 `id_lexico` int(50) NOT NULL default '0',
471 `id_pedidolex` int(50) NOT NULL default '0',
472 `nome` varchar(50) NOT NULL default '',
473 `id_projeto` int(50) default NULL,
474 PRIMARY KEY (`id_sinonimo`)
475) ENGINE=MyISAM DEFAULT CHARSET=latin1;
476
477--
478-- Dumping data for table `sinonimo`
479--
480
481/*!40000 ALTER TABLE `sinonimo` DISABLE KEYS */;
482/*!40000 ALTER TABLE `sinonimo` ENABLE KEYS */;
483
484
485--
486-- Definition of table `status`
487--
488CREATE TABLE `status` (
489 `Id_status` int(2) NOT NULL auto_increment,
490 `Descricao` varchar(50) NOT NULL default '',
491 PRIMARY KEY (`Id_status`)
492) ENGINE=MyISAM DEFAULT CHARSET=latin1;
493
494--
495-- Dumping data for table `status`
496--
497
498/*!40000 ALTER TABLE `status` DISABLE KEYS */;
499/*!40000 ALTER TABLE `status` ENABLE KEYS */;
500
501
502--
503-- Definition of table `usuario`
504--
505CREATE TABLE `usuario` (
506 `id_usuario` int(11) NOT NULL auto_increment,
507 `nome` varchar(255) NOT NULL default '',
508 `email` varchar(64) NOT NULL default '',
509 `login` varchar(32) NOT NULL default '',
510 `senha` varchar(32) NOT NULL default '',
511 PRIMARY KEY (`id_usuario`),
512 UNIQUE KEY `IDX_usuario_2` (`login`)
513) ENGINE=MyISAM AUTO_INCREMENT=10 DEFAULT CHARSET=latin1;
514
515--
516-- Dumping data for table `usuario`
517--
518
519/*!40000 ALTER TABLE `usuario` DISABLE KEYS */;
520INSERT INTO `usuario` (`id_usuario`,`nome`,`email`,`login`,`senha`) VALUES
521 (1,'meu nome','email@blah.com','usuario','123'),
522 (2,'novo','novo@novo.com','novo','novo'),
523 (3,'1','1@1.com','aa','aa'),
524 (4,'teste123','teste123@teste.com','teste123','teste123'),
525 (5,'lyrene','lyrene@inf.cp','lyrene','321'),
526 (6,'nova','nova@teste.com','nova','nova'),
527 (7,'renata','renata@teste.com','renata','senha'),
528 (8,'teste','teste@teste.com','teste','teste'),
529 (9,'carolina','carolina@com.com','carolina','carolina');
530/*!40000 ALTER TABLE `usuario` ENABLE KEYS */;
531
532
533
534
535/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
536/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
537/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
538/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
539/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
540/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
541/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;