View Single Post

   
  #6 (permalink)  
Old 02-28-2008, 10:49 AM
subtenante
 
Posts: n/a
Default Re: many (empty) fields or many entries?

On 14 May 2007 03:56:24 -0700, Lo'oris <looris@gmail.com> wrote:

>now i have to add stats (many. such as 15, i think, i didn't count
>them yet) about what happened in the match. such as how many points a
>player scored, etc.
>If i add these fields into the table i already have, **most** of them
>will be NULL because simply that player didn't do everything.
>I am concerned about having so many unused fields, maybe they slow
>everything down, or take too many space?


15 fields is not much. Even 30 fields is not that much, and according
to your description, i guess the input will be done "manually"
(somebody has to fill a form somewhere, there is no complete
automation). So the size of your database, I think, is not a big
concern.

EAV, as it is called (didn't know it me neither !), has the
disadvantage to make searches more difficult. If you want to check for
all the matches in which player Albert Einstein scored at least once,
it will be alright. But as soon as you want to have more difficult
operations, it might get tricky (and you will begin doing smart
things... and you'll soon discover than you're not as smart as you
thought in the first place).

I don't have much experience but if my voice counts, let the NULLs be,
they don't do much harm and you will have a far easier time when it
comes to look for the players that have scored between 1 and 3 times
while in position of defender and being entered in the game after the
45th minute of game and never got more than 5 penalties against them.

And if you're sure you never will have this kind of SELECTs, thing
twice ! :}
Reply With Quote