List Info

Thread: Re: MySQL Performance Example Was: Seriously, WTF?




Re: MySQL Performance Example Was: Seriously, WTF?
country flaguser name
United Kingdom
2008-05-10 09:27:14
On 10 May 2008, at 15:05, Iain Barnett wrote:
> There are 2 things needed for any piece of
documentation, the What,  
> and the Why. Nothing about a datatype, or code in
general explains  
> the reason behind a decision (although in simple cases
it can be  
> inferred), and that is usually the most important
aspect behind what  
> was done.
>
> How does an enum self-document if there are (at least)
4 reasons for  
> it's use?
> <snip rubbish>

At $work, we have a system where Genres and Tags are both
used in the  
Tag table and an enum to denote type (there are a couple of
others,  
but never mind).

So you want to create a new genre, you can look at the table
with  
describe, see the type field (which happens to be an enum)
and see  
that the possibilities are (tag, genre, other).

Now you know all the possibilities it could be and you also
know how  
to spell each one (capitalisation etc.)

It isn't going to replace documentation, but it's a damn
sight clearer  
than yet another foreign key.

--James

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )