On May 14, 8:41 am, subtenante <zzsubtenant...@gmail.com> wrote:
> On 13 May 2007 18:14:42 -0700, Lo'oris <loo...@gmail.com> wrote:
>
> >case 1) a table with many fields for storing some data, usually most
> >of them will be NULL because they are (and will ever be) unsused
>
> >case 2) a table with just 3 fields, but many entries, one for each
> >field i'd have used (not null) in case 1.
>
> >which is better, in general?
>
> I think both mean you have a design problem. What about splitting your
> table in different ones ?
>
> Sometimes, you need to do ugly things though. Case 1) seems to be more
> normalized, but it depends on what your fields are.
>
> >do you maybe need more detailed infos?
>
> The more the better ! Give as much as is safe.
case 2 sounds like an EAV approach - and, although used successfully
in some environments (see
http://en.wikipedia.org/wiki/Entity-...e-Value_model),
it's usually frowned upon in this NG.