... | ... | @@ -22,14 +22,14 @@ A modelagem, documentação e organização do banco de dados se situará nessa |
|
|
|
|
|
### Esquema Lógico
|
|
|
|
|
|
[BD_ER.pdf](uploads/e1b8e19f7644dbf62a6682d60b3c8e4d/BD_ER.pdf)
|
|
|
[ER_BD.pdf](uploads/ec912b101fc216128f43d59133f4fee1/ER_BD.pdf)
|
|
|
|
|
|
![BD_ER](uploads/cdcf4487a086ec6817e57db7a7b9d856/BD_ER.png)
|
|
|
![ER_BD](uploads/048cb916a99ffb48431b1be463fe1a54/ER_BD.png)
|
|
|
|
|
|
### Implementação
|
|
|
|
|
|
`-- MySQL Script generated by MySQL Workbench
|
|
|
-- Sun Apr 3 20:23:49 2022
|
|
|
-- MySQL Script generated by MySQL Workbench
|
|
|
-- Tue Apr 5 00:06:38 2022
|
|
|
-- Model: New Model Version: 1.0
|
|
|
-- MySQL Workbench Forward Engineering
|
|
|
|
... | ... | @@ -37,6 +37,9 @@ SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; |
|
|
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
|
|
|
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION';
|
|
|
|
|
|
-- -----------------------------------------------------
|
|
|
-- Schema mydb
|
|
|
-- -----------------------------------------------------
|
|
|
-- -----------------------------------------------------
|
|
|
-- Schema ucon
|
|
|
-- -----------------------------------------------------
|
... | ... | @@ -100,7 +103,7 @@ CREATE TABLE IF NOT EXISTS `ucon`.`users` ( |
|
|
`email` VARCHAR(255) NOT NULL,
|
|
|
`password` VARCHAR(255) NOT NULL,
|
|
|
`full_name` VARCHAR(64) NOT NULL,
|
|
|
`lattes_id` VARCHAR(255) NULL,
|
|
|
`lattes_id` VARCHAR(255) NULL DEFAULT NULL,
|
|
|
`birth_date` DATETIME NOT NULL,
|
|
|
`createdAt` DATETIME NOT NULL,
|
|
|
`updatedAt` DATETIME NOT NULL,
|
... | ... | @@ -192,6 +195,30 @@ DEFAULT CHARACTER SET = utf8mb4 |
|
|
COLLATE = utf8mb4_0900_ai_ci;
|
|
|
|
|
|
|
|
|
-- -----------------------------------------------------
|
|
|
-- Table `ucon`.`experiences`
|
|
|
-- -----------------------------------------------------
|
|
|
CREATE TABLE IF NOT EXISTS `ucon`.`experiences` (
|
|
|
`id` INT NOT NULL AUTO_INCREMENT,
|
|
|
`role` VARCHAR(64) NOT NULL,
|
|
|
`location` VARCHAR(64) NOT NULL,
|
|
|
`from` DATETIME NOT NULL,
|
|
|
`to` DATETIME NULL,
|
|
|
`createdAt` DATETIME NOT NULL,
|
|
|
`updatedAt` DATETIME NOT NULL,
|
|
|
`userId` INT NOT NULL,
|
|
|
PRIMARY KEY (`id`),
|
|
|
INDEX `userId` (`userId` ASC) VISIBLE,
|
|
|
CONSTRAINT `experiences_ibfk_1`
|
|
|
FOREIGN KEY (`userId`)
|
|
|
REFERENCES `ucon`.`users` (`id`)
|
|
|
ON DELETE CASCADE
|
|
|
ON UPDATE CASCADE)
|
|
|
ENGINE = InnoDB
|
|
|
DEFAULT CHARACTER SET = utf8mb4
|
|
|
COLLATE = utf8mb4_0900_ai_ci;
|
|
|
|
|
|
|
|
|
-- -----------------------------------------------------
|
|
|
-- Table `ucon`.`projects`
|
|
|
-- -----------------------------------------------------
|
... | ... | @@ -397,5 +424,4 @@ COLLATE = utf8mb4_0900_ai_ci; |
|
|
SET SQL_MODE=@OLD_SQL_MODE;
|
|
|
SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
|
|
|
SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS;
|
|
|
`
|
|
|
|