Now I consider that choosing n-n relationship or 1-n relation ship for them
I think that n-n is good option because I imagine that horror movie is 18+ film and horror film
So I can choose n-n relationship
CREATE TABLE Movie (
movie_id INT PRIMARY KEY,
title VARCHAR(255),
release_date DATE,
-- other attributes
);
CREATE TABLE Category (
category_id INT PRIMARY KEY,
category_name VARCHAR(255),
description TEXT,
-- other attributes
);
CREATE TABLE MovieCategory (
movie_id INT,
category_id INT,
PRIMARY KEY (movie_id, category_id),
FOREIGN KEY (movie_id) REFERENCES Movie(movie_id),
FOREIGN KEY (category_id) REFERENCES Category(category_id)
);