I also favour "_id" in general... the underscore separates it out as an identifier, and it's already this way in a large percentage of the database.
We need to be very careful, though, if we change any of the existing key names, so that it not only doesn't break the Koha code, but also doesn't break saved Reports. The database update script must do a find/replace in the saved_sql.savedsql field (and should also update saved_sql.last_modified in the process). -Ian On Fri, May 25, 2012 at 12:04 PM, Jared Camins-Esakov < [email protected]> wrote: > Paul, et. al., > > On Fri, May 25, 2012 at 12:00 PM, Paul Poulain > <[email protected]>wrote: > >> 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 >> >> The bug 7065 add a foreign key to the reserves table, so I think it's >> time to clearly choose how we name primary keys. >> >> The possible options are below, my opinion: >> >> 1- id alone => will result in complexity & mistakes, this option must >> be discarded >> 2- xxxxid => short option, may result in hard readability. >> 3- xxxxId => we haven't decided if we want UC in field names. I won't >> discard this option, but does not favour it. >> 4- xxx_id => _ still undecided in field names, I'm not sure it's much >> better than the xxxid one >> > > I favor this option. I think it's readable, unlike (2), and short, unlike > (6). > > 5- xxxxnumber => number is quite long, and may result in very long >> field names, which is not good. I does not like this option. >> > > Regards, > Jared > > -- > Jared Camins-Esakov > Bibliographer, C & P Bibliography Services, LLC > (phone) +1 (917) 727-3445 > (e-mail) [email protected] > (web) http://www.cpbibliography.com/ > > > _______________________________________________ > Koha-devel mailing list > [email protected] > http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel > website : http://www.koha-community.org/ > git : http://git.koha-community.org/ > bugs : http://bugs.koha-community.org/ >
_______________________________________________ Koha-devel mailing list [email protected] http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
