Hi Karim,

not sure, if there is deeper reasoning behind it (i guess it may be ),
but I try to follow this approach because otherwise you always have to
be careful to not include a column of the name "wms_id" more then
once. I am personally not in favour of aliasing column names when not
really necessary, eg. when you need to output the column name as a
header... otherwise it just shows that the column naming was
ambiguous.

Anyway, you're right that writing those sqls is sometimes awful, otoh
think of an sql where you would just type select * from... and just
because of a join the result contains the same column name twice you'd
have to use .. select a.column1, a.column2 ... also not nice.

Cheers, Michael

2010/4/28 Karim Malhas <[email protected]>:
>
> Hi all,
>
> quick question:
>
> Our database columnames follow the schema
>
>  <tablename>.<tablename>_<columname>
>
> which has me typing endless queryies like:
>
>  "WHERE gui_layer.gui_layer_wms_id = wms.wms_id"
>
> where I would much rather be typing:
>
>  "WHERE gui_layer.wms_id = wms.id"
>
>
> // The obvious solution to ease typing would be this:
> //
> //  "WHERE gui_layer_wms_id = wms_id"
> //
> // But this makes the column name convention only, instead of actually
> // specifying the table-column relationship
>
>
>
> Is there an advantage I am not aware of for naming columns this way?
>
>  Karim
> _______________________________________________
> Mapbender_dev mailing list
> [email protected]
> http://lists.osgeo.org/mailman/listinfo/mapbender_dev
>



-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Aufwind durch Wissen!

Qualifizierte Open Source Schulungen bei der
http://www.foss-academy.eu/
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

-----------------------------------------------------------
Michael Schulz
[email protected]

in medias res
Gesellschaft für Informationstechnologie mbH

Schwimmbadstraße 2
D-79100  Freiburg i. Br.

Tel:  +49 (0)761 705798-102
Tel:  +49 (0)761 705798-0
Fax: +49 (0)761 705798-09

http://www.webgis.de / http://www.zopecms.de
--------------------------------------------------------------
Geschäftsführer: Stefan Giese, Dr. Christof Lindenbeck
Eingetragen im Handelsregister HRB 5930 beim Amtsgericht Freiburg
_______________________________________________
Mapbender_dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapbender_dev

Reply via email to