Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- MySQL dump 10.13 Distrib 8.0.17, for Win64 (x86_64)
- --
- -- Host: localhost Database: mydb
- -- ------------------------------------------------------
- -- Server version 8.0.17
- /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
- /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
- /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
- /*!50503 SET NAMES utf8 */;
- /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
- /*!40103 SET TIME_ZONE='+00:00' */;
- /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
- /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
- /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
- /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
- --
- -- Table structure for table `endereco`
- --
- DROP TABLE IF EXISTS `endereco`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!50503 SET character_set_client = utf8mb4 */;
- CREATE TABLE `endereco` (
- `rua` varchar(30) NOT NULL,
- `numero` varchar(6) DEFAULT NULL,
- `complemento` varchar(10) DEFAULT NULL,
- `cep` varchar(9) NOT NULL,
- `bairro` varchar(45) NOT NULL,
- `motorista_id` int(11) unsigned zerofill NOT NULL,
- PRIMARY KEY (`motorista_id`),
- KEY `fk_Endereco_motorista_idx` (`motorista_id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `endereco`
- --
- LOCK TABLES `endereco` WRITE;
- /*!40000 ALTER TABLE `endereco` DISABLE KEYS */;
- INSERT INTO `endereco` VALUES ('Av pres. Kennedy','4512','apt 209','11224545','parede amarela',01441448448),('rua domingos ferreira','1254','predio 2','15454474','caixa d\'agua',01454545454),('rua penelope lucas vericio','4875','apt 402','78965321','caida pequena',01543542154),('rua pedro ferreira','3542','apt 105','45415424','bultrins',01754844788),('rua marcondes costa','4568','apt 902','16584875','Casa caiada',02147483640);
- /*!40000 ALTER TABLE `endereco` ENABLE KEYS */;
- UNLOCK TABLES;
- --
- -- Table structure for table `fabricante_veiculos`
- --
- DROP TABLE IF EXISTS `fabricante_veiculos`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!50503 SET character_set_client = utf8mb4 */;
- CREATE TABLE `fabricante_veiculos` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `nome` varchar(45) DEFAULT NULL,
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=1348756549 DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `fabricante_veiculos`
- --
- LOCK TABLES `fabricante_veiculos` WRITE;
- /*!40000 ALTER TABLE `fabricante_veiculos` DISABLE KEYS */;
- INSERT INTO `fabricante_veiculos` VALUES (25477665,'Mitsubishy'),(154264418,'Audi'),(1348756548,'Ford');
- /*!40000 ALTER TABLE `fabricante_veiculos` ENABLE KEYS */;
- UNLOCK TABLES;
- --
- -- Table structure for table `inspetor`
- --
- DROP TABLE IF EXISTS `inspetor`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!50503 SET character_set_client = utf8mb4 */;
- CREATE TABLE `inspetor` (
- `id` int(11) NOT NULL,
- `cargo` varchar(45) DEFAULT NULL,
- `nome` varchar(55) DEFAULT NULL,
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `inspetor`
- --
- LOCK TABLES `inspetor` WRITE;
- /*!40000 ALTER TABLE `inspetor` DISABLE KEYS */;
- INSERT INTO `inspetor` VALUES (215457856,'gerente de inspeção','Tiago Brito Murilo'),(1154815621,'estagiario','Bruno Dantas Vasconcelos');
- /*!40000 ALTER TABLE `inspetor` ENABLE KEYS */;
- UNLOCK TABLES;
- --
- -- Table structure for table `jornada`
- --
- DROP TABLE IF EXISTS `jornada`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!50503 SET character_set_client = utf8mb4 */;
- CREATE TABLE `jornada` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `valor` decimal(13,2) NOT NULL,
- `inicio` datetime NOT NULL,
- `fim` datetime DEFAULT NULL,
- `distancia` int(4) DEFAULT NULL,
- `motorista_id` int(11) NOT NULL,
- `veiculo_placa` varchar(15) NOT NULL,
- PRIMARY KEY (`id`),
- KEY `fk_jornada_motorista1_idx` (`motorista_id`),
- KEY `fk_jornada_veiculo1_idx` (`veiculo_placa`),
- CONSTRAINT `fk_jornada_motorista1` FOREIGN KEY (`motorista_id`) REFERENCES `motorista` (`id`),
- CONSTRAINT `fk_jornada_veiculo1` FOREIGN KEY (`veiculo_placa`) REFERENCES `veiculo` (`placa`)
- ) ENGINE=InnoDB AUTO_INCREMENT=1231526429 DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `jornada`
- --
- LOCK TABLES `jornada` WRITE;
- /*!40000 ALTER TABLE `jornada` DISABLE KEYS */;
- INSERT INTO `jornada` VALUES (444841222,10.33,'2018-04-10 12:32:33','2018-04-10 12:44:12',5,1441448448,'PPK-6666'),(501514242,9.88,'2018-04-10 12:32:33','2018-04-10 12:44:12',6,1754844788,'TWK-4123'),(541515442,20.23,'2018-04-10 12:32:33','2018-04-10 12:44:12',1,1754844788,'TWK-4123'),(541548667,15.45,'2018-04-10 12:32:33','2018-04-10 12:44:12',3,2147483640,'UGH-1124'),(548158514,33.88,'2018-04-10 12:32:33','2018-04-10 12:44:12',25,2147483640,'UGH-1124'),(1231526428,21.20,'2018-04-10 12:32:33','2018-04-10 12:44:12',10,1441448448,'SUS-9988');
- /*!40000 ALTER TABLE `jornada` ENABLE KEYS */;
- UNLOCK TABLES;
- --
- -- Table structure for table `modelos`
- --
- DROP TABLE IF EXISTS `modelos`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!50503 SET character_set_client = utf8mb4 */;
- CREATE TABLE `modelos` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `modelo` varchar(45) NOT NULL,
- `ano` varchar(45) NOT NULL,
- `cor` varchar(45) NOT NULL,
- `fabricante_veiculos_id` int(11) NOT NULL,
- PRIMARY KEY (`id`),
- KEY `fk_modelos_veiculos_fabricante_veiculos1_idx` (`fabricante_veiculos_id`),
- CONSTRAINT `fk_modelos_veiculos_fabricante_veiculos1` FOREIGN KEY (`fabricante_veiculos_id`) REFERENCES `fabricante_veiculos` (`id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=1025456813 DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `modelos`
- --
- LOCK TABLES `modelos` WRITE;
- /*!40000 ALTER TABLE `modelos` DISABLE KEYS */;
- INSERT INTO `modelos` VALUES (21545154,'focus','2045','transparente',1348756548),(22545631,'layback','2026','preto',25477665),(24542416,'renegade','2018','grafite',1348756548),(215423658,'hetch','1398','arco-iris',25477665),(1002554534,'plug','2010','roxo',154264418),(1025456812,'inovation','2013','branco',154264418);
- /*!40000 ALTER TABLE `modelos` ENABLE KEYS */;
- UNLOCK TABLES;
- --
- -- Table structure for table `motorista`
- --
- DROP TABLE IF EXISTS `motorista`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!50503 SET character_set_client = utf8mb4 */;
- CREATE TABLE `motorista` (
- `id` int(11) NOT NULL,
- `nome` varchar(55) NOT NULL,
- `cnh` varchar(11) NOT NULL,
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `motorista`
- --
- LOCK TABLES `motorista` WRITE;
- /*!40000 ALTER TABLE `motorista` DISABLE KEYS */;
- INSERT INTO `motorista` VALUES (1441448448,'Luis Pedro Franco ','1122554654'),(1454545454,'Maria Regina Fonseca','1655545448'),(1543542154,'Luisa gomes Paola','2115456341'),(1754844788,'Marcos Abrantes Amorim','2015454455'),(2147483640,'Haroldo Funseca Marcos','1121215426');
- /*!40000 ALTER TABLE `motorista` ENABLE KEYS */;
- UNLOCK TABLES;
- --
- -- Table structure for table `passageiro`
- --
- DROP TABLE IF EXISTS `passageiro`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!50503 SET character_set_client = utf8mb4 */;
- CREATE TABLE `passageiro` (
- `cpf` varchar(11) NOT NULL,
- `nome` varchar(55) NOT NULL,
- `idade` int(3) NOT NULL,
- PRIMARY KEY (`cpf`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `passageiro`
- --
- LOCK TABLES `passageiro` WRITE;
- /*!40000 ALTER TABLE `passageiro` DISABLE KEYS */;
- INSERT INTO `passageiro` VALUES ('44587541425','Maria dos Santos Luz',26),('45157875426','Luisa Dantas Ferreira',45),('45785496584','Luis Fernando Carlos',47),('54845656214','Pedro Marcos Santos',25);
- /*!40000 ALTER TABLE `passageiro` ENABLE KEYS */;
- UNLOCK TABLES;
- --
- -- Table structure for table `pessoa_fisica`
- --
- DROP TABLE IF EXISTS `pessoa_fisica`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!50503 SET character_set_client = utf8mb4 */;
- CREATE TABLE `pessoa_fisica` (
- `cpf` varchar(11) NOT NULL,
- `motorista_id` int(11) NOT NULL,
- PRIMARY KEY (`cpf`,`motorista_id`),
- KEY `fk_pessoa_fisica_motorista1_idx` (`motorista_id`),
- CONSTRAINT `fk_pessoa_fisica_motorista1` FOREIGN KEY (`motorista_id`) REFERENCES `motorista` (`id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `pessoa_fisica`
- --
- LOCK TABLES `pessoa_fisica` WRITE;
- /*!40000 ALTER TABLE `pessoa_fisica` DISABLE KEYS */;
- INSERT INTO `pessoa_fisica` VALUES ('12514568454',1543542154),('15451515424',1543542154),('15452155478',1754844788),('44545454554',2147483640);
- /*!40000 ALTER TABLE `pessoa_fisica` ENABLE KEYS */;
- UNLOCK TABLES;
- --
- -- Table structure for table `pessoa_juridica`
- --
- DROP TABLE IF EXISTS `pessoa_juridica`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!50503 SET character_set_client = utf8mb4 */;
- CREATE TABLE `pessoa_juridica` (
- `cnpj` varchar(18) NOT NULL,
- `motorista_id` int(11) NOT NULL,
- PRIMARY KEY (`cnpj`,`motorista_id`),
- KEY `fk_pessoa_juridica_motorista1_idx` (`motorista_id`),
- CONSTRAINT `fk_pessoa_juridica_motorista1` FOREIGN KEY (`motorista_id`) REFERENCES `motorista` (`id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `pessoa_juridica`
- --
- LOCK TABLES `pessoa_juridica` WRITE;
- /*!40000 ALTER TABLE `pessoa_juridica` DISABLE KEYS */;
- INSERT INTO `pessoa_juridica` VALUES ('458457698458745698',2147483640);
- /*!40000 ALTER TABLE `pessoa_juridica` ENABLE KEYS */;
- UNLOCK TABLES;
- --
- -- Table structure for table `reservas`
- --
- DROP TABLE IF EXISTS `reservas`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!50503 SET character_set_client = utf8mb4 */;
- CREATE TABLE `reservas` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `veiculo_placa` varchar(15) NOT NULL,
- `inicio` datetime DEFAULT NULL,
- `fim` datetime DEFAULT NULL,
- `passageiro_cpf` varchar(11) NOT NULL,
- PRIMARY KEY (`id`),
- KEY `fk_veiculo_has_passageiro_veiculo1_idx` (`veiculo_placa`),
- KEY `fk_reservas_passageiro1_idx` (`passageiro_cpf`),
- CONSTRAINT `fk_reservas_passageiro1` FOREIGN KEY (`passageiro_cpf`) REFERENCES `passageiro` (`cpf`),
- CONSTRAINT `fk_veiculo_has_passageiro_veiculo1` FOREIGN KEY (`veiculo_placa`) REFERENCES `veiculo` (`placa`)
- ) ENGINE=InnoDB AUTO_INCREMENT=1235412069 DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `reservas`
- --
- LOCK TABLES `reservas` WRITE;
- /*!40000 ALTER TABLE `reservas` DISABLE KEYS */;
- INSERT INTO `reservas` VALUES (21514543,'PEU-5142','2019-08-20 00:58:31','2019-08-20 01:20:03','44587541425'),(154187412,'UGH-1124','2019-08-22 00:58:31','2019-08-22 01:20:03','45785496584'),(241051154,'TIR-4587','2019-08-22 00:58:31','2019-08-22 01:20:03','54845656214'),(241541215,'SUS-9988','2019-08-22 00:58:31','2019-08-22 01:20:03','54845656214'),(245154724,'PPK-6666','2019-08-22 00:58:31','2019-08-22 01:20:03','45785496584'),(544542164,'PEU-5142','2019-08-22 00:58:31','2019-08-22 01:20:03','45157875426'),(544848441,'TWK-4123','2019-08-22 00:58:31','2019-08-22 01:20:03','54845656214'),(551154123,'UGH-1124','2019-08-22 00:58:31','2019-08-22 01:20:03','45157875426'),(1235412068,'LOL-4478','2019-08-22 00:58:31','2019-08-22 01:20:03','44587541425');
- /*!40000 ALTER TABLE `reservas` ENABLE KEYS */;
- UNLOCK TABLES;
- --
- -- Table structure for table `veiculo`
- --
- DROP TABLE IF EXISTS `veiculo`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!50503 SET character_set_client = utf8mb4 */;
- CREATE TABLE `veiculo` (
- `placa` varchar(15) NOT NULL,
- `chassi` varchar(45) NOT NULL,
- `data_inspecao` datetime DEFAULT NULL,
- `modelos_id` int(11) NOT NULL,
- `inspetor_id` int(11) NOT NULL,
- PRIMARY KEY (`placa`),
- KEY `fk_veiculo_modelos1_idx` (`modelos_id`),
- KEY `fk_veiculo_inspetor1_idx` (`inspetor_id`),
- CONSTRAINT `fk_veiculo_inspetor1` FOREIGN KEY (`inspetor_id`) REFERENCES `inspetor` (`id`),
- CONSTRAINT `fk_veiculo_modelos1` FOREIGN KEY (`modelos_id`) REFERENCES `modelos` (`id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `veiculo`
- --
- LOCK TABLES `veiculo` WRITE;
- /*!40000 ALTER TABLE `veiculo` DISABLE KEYS */;
- INSERT INTO `veiculo` VALUES ('LOL-4478','POP1235VV','2010-05-12 01:24:35',1025456812,1154815621),('PEU-5142','EG45676DE','2010-05-12 01:24:35',21545154,215457856),('PPK-6666','LLU1244CC','2010-05-12 01:24:35',1002554534,215457856),('SUS-9988','FHE2333GH','2010-05-12 01:24:35',22545631,215457856),('TIR-4587','EFH3434DF','2010-05-12 01:24:35',22545631,215457856),('TWK-4123','LUE3232JK','2010-05-12 01:24:35',24542416,215457856),('UGH-1124','LEU2928FL','2010-05-12 01:24:35',215423658,215457856);
- /*!40000 ALTER TABLE `veiculo` ENABLE KEYS */;
- UNLOCK TABLES;
- /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
- /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
- /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
- /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
- /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
- /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
- /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
- /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
- -- Dump completed on 2019-08-20 14:26:15
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement