DROP DATABASE IF EXISTS videoteca; CREATE DATABASE videoteca; USE videoteca; CREATE TABLE actor (id INT NOT NULL AUTO_INCREMENT, nombre VARCHAR(64) NOT NULL, apellidos VARCHAR(64) NOT NULL, PRIMARY KEY(id) ) ENGINE = InnoDB; CREATE TABLE actor_ext (idactor INT NOT NULL, imdb VARCHAR(32) NOT NULL, carpeta VARCHAR(255) NOT NULL, PRIMARY KEY(idactor), INDEX ae_FK(idactor), FOREIGN KEY(idactor) REFERENCES actor(id) ) ENGINE = InnoDB;
DROP DATABASE IF EXISTS videoteca; CREATE DATABASE videoteca; USE videoteca; CREATE TABLE actor (id INT NOT NULL AUTO_INCREMENT, nombre VARCHAR(64) NOT NULL, apellidos VARCHAR(64) NOT NULL, PRIMARY KEY(id) ) ENGINE = InnoDB; CREATE TABLE actor_ext (idactor INT NOT NULL, imdb VARCHAR(32) NOT NULL, carpeta VARCHAR(255) NOT NULL, PRIMARY KEY(idactor), INDEX ae_FK(idactor), FOREIGN KEY(idactor) REFERENCES actor(id) ) ENGINE = InnoDB;