Jump to content

  • Log In with Google      Sign In   
  • Create Account

#ActualAurioch

Posted 25 May 2013 - 10:32 AM

I'd just like to expand a little on Sky Warden's post.

 

Having 1 table with 600+ columns will just lead to severe performance degradation sooner or later.

 

Imagine you have a table with attributes (columns) like this:

char_id, char_name, char_class, char_level, char_spell1, char_spell2, char_spell3, char_spell4, armor_id, armor_name, armor_value...

Now, imagine there are 365 out of 10 000 different chars which carry the same armor.

You have it? Ok, now change the value specific armor provides, for example from 3 to 5. See the problem?

 

Another problem with table with huge amount of columns is that you need to fill. Every. Single. Column. Each. Time. You add a new row. This isn't noticeable if each row is different than others, but for example if you're making a monster list where name and stats are same but equipment varies, table will have insane redundancy problems. Try edit anything in a table like that without screwing whole table.

 

Is there a easy way to future proof the minimalist number of table concept without it eventually getting completely unmanageable?

 

Take your time to model your database. Normalization is great tool to achieve efficient database without redundancy.


#1Aurioch

Posted 25 May 2013 - 07:27 AM

I'd just like to expand a little on Sky Warden's post.

 

Having 1 table with 600+ columns will just lead to severe performance degradation sooner or later.

 

Imagine you have a table with attributes (columns) like this:

char_id, char_name, char_class, char_level, char_spell1, char_spell2, char_spell3, char_spell4, armor_id, armor_name, armor_value...

Now, imagine there are 365 out of 10 000 different chars which carry the same armor.

You have it? Ok, now change the value armor provides, for example from 3 to 5.

 

Another problem with table with huge amount of columns is that you need to fill. Every. Single. Column. Each. Time. You add a new row. This isn't noticeable if each row is different than others, but for example if you're making a monster list where name and stats are same but equipment varies, table will have insane redundancy problems. Try edit anything in a table like that without screwing whole table.

 

Is there a easy way to future proof the minimalist number of table concept without it eventually getting completely unmanageable?

 

Take your time to model your database. Normalization is great tool to achieve efficient database without redundancy.


PARTNERS