question about mysql
#1

i heard that if I create a table for each variable it could work much faster than creating variables in tables.
is that right? and if yes how effective is that?
Reply
#2

I'm confused by your terminology.

Generally if you need to add a number to a column name then you're doing it wrong. In such cases it is almost always advised to create another table. In database design you need to think ahead. Ask yourself questions like "what if I need to store 100,000 of these things?". Then you'll usually come to the conclusion that "no, I can't add 100,000 columns".

If I table exceeds 20 columns I already feel uncomfortable.
Reply
#3

Quote:
Originally Posted by Vince
Посмотреть сообщение
I'm confused by your terminology.

Generally if you need to add a number to a column name then you're doing it wrong. In such cases it is almost always advised to create another table. In database design you need to think ahead. Ask yourself questions like "what if I need to store 100,000 of these things?". Then you'll usually come to the conclusion that "no, I can't add 100,000 columns".

If I table exceeds 20 columns I already feel uncomfortable.
so basically it's yes?
I should create a table for each variable I would like to store?
Reply
#4

If you mean like a table for each var, which would men if you have like 50 variables and 50 tables, then no, why would you do something like that ? What are columns made for then ? A table for each system you have, then yes, a table for each variable, no.
Reply
#5

Quote:
Originally Posted by Cadilab
Посмотреть сообщение
If you mean like a table for each var, which would men if you have like 50 variables and 50 tables, then no, why would you do something like that ? What are columns made for then ? A table for each system you have, then yes, a table for each variable, no.
So like,

Tables:
Basic Information
Vehicles
Weapons
Achievements
Etc..?
Reply
#6

Quote:
Originally Posted by Lirbo
Посмотреть сообщение
So like,

Tables:
Basic Information
Vehicles
Weapons
Achievements
Etc..?
That's the best way to use MySQL to be honest. Separating systems in different tables. Make sure you use public and private keys so you can identify who owns what.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)