[OpenSER-Devel] id column name

Iñaki Baz Castillo ibc at in.ilimit.es
Mon Nov 26 13:55:22 UTC 2007


El Monday 26 November 2007 13:52:26 Dan Pascu escribió:
> On Sunday 25 November 2007, Juha Heinanen wrote:
> > Dan Pascu writes:
> >  > Prefixing with the table name is not necessary to have that added
> >  > value, because the table name already puts it in the right context:
> >  >
> >  > ... WHERE lcr.grp_id = gw_grp.id ...
> >
> > with added value, i was not referring added value to the code, but a
> > user who is filling up the tables.
>
> I know what you meant and I wasn't referring to the code either, that was
> just an example to show my point that a prefix is unnecessary in that
> context given that it duplicates the table name.

I absolutelly agree with you Dan.

There is no reason at all "gw_grp" table primary key to be called as "grp_id". 
It should be "id" as in any other OpenSer table (IMHO).

In "gw" table there is a column "grp_id" that should correspond to "id" field 
in "gw_grp". Naming primary key of "gw_grp" table as "grp_id" instead of "id" 
is just innecesary and breaks tables homogeneity.

Regards.



-- 
Iñaki Baz Castillo
ibc at in.ilimit.es



More information about the Devel mailing list