How many fields normally have in one table?

Well, I create a game, I have one table where I save a lot of information about the member, so I have many fields. How many fields normally have in one table? Does it matter? Maybe I should divide this information into two-three-four tables? What do you think?

+3
source share
5 answers

Normalize database

If you feel that you have too many columns, you probably have duplicate groups , which suggests normalizing the database. See an example here: Description of the basics of database normalization

Hard MySQL Limitations

MySQL 5.5 Column Limit

65 535 .

4096

+7

, . normalization.

, , - , , .. AD EL, DF, , AD , - EL .

+5

, MySQL , 4096 ().

, , .

, normalized. , (, player player_type, ), , , , ( " " , , ).

+1

, 500 , , . SELECT * FROM, .

+1

"member information" is always complicated, but I always split the identifying information into another table and use the salt key to link the 2 together. Thus, it is not so easy to “capture” usernames and passwords, etc. And you can always use SALT as a session variable rather than username / password / userId or something else.

Usually I only store the identifier, salt, and join date in 1 table. As I said, I'm trying to “hide” the rest so that they cannot be “tied up / stolen”.

Hope helps

-2
source

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


All Articles