(see http://www.perl.com/lpt/a/2002/10/22/phrasebook.html http://use.perl.org/~gnat/journal/11285 http://use.perl.org/~djberg96/journal/11291 for more info) I just ran across a set of articles that triggered some thinking for me. The basic idea is that we could create a phrasebook of (templated) SQL queries external to the normal modules and scripts. Whenever we need to use a specific query we can slurp it out of the phrasebook, fill in the variables, and run it. I think this might win in two ways: 1) it will be easier to maintain/improve the SQL queries if they're not strewn about in the code 2) we can work at translating the queries into other (nonMySQL) dialects of SQL if we ever decide to support them. The same tool *might* also help us maintain translations internal to our scripts (as opposed to things we've already used HTML::Template for). There might be stickiness in a couple of areas too. The biggest one that I see is that we'll have to be very careful not to break the API presented by a query (i.e., what variables it requires, what data it passes back) -- This is an excellent place for unit tests to help us. any other thoughts? -pate Pat Eyler Kaitiaki/manager migrant Linux sys admin the Koha project ruby, shell, and perl geek http://www.koha.org http://pate.eylerfamily.org
Pat Eyler <pate@eylerfamily.org> wrote:
2) we can work at translating the queries into other (nonMySQL) dialects of SQL if we ever decide to support them.
Is this not still intended to be so? I would be interested in working on translation to postgresql. Indeed, this is part of my reason for subscribing to this list. It is possible to translate MySQL software to other SQLs, but not always the other way, it seems. At the moment, I have to run multiple DBMSs and that is rather annoying. -- MJR http://mjr.towers.org.uk/ IM: slef@jabber.at This is my home web site. This for Jabber Messaging. How's my writing? Let me know via any of my contact details.
Mark, I've started on a PostgreSQL port of the database, but have run into some 'real life' e.g. big project due this week. Hopefully, I'll get back to it soon, and I'll send you a copy of the config. Thanks! -Al On Sat, 2003-03-29 at 08:26, MJ Ray wrote:
Pat Eyler <pate@eylerfamily.org> wrote:
2) we can work at translating the queries into other (nonMySQL) dialects of SQL if we ever decide to support them.
Is this not still intended to be so? I would be interested in working on translation to postgresql. Indeed, this is part of my reason for subscribing to this list. It is possible to translate MySQL software to other SQLs, but not always the other way, it seems. At the moment, I have to run multiple DBMSs and that is rather annoying. -- Al Banks <abanks@buscominc.com>
On Sat, 29 Mar 2003, MJ Ray wrote:
Pat Eyler <pate@eylerfamily.org> wrote:
2) we can work at translating the queries into other (nonMySQL) dialects of SQL if we ever decide to support them.
Is this not still intended to be so? I would be interested in working on translation to postgresql. Indeed, this is part of my reason for subscribing to this list. It is possible to translate MySQL software to other SQLs, but not always the other way, it seems. At the moment, I have to run multiple DBMSs and that is rather annoying.
Well, this may seem like picking nits, but here goes -- Currently, the Koha developers are all working on MySQL. We've not received patches from anyone to make things work on PostgreSQL, Ingress, Oracle, etc. So I'd say that we're still not 'supporting' those RDBMs. It should certainly be possible to use almost any RDBMs from Koha, and I'd like to be able to get to that point ... I think that using a Phrasebook pattern might help us to build libraries of queries that will allow us to use high quality SQL crafted specifically for each RDBMs that we eventually have developers/companies actively supporting. Does that make sense? -pate
-- MJR http://mjr.towers.org.uk/ IM: slef@jabber.at This is my home web site. This for Jabber Messaging.
How's my writing? Let me know via any of my contact details.
------------------------------------------------------- This SF.net email is sponsored by: The Definitive IT and Networking Event. Be There! NetWorld+Interop Las Vegas 2003 -- Register today! http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en _______________________________________________ Koha-devel mailing list Koha-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/koha-devel
Pat Eyler <pate@eylerfamily.org> wrote:
Well, this may seem like picking nits, but here goes --
As may this. Your message did not say anything about whether or not koha currently supports PostgreSQL. It referred to a decision to support them. I inferred that this was a decision to support them in the future. From archives, I thought that was always the plan, so I was surprised to hear this talk of such a decision being in the future. That was all. Gut reaction is: A phrasebook may have value, but is there really that much going on that requires many database-specific commands? -- MJR http://mjr.towers.org.uk/ IM: slef@jabber.at This is my home web site. This for Jabber Messaging. How's my writing? Let me know via any of my contact details.
On Mon, 31 Mar 2003, MJ Ray wrote:
Pat Eyler <pate@eylerfamily.org> wrote:
Well, this may seem like picking nits, but here goes --
As may this. Your message did not say anything about whether or not koha currently supports PostgreSQL. It referred to a decision to support them. I inferred that this was a decision to support them in the future. From archives, I thought that was always the plan, so I was surprised to hear this talk of such a decision being in the future.
Well, I think we've always wanted to support PostgreSQL (though we occassionaly cast our eyes on cool MySQLisms that promise efficiency gains.) I guess my take is that: we don't currently 'support' PostgreSQL, we'd like to, we need one or more developers to step up if we're to get there. That's why I talked about deciding to support PostgreSQL in the future.
That was all.
Gut reaction is: A phrasebook may have value, but is there really that much going on that requires many database-specific commands?
There certainly are areas where it would help enormously (i.e. the DB creation/alteration bits in the install/upgrade scripts). There are other places where it might be useful (i.e., taking advantage of *SQLisms that we feel are worth using). I hope that it would also make tuning/testing easier. All told, I'm not sure it's the right way to go, but I think it's worth discussing. -pate
-- MJR http://mjr.towers.org.uk/ IM: slef@jabber.at This is my home web site. This for Jabber Messaging.
How's my writing? Let me know via any of my contact details.
------------------------------------------------------- This SF.net email is sponsored by: ValueWeb: Dedicated Hosting for just $79/mo with 500 GB of bandwidth! No other company gives more support or power for your dedicated server http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/ _______________________________________________ Koha-devel mailing list Koha-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/koha-devel
Pat Eyler <pate@eylerfamily.org> wrote:
we don't currently 'support' PostgreSQL, we'd like to, we need one or more developers to step up if we're to get there.
Well, it seems that we have three "developers" of sorts that have come out of the woodwork so far. If the ones who have talked about it in the past are still here, it's probably more. I know some of that will only be testing, but it should be enough to make a start.
That's why I talked about deciding to support PostgreSQL in the future.
But that's (deciding to (support PostgreSQL in the future)) or ((deciding to support PostgreSQL) in the future)... there's the misunderstanding. I thought the first was already done, the second has to wait for the code.
There certainly are areas where it would help enormously (i.e. the DB creation/alteration bits in the install/upgrade scripts). There are other places where it might be useful (i.e., taking advantage of *SQLisms that we feel are worth using). I hope that it would also make tuning/testing easier.
Actually, there's another point. Not all versions of MySQL actually support proper SQL. I'm not 100% sure what the current state is. At least at first, we either have to be careful only to use the intersection of MySQL and SQL, or use a phrasebook. Personally, I think creating any non-installation DBMS-specific versions *unless we must* will be a shame. -- MJR http://mjr.towers.org.uk/ IM: slef@jabber.at This is my home web site. This for Jabber Messaging. How's my writing? Let me know via any of my contact details.
participants (3)
-
Al Banks -
MJ Ray -
Pat Eyler