CREATE TABLE authors ( id INT NOT NULL AUTO_INCREMENT, name VARCHAR(255) NOT NULL, PRIMARY KEY (id) ); CREATE TABLE entries ( id INT NOT NULL AUTO_INCREMENT, author_id INT NOT NULL, title VARCHAR(255) NOT NULL, body TEXT, available TINYINT(1) NOT NULL, PRIMARY KEY (id) ); CREATE TABLE tags ( entry_id INT NOT NULL, name VARCHAR(255) NOT NULL, PRIMARY KEY (entry_id, name) ); -- JOIN 使わない場合 INSERT IN