Re: Clues on modeling a really simple concept
Date: Mon, 6 Apr 2009 15:40:45 -0700 (PDT)
Message-ID: <28933dcc-983a-409f-b54e-4de451b46ffc_at_z15g2000yqm.googlegroups.com>
On 6 abr, 23:11, Bernard Peek <b..._at_shrdlu.com> wrote:
> In message
> <16d72645-6a6b-4fd4-bccf-d5002970f..._at_q2g2000vbr.googlegroups.com>,
> Spike <fau..._at_gmail.com> writes
>
>
>
> >My question is: Should i add a relationship between galleries and
> >users?
>
> >I would like to query which galleries a user has, and i don't really
> >know if it is worth adding a foreign key rather than doing a three-
> >level join query each time i want to obtain this data.
>
> Less is more. The database is fully normalised without adding an extra
> relationship. You shouldn't denormalise without a good reason.
> Denormalised systems are usually more fragile and will cost you more
> time in programming and maintenance.
>
> Of course if there is some other real-world relationship between
> galleries and users you may need to change the model. Do galleries have
> Owners, for instance and would those be Users?
>
> --
> Bernard Peek
Hi!
Thanks! Received on Tue Apr 07 2009 - 00:40:45 CEST