Re: Clues on modeling a really simple concept

From: Bernard Peek <>
Date: Mon, 6 Apr 2009 22:11:42 +0100
Message-ID: <>

In message
<>, Spike <> writes
>My question is: Should i add a relationship between galleries and
>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
Received on Mon Apr 06 2009 - 23:11:42 CEST

Original text of this message