インデックスと制約の両方に同じ名前を付けることができ、推奨される命名規則は何ですか
CREATE TABLE IF NOT EXISTS `mydb`.`books` (
`id` INT NOT NULL AUTO_INCREMENT ,
`isbn` VARCHAR(45) NOT NULL ,
`category_id` INT NOT NULL ,
`publisher_id` INT NOT NULL ,
`year` YEAR NULL ,
PRIMARY KEY (`id`) ,
INDEX `fk_books_category_id` (`category_id` ASC) ,
INDEX `fk_books_publisher_id` (`publisher_id` ASC) ,
CONSTRAINT `fk_books_category_id`
FOREIGN KEY (`category_id` )
REFERENCES `mydb`.`categories` (`id` )
ON DELETE NO ACTION
ON UPDATE NO ACTION,
CONSTRAINT `fk_books_publisher_id`
FOREIGN KEY (`publisher_id` )
REFERENCES `mydb`.`publishers` (`id` )
ON DELETE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB;