CREATE DATABASE  IF NOT EXISTS `prof_carlos_locadora_bd1_tecnico_vazia` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci */ /*!80016 DEFAULT ENCRYPTION='N' */;
USE `prof_carlos_locadora_bd1_tecnico_vazia`;
-- MySQL dump 10.13  Distrib 8.0.22, for Win64 (x86_64)
--
-- Host: localhost    Database: prof_carlos_locadora_bd1_tecnico_vazia
-- ------------------------------------------------------
-- Server version	8.0.22

/*!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 `dependentes`
--

DROP TABLE IF EXISTS `dependentes`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `dependentes` (
  `id` int NOT NULL AUTO_INCREMENT,
  `Matricula` int(15) unsigned zerofill NOT NULL,
  `Nome` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `Endereco` varchar(100) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `Bairro` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `Cidade` varchar(30) COLLATE utf8mb4_general_ci DEFAULT 'Petrópolis',
  `UF` char(2) COLLATE utf8mb4_general_ci DEFAULT 'RJ',
  `CEP` varchar(10) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `Email` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `Nascimento` date DEFAULT NULL,
  `Data_Cadastro` datetime DEFAULT CURRENT_TIMESTAMP,
  `Data_Atualizacao` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`) USING BTREE,
  KEY `Matricula` (`Matricula`) USING BTREE,
  CONSTRAINT `FK_DEPENDENTES_TITULARES` FOREIGN KEY (`Matricula`) REFERENCES `titulares` (`Matricula`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `dependentes`
--

LOCK TABLES `dependentes` WRITE;
/*!40000 ALTER TABLE `dependentes` DISABLE KEYS */;
/*!40000 ALTER TABLE `dependentes` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `documentacao`
--

DROP TABLE IF EXISTS `documentacao`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `documentacao` (
  `id` int NOT NULL AUTO_INCREMENT,
  `Matricula` int(15) unsigned zerofill NOT NULL,
  `CPF` char(15) COLLATE utf8mb4_general_ci NOT NULL,
  `CNH` char(20) COLLATE utf8mb4_general_ci NOT NULL,
  `RG` char(20) COLLATE utf8mb4_general_ci NOT NULL,
  `Cartao` char(30) COLLATE utf8mb4_general_ci NOT NULL,
  `CVV2` char(6) COLLATE utf8mb4_general_ci NOT NULL,
  `Expitacao` char(10) COLLATE utf8mb4_general_ci NOT NULL,
  `Data_Cadastro` datetime DEFAULT CURRENT_TIMESTAMP,
  `Data_Atualizacao` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`,`Matricula`,`CPF`,`CNH`,`RG`) USING BTREE,
  KEY `FK_TITULARES_DOCUMENTACAO` (`Matricula`) USING BTREE,
  CONSTRAINT `FK_TITULARES_DOCUMENTACAO` FOREIGN KEY (`Matricula`) REFERENCES `titulares` (`Matricula`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `documentacao`
--

LOCK TABLES `documentacao` WRITE;
/*!40000 ALTER TABLE `documentacao` DISABLE KEYS */;
/*!40000 ALTER TABLE `documentacao` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `filmes`
--

DROP TABLE IF EXISTS `filmes`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `filmes` (
  `id` int NOT NULL AUTO_INCREMENT,
  `Matricula_Locatario` int(15) unsigned zerofill DEFAULT NULL,
  `Status` varchar(15) COLLATE utf8mb4_general_ci DEFAULT 'Disponível',
  `Nome` varchar(200) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `Titulo_Original` varchar(200) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `Diretor` varchar(100) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `Ano` int DEFAULT NULL,
  `Genero` varchar(30) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `Fraquia` varchar(30) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `Classificacao` int DEFAULT NULL,
  `Sinopse` longtext COLLATE utf8mb4_general_ci,
  `Pais` varchar(30) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `Oscars` int DEFAULT NULL,
  `Globos_de_Ouro` int DEFAULT NULL,
  `Data_Cadastro` datetime DEFAULT CURRENT_TIMESTAMP,
  `Data_Atualizacao` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`) USING BTREE,
  KEY `FK_FILMES_TITULARES` (`Matricula_Locatario`) USING BTREE,
  CONSTRAINT `FK_FILMES_TITULARES` FOREIGN KEY (`Matricula_Locatario`) REFERENCES `titulares` (`Matricula`) ON DELETE SET NULL ON UPDATE RESTRICT
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `filmes`
--

LOCK TABLES `filmes` WRITE;
/*!40000 ALTER TABLE `filmes` DISABLE KEYS */;
/*!40000 ALTER TABLE `filmes` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `titulares`
--

DROP TABLE IF EXISTS `titulares`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `titulares` (
  `id` int NOT NULL AUTO_INCREMENT,
  `Matricula` int(15) unsigned zerofill NOT NULL,
  `Nome` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `Endereco` varchar(100) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `Bairro` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `Cidade` varchar(30) COLLATE utf8mb4_general_ci DEFAULT 'Rio de Janeiro',
  `UF` char(2) COLLATE utf8mb4_general_ci DEFAULT 'RJ',
  `CEP` varchar(10) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `Email` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `Telefone` varchar(14) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `Nacimento` date DEFAULT NULL,
  `Data_Cadastro` datetime DEFAULT CURRENT_TIMESTAMP,
  `Data_Atualizacao` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`,`Matricula`) USING BTREE,
  KEY `Matricula` (`Matricula`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `titulares`
--

LOCK TABLES `titulares` WRITE;
/*!40000 ALTER TABLE `titulares` DISABLE KEYS */;
/*!40000 ALTER TABLE `titulares` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Dumping events for database 'prof_carlos_locadora_bd1_tecnico_vazia'
--

--
-- Dumping routines for database 'prof_carlos_locadora_bd1_tecnico_vazia'
--
/*!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 2026-08-16 11:44:36
