CREATE TABLE `Tags`
(
    `id`      int PRIMARY KEY AUTO_INCREMENT,
    `name`    varchar(50) NOT NULL,
    `note_id` int         NOT NULL
);

ALTER TABLE `Tags`
    ADD FOREIGN KEY (`note_id`) REFERENCES `Notes` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT;