Normalization of various properties with similar data types

I am working on creating a database for posting properties related to the game, for example, does it support a multiplayer game, what genres does it release, release dates, etc.

It seems that creating two additional tables (e.g. genres_data, for example) for each type of category is not as dynamic as it could be. My initial thought was to install it in one of two ways ...

You have a game table with information about the skeletons, then a property table that lists all the properties, and the third table contains all the data related to the game, where essentially only the columns related to each property are used:

games
-----------
game_id
... relevant data

properties
-----------
property_id
title
type
category

properties_data
---------------
game_id
property_id
bool
min
max
date
text(max255)
longtext

, , , :

properties
--------------
property_id
title
type
category
column_name

properties_data
----------------
game_id
title
description
release_date_au
release_date_jp
genre_rpg
genre_fps
platform_360
platform_ps3
platform_pc
has_leaderboards
has_downloadable_content
... etc

, , , ? ( ).

+1
2

, . . , .

  • ()
  • , ,
  • , .

"" , db busienss, DDL ( ). , , . , .

, "", .

, . Rdb . - Rdb, . , . .

+3

- , .

games
--------
game_id
name
...

release
----------
release_id
game_id
release_date
release_country

genre
---------
genre_id
name

game_genre
-----------
game_id
genre_id
+1

Source: https://habr.com/ru/post/1777797/


All Articles