On Fri, May 25, 2012 at 12:23 PM, Marc Balmer <marc@msys.ch> wrote:
Am 25.05.12 18:00, schrieb Paul Poulain:
> In the wiki page http://wiki.koha-community.org/wiki/DB_schema_bugs, an
> insconsistency has been noticed:
> primary keys column name can be: id (in authorised_values table), xxxid
> (cityid), xxx_id (label_id), xxxId (limitId), xxxcode (branchcode),
> xxxnumber (borrowernumber) => choose how to name PK and update schema
> accordingly

Technically, the name of a column does not matter much, since you can
always refer to it as <tablename>.<columnname> to make it unambigous.
In some databases that support schemas, like PostgreSQL, you can refer
to columns even as <schemaname>.<tablename>.<columnname>.


I agree with Marc here. The best way is the correct way which is to cite the "relative path" ie. table.column. Otherwise I'd prefer option 4 for the reasons already stated by several.

Kind Regards,
Chris