[Discussion tech] database table naming
Continuing with open discussion for the future of Koha: On the page http://wiki.koha-community.org/wiki/DB_schema_bugs, we have referenced some inconsistencies on the database. One of them is about table naming : acquisition related tables all start by aq, other tables don't have any prefix. OTOH, Julian has submitted a bug http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5339 that adds an "invoice" table, related to acquisitions, but don't has a aq prefix. The possible options are on http://wiki.koha-community.org/wiki/Table_naming, let's start the discussion ! -- Paul POULAIN http://www.biblibre.com Expert en Logiciels Libres pour l'info-doc Tel : (33) 4 91 81 35 08
Am 10.02.12 11:44, schrieb Paul Poulain:
Continuing with open discussion for the future of Koha:
On the page http://wiki.koha-community.org/wiki/DB_schema_bugs, we have referenced some inconsistencies on the database. One of them is about table naming : acquisition related tables all start by aq, other tables don't have any prefix.
OTOH, Julian has submitted a bug http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5339 that adds an "invoice" table, related to acquisitions, but don't has a aq prefix.
The possible options are on http://wiki.koha-community.org/wiki/Table_naming, let's start the discussion !
A better (imo) move than prefixes would be to use DB schemas. This way related tables can be grouped in a schema, and default security can be defined at the schema level (at least on PostgreSQL). afaik, both MySQL and PostgreSQL support schemas.
Le 10/02/2012 12:14, Marc Balmer a écrit :
afaik, both MySQL and PostgreSQL support schemas. I couldn't find how it works on mySQL. Does anyone have a link with some explanation ?
-- Paul POULAIN http://www.biblibre.com Expert en Logiciels Libres pour l'info-doc Tel : (33) 4 91 81 35 08
Am 14.02.12 15:10, schrieb Paul Poulain:
Le 10/02/2012 12:14, Marc Balmer a écrit :
afaik, both MySQL and PostgreSQL support schemas. I couldn't find how it works on mySQL. Does anyone have a link with some explanation ?
I will try to find out. Maybe a topic for discussions in Marseille.
Am 14.02.12 20:34, schrieb Marc Balmer:
Am 14.02.12 15:10, schrieb Paul Poulain:
Le 10/02/2012 12:14, Marc Balmer a écrit :
afaik, both MySQL and PostgreSQL support schemas. I couldn't find how it works on mySQL. Does anyone have a link with some explanation ?
I will try to find out. Maybe a topic for discussions in Marseille.
Turns out that MySQL indeed has no schema support. But it supports cross-database-queries. A "database" in MySQL is very similar, if not the same, as a "schema" in PostgreSQL.
Op 15-02-12 08:37, Marc Balmer schreef:
Turns out that MySQL indeed has no schema support. But it supports cross-database-queries.
A "database" in MySQL is very similar, if not the same, as a "schema" in PostgreSQL.
Noo, not quite. I mean, they can be used like that, but I would be strongly be against using databases as schema. That way lies terrible madness. In particular, all the tools expect to deal with a database as the unit of data for an application, all permissions are associated with that database, and so on. Also, if you're using a database server administered by someone who isn't you, they'll hate you forever if you do it that way. Robin.
Am 14.02.12 20:41, schrieb Robin Sheat:
Op 15-02-12 08:37, Marc Balmer schreef:
Turns out that MySQL indeed has no schema support. But it supports cross-database-queries.
A "database" in MySQL is very similar, if not the same, as a "schema" in PostgreSQL.
Noo, not quite. I mean, they can be used like that, but I would be strongly be against using databases as schema. That way lies terrible madness.
In particular, all the tools expect to deal with a database as the unit of data for an application, all permissions are associated with that database, and so on. Also, if you're using a database server administered by someone who isn't you, they'll hate you forever if you do it that way.
Oh, I was not suggesting using MySQL databases like PostgreSQL schemas, I was merely pointing out the similarity.
Le 10/02/2012 11:44, Paul Poulain a écrit :
The possible options are on http://wiki.koha-community.org/wiki/Table_naming, let's start the discussion !
Back to this thread... as it seems that no-one want to start the discussion. My proposal is that we should go the easiest way: * for now, the table should be called "aqinvoices", to be consistent with other acquisitions related tables. * in the medium/long term, get rid of any prefix, and rename "aq*" tables. Sounds like a good plan ? -- Paul POULAIN http://www.biblibre.com Expert en Logiciels Libres pour l'info-doc Tel : (33) 4 91 81 35 08
Why not call it invoices, and be not consistent with an inconsistency? Renaming all aq tables is theoretically preferred of course. But is it worth the energy? ________________________________________ Van: koha-devel-bounces@lists.koha-community.org [koha-devel-bounces@lists.koha-community.org] namens Paul Poulain [paul.poulain@biblibre.com] Verzonden: dinsdag 21 februari 2012 14:08 To: koha-devel@lists.koha-community.org Onderwerp: Re: [Koha-devel] [Discussion tech] database table naming Le 10/02/2012 11:44, Paul Poulain a écrit :
The possible options are on http://wiki.koha-community.org/wiki/Table_naming, let's start the discussion !
Back to this thread... as it seems that no-one want to start the discussion. My proposal is that we should go the easiest way: * for now, the table should be called "aqinvoices", to be consistent with other acquisitions related tables. * in the medium/long term, get rid of any prefix, and rename "aq*" tables. Sounds like a good plan ? -- Paul POULAIN http://www.biblibre.com Expert en Logiciels Libres pour l'info-doc Tel : (33) 4 91 81 35 08 _______________________________________________ Koha-devel mailing list Koha-devel@lists.koha-community.org 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/
Le 21/02/2012 14:40, Marcel de Rooy a écrit :
Why not call it invoices, and be not consistent with an inconsistency? The 1st patch was without the "aq" and some noticed this inconsistency... Overall I think it's more consistent to have the "aq" for now.
Renaming all aq tables is theoretically preferred of course. But is it worth the energy? I think that, on the long term, yes, it's worth the energy. I'm sure you've been surprised more than once by some inconsistencies: ppl that know how Koha work don't have much problem with them. But being consistent helps a lot ppl to understand how things are written when they start hacking.
PS: I agree that the table prefix is not the biggest inconsistency we have. About SQL, the biggest one is probably singular/plural table names ! -- Paul POULAIN http://www.biblibre.com Expert en Logiciels Libres pour l'info-doc Tel : (33) 4 91 81 35 08
My proposal is that we should go the easiest way: * for now, the table should be called "aqinvoices", to be consistent with other acquisitions related tables. * in the medium/long term, get rid of any prefix, and rename "aq*" tables.
I think this is a good plan. While the other "aq" prefixes exist, let's remain consistent. -- Owen -- Web Developer Athens County Public Libraries http://www.myacpl.org
Hi to all,
----- Messaggio originale ----- Da: "Paul Poulain" <paul.poulain@biblibre.com> Oggetto: Re: [Koha-devel] [Discussion tech] database table naming
Le 10/02/2012 11:44, Paul Poulain a écrit :
The possible options are on http://wiki.koha-community.org/wiki/Table_naming, let's start the discussion !
Back to this thread... as it seems that no-one want to start the discussion.
My proposal is that we should go the easiest way: * for now, the table should be called "aqinvoices", to be consistent with other acquisitions related tables.
for me is OK.
* in the medium/long term, get rid of any prefix, and rename "aq*" tables.
I dislike this. In the medium/long term, use prefix for every table. I have update the wiki. Bye Zeno Tajoli
On Tue, Feb 21, 2012 at 02:08:07PM +0100, Paul Poulain wrote:
My proposal is that we should go the easiest way: * for now, the table should be called "aqinvoices", to be consistent with other acquisitions related tables. * in the medium/long term, get rid of any prefix, and rename "aq*" tables.
Why not just invoices, I think the prefixes are superfluous ( orders invoices etc are relevant objects outside of acquisition, serials uses them for instance and we dont need to distinguish them from some other type of order ) But just because we've done one more sensibly we dont need to bring the rest into line, I'm perfectly willing to continue cursing at that aq prefix (my fingers want to type acq) and we can postpone 'the great renaming' until we get around to something that requires the interface to the orders table to be updated. Colin -- Colin Campbell Chief Software Engineer, PTFS Europe Limited Content Management and Library Solutions +44 (0) 800 756 6803 (phone) +44 (0) 7759 633626 (mobile) colin.campbell@ptfs-europe.com skype: colin_campbell2 http://www.ptfs-europe.com
Hi, On Feb 21, 2012, at 10:09 AM, Colin Campbell wrote:
Why not just invoices, I think the prefixes are superfluous ( orders invoices etc are relevant objects outside of acquisition, serials uses them for instance and we dont need to distinguish them from some other type of order ) But just because we've done one more sensibly we dont need to bring the rest into line, I'm perfectly willing to continue cursing at that aq prefix (my fingers want to type acq) and we can postpone 'the great renaming' until we get around to something that requires the interface to the orders table to be updated.
I agree with Colin -- why not just call it 'invoices' and start dropping the prefix? Furthermore, doing that is a way to get the renaming started. However, ultimately I think it matters more that work proceed on adding invoice functionality rather than getting too hung up on the 'aq' prefix. Regards, Galen -- Galen Charlton Director of Support and Implementation Equinox Software, Inc. / The Open Source Experts email: gmc@esilibrary.com direct: +1 770-709-5581 cell: +1 404-984-4366 skype: gmcharlt web: http://www.esilibrary.com/ Supporting Koha and Evergreen: http://koha-community.org & http://evergreen-ils.org
On Tue, Feb 21, 2012 at 10:09 AM, Colin Campbell < colin.campbell@ptfs-europe.com> wrote:
On Tue, Feb 21, 2012 at 02:08:07PM +0100, Paul Poulain wrote:
My proposal is that we should go the easiest way: * for now, the table should be called "aqinvoices", to be consistent with other acquisitions related tables. * in the medium/long term, get rid of any prefix, and rename "aq*" tables.
Why not just invoices, I think the prefixes are superfluous ( orders invoices etc are relevant objects outside of acquisition, serials uses them for instance and we dont need to distinguish them from some other type of order )
I also agree with Colin. Lets go with invoices and work from there toward ridding the db of prefixed table names. Kind Regards, Chris
Le 22/02/2012 00:49, Chris Nighswonger a écrit :
I also agree with Colin. Lets go with invoices and work from there toward ridding the db of prefixed table names. Colin, Galen, Chris_n, i've added your voice to "Remove all prefix" option. It seems we have almost reached a consensus, only Zeno would like to define a prefix for all modules.
We consider the decision as taken and Julian can resubmit his "invoice" patch without "aq" prefix ? If you object, please say it now ! -- Paul POULAIN http://www.biblibre.com Expert en Logiciels Libres pour l'info-doc Tel : (33) 4 91 81 35 08
participants (9)
-
Chris Nighswonger -
Colin Campbell -
Galen Charlton -
Marc Balmer -
Marcel de Rooy -
Owen Leonard -
Paul Poulain -
Robin Sheat -
tajoli@cilea.it