First off, don't create a table for each system. The system is just an attribute of the game. It should be a column in a table, like all the other attributes of the game.
As for the rest of the fields -- release date, publisher, region, etc. -- that's another table. You have many rows in that category that correspond to releases of the same game in the games table. If it's released for two systems, it gets two records, one for each system. If it's released with a different name in different regions, then that game has a different name in two rows in the releases table, but both link to the same game ID so you can tell they're the same game.
Code:
CREATE TABLE games (
id INT PRIMARY KEY NOT NULL AUTO_INCREMENT,
grenre_id INT
);
#include in the games table any other attributes that
#never vary by release/region/system
CREATE TABLE game_releases (
game_id INT,
system VARCHAR(25),
region CHAR(3),
developer_id INT,
publisher_id INT,
published_date DATETIME,
name VARCHAR(255)
);
CREATE TABLE developers...
CREATE TABLE publishers...
That look about right for your site?
To satisfy your user's search for PAL games on the SNES, you only need to look in the releases table, and get back all rows where system = 'SNES' and region = 'PAL'. It doesn't matter that a game is available as a different name in another region, the release in the region the user searched will be found. And since you have the game_id, you can show them the list of all releases of all the matching games if you want.
Bookmarks