· 7 years ago · Nov 27, 2018, 09:56 PM
1-- MySQL dump 10.13 Distrib 5.7.22, for Linux (x86_64)
2--
3-- Host: localhost Database: IFC_2018
4-- ------------------------------------------------------
5-- Server version 5.7.22-0ubuntu0.16.04.1
6
7/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
8/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
9/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
10/*!40101 SET NAMES utf8 */;
11/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
12/*!40103 SET TIME_ZONE='+00:00' */;
13/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
14/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
15/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
16/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
17
18--
19-- Table structure for table `Aluno`
20--
21
22DROP TABLE IF EXISTS `Aluno`;
23/*!40101 SET @saved_cs_client = @@character_set_client */;
24/*!40101 SET character_set_client = utf8 */;
25CREATE TABLE `Aluno` (
26 `cod_aluno` int(11) NOT NULL,
27 `nome_aluno` varchar(30) NOT NULL,
28 `rg_aluno` int(11) NOT NULL,
29 `cidade` varchar(20) DEFAULT NULL,
30 `curso` int(11) NOT NULL,
31 `email_al` varchar(30) DEFAULT NULL,
32 PRIMARY KEY (`cod_aluno`),
33 UNIQUE KEY `un_aluno` (`rg_aluno`),
34 KEY `fk_aluno_curso` (`curso`),
35 CONSTRAINT `fk_aluno_curso` FOREIGN KEY (`curso`) REFERENCES `Curso` (`cod_curso`)
36) ENGINE=InnoDB DEFAULT CHARSET=latin1;
37/*!40101 SET character_set_client = @saved_cs_client */;
38
39--
40-- Dumping data for table `Aluno`
41--
42
43LOCK TABLES `Aluno` WRITE;
44/*!40000 ALTER TABLE `Aluno` DISABLE KEYS */;
45INSERT INTO `Aluno` VALUES (1,'Felipe Silva',11111112,'Sombrio',1,'felipe@email.com'),(2,'Priscila Sousa',22222223,'Sombrio',1,'priscila@email.com'),(3,'Ygor Sousa',33333334,'Torres',2,'ygor@email.com'),(4,'Lucas Morais',44444443,'Torres',2,'lucas@email.com'),(5,'Peter Alves',55555556,'Praia Grande',3,'peter@email.com'),(6,'Bianca Alves',66666667,'Sombrio',3,'bianca@email.com'),(7,'Carlos Rodrigues',77777778,'Torres',4,'carlos@email.com'),(8,'Vitoria Marques',88888889,'Gaivota',4,'vitoria@email.com'),(9,'Rodrigo Santos',89999991,'Gaivota',5,'rodrigo@email.com'),(10,'Samuel Costa',11111122,'Ararangua',5,'samuel@email.com'),(11,'Henrique Alves Pereira',22222233,'Torres',1,'felipeap@email.com'),(12,'Ygor Silva',33333344,'Gaivota',1,'ygorsilvae@email.com'),(13,'Marcela Sousa',44444455,'Sombrio',2,'marcela@email.com'),(14,'Flavio Morais',55555566,'Torres',2,'flavio@email.com'),(15,'Carolina Marques',66666677,'Praia Grande',4,'carolina@email.com'),(16,'Amanda Santos',77777788,'Gaivota',5,'amanda@email.com'),(17,'Eva Alves',88888899,'Sombrio',3,'eva@email.com');
46/*!40000 ALTER TABLE `Aluno` ENABLE KEYS */;
47UNLOCK TABLES;
48
49--
50-- Table structure for table `Categoria`
51--
52
53DROP TABLE IF EXISTS `Categoria`;
54/*!40101 SET @saved_cs_client = @@character_set_client */;
55/*!40101 SET character_set_client = utf8 */;
56CREATE TABLE `Categoria` (
57 `cod_categ` int(11) NOT NULL AUTO_INCREMENT,
58 `nome_categ` varchar(20) NOT NULL,
59 PRIMARY KEY (`cod_categ`)
60) ENGINE=InnoDB DEFAULT CHARSET=latin1;
61/*!40101 SET character_set_client = @saved_cs_client */;
62
63--
64-- Dumping data for table `Categoria`
65--
66
67LOCK TABLES `Categoria` WRITE;
68/*!40000 ALTER TABLE `Categoria` DISABLE KEYS */;
69/*!40000 ALTER TABLE `Categoria` ENABLE KEYS */;
70UNLOCK TABLES;
71
72--
73-- Table structure for table `Curso`
74--
75
76DROP TABLE IF EXISTS `Curso`;
77/*!40101 SET @saved_cs_client = @@character_set_client */;
78/*!40101 SET character_set_client = utf8 */;
79CREATE TABLE `Curso` (
80 `cod_curso` int(11) NOT NULL,
81 `nome_curso` varchar(30) NOT NULL,
82 `periodo` varchar(10) NOT NULL DEFAULT 'matutino',
83 `tp_curso` int(11) DEFAULT NULL,
84 PRIMARY KEY (`cod_curso`),
85 KEY `fk_curs_tp_curs` (`tp_curso`),
86 CONSTRAINT `fk_curs_tp_curs` FOREIGN KEY (`tp_curso`) REFERENCES `Tipo_Curso` (`cod_tp_curso`)
87) ENGINE=InnoDB DEFAULT CHARSET=latin1;
88/*!40101 SET character_set_client = @saved_cs_client */;
89
90--
91-- Dumping data for table `Curso`
92--
93
94LOCK TABLES `Curso` WRITE;
95/*!40000 ALTER TABLE `Curso` DISABLE KEYS */;
96INSERT INTO `Curso` VALUES (1,'Redes de Computadores','Noturno',3),(2,'Matematica','Noturno',4),(3,'Turismo','Noturno',3),(4,'Tec Informatica','Vespertino',1),(5,'Tec Hospedagem','Vespertino',1);
97/*!40000 ALTER TABLE `Curso` ENABLE KEYS */;
98UNLOCK TABLES;
99
100--
101-- Table structure for table `Disciplina`
102--
103
104DROP TABLE IF EXISTS `Disciplina`;
105/*!40101 SET @saved_cs_client = @@character_set_client */;
106/*!40101 SET character_set_client = utf8 */;
107CREATE TABLE `Disciplina` (
108 `cod_dscp` int(11) NOT NULL,
109 `nome_dscp` varchar(40) DEFAULT NULL,
110 `curso` int(11) NOT NULL,
111 PRIMARY KEY (`cod_dscp`),
112 KEY `fk_dscp_curso` (`curso`),
113 CONSTRAINT `fk_dscp_curso` FOREIGN KEY (`curso`) REFERENCES `Curso` (`cod_curso`)
114) ENGINE=InnoDB DEFAULT CHARSET=latin1;
115/*!40101 SET character_set_client = @saved_cs_client */;
116
117--
118-- Dumping data for table `Disciplina`
119--
120
121LOCK TABLES `Disciplina` WRITE;
122/*!40000 ALTER TABLE `Disciplina` DISABLE KEYS */;
123INSERT INTO `Disciplina` VALUES (1,'Banco de Dados',1),(2,'Serviços de Rede',1),(3,'Sistemas Operacionais I',1),(4,'Calculo I',2),(5,'Introdução ao Turismo',3),(6,'Sistemas Aplicativos',4),(7,'Hardware',4),(8,'Introducao a Hospedagem',5),(9,'Equacoes',2),(10,'Matematica Financeira',2),(11,'Espanhol para turismo',3),(12,'Ingles para turismo',3),(13,'Informatica para hospedagem',5);
124/*!40000 ALTER TABLE `Disciplina` ENABLE KEYS */;
125UNLOCK TABLES;
126
127--
128-- Table structure for table `Matricula`
129--
130
131DROP TABLE IF EXISTS `Matricula`;
132/*!40101 SET @saved_cs_client = @@character_set_client */;
133/*!40101 SET character_set_client = utf8 */;
134CREATE TABLE `Matricula` (
135 `cod_aluno` int(11) NOT NULL,
136 `cod_prof` int(11) NOT NULL,
137 `cod_dscp` int(11) NOT NULL,
138 PRIMARY KEY (`cod_aluno`,`cod_prof`,`cod_dscp`),
139 KEY `professor` (`cod_prof`),
140 KEY `disciplina` (`cod_dscp`),
141 CONSTRAINT `aluno` FOREIGN KEY (`cod_aluno`) REFERENCES `Aluno` (`cod_aluno`),
142 CONSTRAINT `disciplina` FOREIGN KEY (`cod_dscp`) REFERENCES `Disciplina` (`cod_dscp`),
143 CONSTRAINT `professor` FOREIGN KEY (`cod_prof`) REFERENCES `Professor` (`cod_prof`)
144) ENGINE=InnoDB DEFAULT CHARSET=latin1;
145/*!40101 SET character_set_client = @saved_cs_client */;
146
147--
148-- Dumping data for table `Matricula`
149--
150
151LOCK TABLES `Matricula` WRITE;
152/*!40000 ALTER TABLE `Matricula` DISABLE KEYS */;
153INSERT INTO `Matricula` VALUES (15,1,6),(2,2,3),(7,2,7),(8,2,7),(11,2,3),(1,3,2),(5,3,11),(6,3,11),(11,3,2),(12,3,2),(6,4,12),(17,4,12),(5,5,5),(6,5,5),(17,5,5),(9,6,13),(16,6,13),(1,7,1),(2,7,1),(10,7,8),(11,7,1),(12,7,1),(16,7,8),(3,8,9),(4,9,10),(13,9,10),(14,9,10),(3,10,4),(4,10,4),(13,10,4),(14,10,4);
154/*!40000 ALTER TABLE `Matricula` ENABLE KEYS */;
155UNLOCK TABLES;
156
157--
158-- Table structure for table `Professor`
159--
160
161DROP TABLE IF EXISTS `Professor`;
162/*!40101 SET @saved_cs_client = @@character_set_client */;
163/*!40101 SET character_set_client = utf8 */;
164CREATE TABLE `Professor` (
165 `cod_prof` int(4) NOT NULL,
166 `nome_prof` varchar(30) NOT NULL,
167 `email_prof` varchar(30) NOT NULL,
168 `prof_tipo` int(11) DEFAULT NULL,
169 PRIMARY KEY (`cod_prof`),
170 KEY `fk_prof_tpprof` (`prof_tipo`),
171 CONSTRAINT `fk_prof_tpprof` FOREIGN KEY (`prof_tipo`) REFERENCES `Tipo_Professor` (`cod_tp_prof`)
172) ENGINE=InnoDB DEFAULT CHARSET=latin1;
173/*!40101 SET character_set_client = @saved_cs_client */;
174
175--
176-- Dumping data for table `Professor`
177--
178
179LOCK TABLES `Professor` WRITE;
180/*!40000 ALTER TABLE `Professor` DISABLE KEYS */;
181INSERT INTO `Professor` VALUES (1,'Joao','joao@ifc.edu.br',1),(2,'Maria','maria@ifc.edu.br',1),(3,'Pedro','pedro@ifc.edu.br',1),(4,'Carlos','carlos@ifc.edu.br',2),(5,'Joaquim','joaquim@ifc.edu.br',2),(6,'Ana','ana@ifc.edu.br',3),(7,'Manoel','joao@ifc.edu.br',1),(8,'Osvaldo','osvaldo@ifc.edu.br',2),(9,'Mariano','mariano@ifc.edu.br',2),(10,'Jose','jose@ifc.edu.br',3);
182/*!40000 ALTER TABLE `Professor` ENABLE KEYS */;
183UNLOCK TABLES;
184
185--
186-- Table structure for table `Tipo_Curso`
187--
188
189DROP TABLE IF EXISTS `Tipo_Curso`;
190/*!40101 SET @saved_cs_client = @@character_set_client */;
191/*!40101 SET character_set_client = utf8 */;
192CREATE TABLE `Tipo_Curso` (
193 `cod_tp_curso` int(11) NOT NULL,
194 `nome_tp_curso` varchar(30) NOT NULL,
195 PRIMARY KEY (`cod_tp_curso`)
196) ENGINE=InnoDB DEFAULT CHARSET=latin1;
197/*!40101 SET character_set_client = @saved_cs_client */;
198
199--
200-- Dumping data for table `Tipo_Curso`
201--
202
203LOCK TABLES `Tipo_Curso` WRITE;
204/*!40000 ALTER TABLE `Tipo_Curso` DISABLE KEYS */;
205INSERT INTO `Tipo_Curso` VALUES (1,'Tecnico Int Ens Medio'),(2,'Tecnico Subsequente'),(3,'Grad. Tecnologo'),(4,'Graduacao - Licenciatura');
206/*!40000 ALTER TABLE `Tipo_Curso` ENABLE KEYS */;
207UNLOCK TABLES;
208
209--
210-- Table structure for table `Tipo_Professor`
211--
212
213DROP TABLE IF EXISTS `Tipo_Professor`;
214/*!40101 SET @saved_cs_client = @@character_set_client */;
215/*!40101 SET character_set_client = utf8 */;
216CREATE TABLE `Tipo_Professor` (
217 `cod_tp_prof` int(11) NOT NULL,
218 `regime_prof` varchar(30) NOT NULL,
219 `salario_tp_prof` float DEFAULT NULL,
220 PRIMARY KEY (`cod_tp_prof`)
221) ENGINE=InnoDB DEFAULT CHARSET=latin1;
222/*!40101 SET character_set_client = @saved_cs_client */;
223
224--
225-- Dumping data for table `Tipo_Professor`
226--
227
228LOCK TABLES `Tipo_Professor` WRITE;
229/*!40000 ALTER TABLE `Tipo_Professor` DISABLE KEYS */;
230INSERT INTO `Tipo_Professor` VALUES (1,'40H-DE',945.1),(2,'40H',900.05),(3,'20H',460.33);
231/*!40000 ALTER TABLE `Tipo_Professor` ENABLE KEYS */;
232UNLOCK TABLES;
233/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
234
235/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
236/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
237/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
238/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
239/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
240/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
241/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
242
243-- Dump completed on 2018-04-25 20:24:33