21. Create mapping tables | Spring boot tutorials | Code Simple

Publicado el: 19 enero 2020
en el canal de: Code Simple
8,301
65

Hello Everyone, In this video, we will create two tables in MySql.

Using this we will learn intermediate tutorials in upcoming videos.

SQL Script:
-- author
CREATE TABLE `author` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`name` varchar(100) NOT NULL,
`gender` varchar(15) DEFAULT NULL,
`created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1

book_author
CREATE TABLE `book_author` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`book_id` bigint(20) NOT NULL,
`author_id` bigint(20) NOT NULL,
PRIMARY KEY (`id`),
KEY `fk_book_author__book_id` (`book_id`),
KEY `fk_book_author__author_id` (`author_id`),
CONSTRAINT `fk_book_author__author_id` FOREIGN KEY (`author_id`) REFERENCES `author` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `fk_book_author__book_id` FOREIGN KEY (`book_id`) REFERENCES `book` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1

Github Repo:
https://github.com/cbesangeeth/book-s...

#Share #Comment and #Like


En esta página del sitio puede ver el video en línea 21. Create mapping tables | Spring boot tutorials | Code Simple de Duración hora minuto segunda en buena calidad , que subió el usuario Code Simple 19 enero 2020, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 8,301 veces y le gustó 65 a los espectadores. Disfruta viendo!