Some question: postgres, italian, ...
I'm looking for a library management software for my organization, so i've found koha. Interesting... ;-))) Some question: 1) there's just a translation in Italian?! Can i contribute this?! 2) i want to use koha with postgres, but i need assurance that work with potgres. I've had experience with other software written for mysql that in theory work with pgsql but in practice all sources have to be rewritten. ;( 3) In any case need to be rewritten the schema. Please, don't distribute the schema in mysql dump format, is not portable and are full of (nonstandard) SQL instruction. Someone have just rewritten the schema for postgres?! Basically have to be rewritten the KEY instances (to CREATE INDEX) and the auto_increment (to serial). Again: PG support real referential integrity (FOREIGN KEY). There's somewhere a E/R schema that explain referential integrity, or can i add referential integrity (if someone exlain me the schema?!). 4) I'm new to library related problem, but seems that the MARC format is a standard in this field. Someone know if this also rule for european country?! Before starting a big google session, if someone have some pointers... Thanks. -- dott. Marco Gaiarin GNUPG Key ID: 240A3D66 Associazione ``La Nostra Famiglia'' http://www.sv.lnf.it/ Polo FVG - Via della Bontà, 7 - 33078 - San Vito al Tagliamento (PN) gaio(at)sv.lnf.it tel +39-0434-842711 fax +39-0434-842797 Supporta il disegno di legge sul software libero! http://www.softwarelibero.it/news/news020417_01.shtml
Hi Marco, Marco Gaiarin wrote:
I'm looking for a library management software for my organization, so i've found koha. Interesting... ;-)))
I agree ;-)
Some question: 1) there's just a translation in Italian?! Can i contribute this?!
No translation in italian for instance. In the 1.2 versions, translation is quite hard, CPU-eater to build. We plan to use a templating system in a future version, to enable themes, and translations.
2) i want to use koha with postgres, but i need assurance that work with potgres. I've had experience with other software written for mysql that in theory work with pgsql but in practice all sources have to be rewritten. ;(
Can't say anything...
3) In any case need to be rewritten the schema. Please, don't distribute the schema in mysql dump format, is not portable and are full of (nonstandard) SQL instruction. Someone have just rewritten the schema for postgres?! Basically have to be rewritten the KEY instances (to CREATE INDEX) and the auto_increment (to serial). Again: PG support real referential integrity (FOREIGN KEY). There's somewhere a E/R schema that explain referential integrity, or can i add referential integrity (if someone exlain me the schema?!).
The problem is mySQL does'nt support referential integrity. Maybe in mySQL v4 it will be better. I don't know if so has rewritten the schema in standard SQL.
4) I'm new to library related problem, but seems that the MARC format is a standard in this field. Someone know if this also rule for european country?! Before starting a big google session, if someone have some pointers...
I'm a old newbie at library related problems... MARC is THE standard in libraries. The "problem" is that there are numerous MARC details... In france (and in Europe I think, so in italy, it should be the same), we use UNIMARC standard (UNIfied MARC). Don't know any url in italian. I've only url in french ;-) -- Paul
Mandi! paul POULAIN In chel di` si favelave...
In the 1.2 versions, translation is quite hard, CPU-eater to build. We plan to use a templating system in a future version, to enable themes, and translations.
For now, i've to install... ;)))
The problem is mySQL does'nt support referential integrity. Maybe in mySQL v4 it will be better. I don't know if so has rewritten the schema in standard SQL.
But MySQL have a loose SQL parse, so accept FOREIGN KEY keyword, simply does nothing. ;)
MARC is THE standard in libraries. The "problem" is that there are numerous MARC details... In france (and in Europe I think, so in italy, it should be the same), we use UNIMARC standard (UNIfied MARC). Don't know any url in italian. I've only url in french ;-)
I've found (in english) the links: http://www.ifla.org/VI/3/p1996-1/unimarc.htm http://www.ifla.org/VI/3/p1996-1/sec-uni.htm as you can see, UNIMARC is a superset of various *MARC standard, so i hope it will be taken into account for next release. Thanks to all. ;) -- dott. Marco Gaiarin GNUPG Key ID: 240A3D66 Associazione ``La Nostra Famiglia'' http://www.sv.lnf.it/ Polo FVG - Via della Bontà, 7 - 33078 - San Vito al Tagliamento (PN) gaio(at)sv.lnf.it tel +39-0434-842711 fax +39-0434-842797 Supporta il disegno di legge sul software libero! http://www.softwarelibero.it/news/news020417_01.shtml
On Fri, 28 Jun 2002, Marco Gaiarin wrote: Hi Marco
I'm looking for a library management software for my organization, so i've found koha. Interesting... ;-)))
I'm glad to hear you've found us. I hope you'll stick with us. There was recently another Italian looking at using Koha. I'm not sure how far he's gone so far. Perhaps this request will bring up some additional interest.
Some question:
1) there's just a translation in Italian?! Can i contribute this?!
There is not yet, I'd be happy to see one started though. You are certainly welcome to help out with the effort.
2) i want to use koha with postgres, but i need assurance that work with potgres. I've had experience with other software written for mysql that in theory work with pgsql but in practice all sources have to be rewritten. ;(
Again, people have mentioned postgres as a desired platform. I don't know that anyone has done more than mention it. I'd like to see Koha be DB independent. Are you interested in helping with this effort?
3) In any case need to be rewritten the schema. Please, don't distribute the schema in mysql dump format, is not portable and are full of (nonstandard) SQL instruction. Someone have just rewritten the schema for postgres?! Basically have to be rewritten the KEY instances (to CREATE INDEX) and the auto_increment (to serial).
Is this something we could write a script for? (It sounds like it.) Could you give us a clear example to follow?
Again: PG support real referential integrity (FOREIGN KEY). There's somewhere a E/R schema that explain referential integrity, or can i add referential integrity (if someone exlain me the schema?!).
4) I'm new to library related problem, but seems that the MARC format is a standard in this field. Someone know if this also rule for european country?!
My understanding is that MARC is also a standard in Europe. I don't know how close this is to the US MARC standards. Paul (who also answered your email) is both European and in charge of the 1.4 release, which will be MARC enabled. He may be a good contact to work these issues with. I hope you'll help us make Koha a viable option for you. thanks, -pate
Before starting a big google session, if someone have some pointers...
Thanks.
Mandi! Pat Eyler In chel di` si favelave...
I'm glad to hear you've found us. I hope you'll stick with us. There was recently another Italian looking at using Koha. I'm not sure how far he's gone so far. Perhaps this request will bring up some additional interest.
A friend of mine reply in private, so we are at least 3... ;))) [PGsql]
Again, people have mentioned postgres as a desired platform. I don't know that anyone has done more than mention it. I'd like to see Koha be DB independent. Are you interested in helping with this effort?
Yes, i'll stard rewriting the schema today...
Is this something we could write a script for? (It sounds like it.) Could you give us a clear example to follow?
No, i think there's no way to translate from mySQL to other SQL dialects, but Mysql have a loose SQL parser, so i think that a single SQL file, well written could work for all. Apart from auto_increment/serial filed, do you know that real SQL programmer doesn't use serial field?! ;-)))
how close this is to the US MARC standards. Paul (who also answered your email) is both European and in charge of the 1.4 release, which will be MARC enabled. He may be a good contact to work these issues with.
I'll reply to them. -- dott. Marco Gaiarin GNUPG Key ID: 240A3D66 Associazione ``La Nostra Famiglia'' http://www.sv.lnf.it/ Polo FVG - Via della Bontà, 7 - 33078 - San Vito al Tagliamento (PN) gaio(at)sv.lnf.it tel +39-0434-842711 fax +39-0434-842797 Supporta il disegno di legge sul software libero! http://www.softwarelibero.it/news/news020417_01.shtml
On Mon, Jul 01, 2002 at 10:56:12AM +0200, Marco Gaiarin wrote:
A friend of mine reply in private, so we are at least 3... ;))) I guess I may be that third guy. Hello Everybody 8)
[PGsql] I like it too...
Again, people have mentioned postgres as a desired platform. I don't know that anyone has done more than mention it. I'd like to see Koha be DB independent. Maybe through Perl DBI? It would be great. Unless Koha needs any special feature of one particular DB/MySQL ...
Are you interested in helping with this effort? I hope I can afford it (== have enough spare time)
Thank you all for your attention Andrea -- Andrea Brugiolo, andrea@cab.unipd.it University of Padova - C.A.B. Inter Library Center: http://www.cab.unipd.it tel +39-049-827-3688/6477 fax +39-049-827-3651
In fact there is an other italian in the list, I. Bye Zeno Tajoli - Verona, Italy Librarian and Software Developer
On Mon, 2002-07-01 at 21:17, Andrea Brugiolo wrote:
Again, people have mentioned postgres as a desired platform. I don't know that anyone has done more than mention it. I'd like to see Koha be DB independent. Maybe through Perl DBI? It would be great. Unless Koha needs any special feature of one particular DB/MySQL ...
Hi There, Koha was originally built and designed with PostgreSQL as its database backend, but for a variety of reasons was ported to mysql. So in theory it should just be a matter of changing the DBI connect in C4::Database to use DBD::Pg rather than DBD::MySQL. Having said that, im sure some mysqlisms have crept into the code over the last 2-3 years. So im sure a little bit of code cleanup will be needed as well.
Are you interested in helping with this effort? I hope I can afford it (== have enough spare time)
The more developers the merrier :) Chris -- Chris Cormack chris@katipo.co.nz Programmer 025 500 789 Katipo Communications www.katipo.co.nz
Mandi! Chris Cormack In chel di` si favelave...
Koha was originally built and designed with PostgreSQL as its database
Really?! Why leave postgres in flavour of mysql?!
backend, but for a variety of reasons was ported to mysql. So in theory it should just be a matter of changing the DBI connect in C4::Database to use DBD::Pg rather than DBD::MySQL.
It is not really true. I hate MySQL particulary for his loose SQL parser/syntiax, that accept nearly all. This tipically make programmers lazy. ;-) Aparte the joke, after a quick conversion of the schema, changing DBD::MySQL to DBD::Pg lead to some auth problem, i've to rewrote the connect call to: my $dbh=DBI->connect("DBI:Pg:dbname=$database;host=$hostname",$user,$pass);
Having said that, im sure some mysqlisms have crept into the code over the last 2-3 years. So im sure a little bit of code cleanup will be needed as well.
As i suppose, i've found a bunch of this. e.g., in --- ./cgi-bin/admin/currency.pl~ Mon Jul 1 16:59:55 2002 +++ ./cgi-bin/admin/currency.pl Mon Jul 1 17:09:37 2002 @@ -31,7 +31,7 @@ $searchstring=~ s/\'/\\\'/g; my @data=split(' ',$searchstring); my $count=@data; - my $query="Select currency,rate from currency where (currency like \"$data[0]%\") order by currency"; + my $query="Select currency,rate from currency where (currency like '$data[0]%') order by currency"; my $sth=$dbh->prepare($query); $sth->execute; my @results; Postgres use " for strict escape (inside "", % is a normal character), and ' for normal character enclosing (so inside '' % is a wildcard matching char as supposed). Clearly all file have to be changed, and need to be verified there's no ' character in strings, really common in italian. And in the same file: @@ -155,7 +155,7 @@ # called by add_form, used to insert/modify data in DB } elsif ($op eq 'add_validate') { my $dbh=C4Connect; - my $query = "replace currency (currency,rate) values ("; + my $query = "update currency set (currency,rate) values ("; $query.= $dbh->quote($input->param('currency')).","; $query.= $dbh->quote($input->param('rate')).")"; my $sth=$dbh->prepare($query); REPLACE?! What sort of SQL instruction are REPLACE?! Then i've gived up. ;( dpkg -i mysql-server started installing mysql on my woody server... I think that is possibile to port koha to other DB engine, but a great work have to be done. I suppose: 1) porting the schema to more standard SQL format, using referential integrity (FOREIGN KEY) 2) do some sort of compatibility function to handle date format, seral/auto_increment differencies (if not just handle by DBI/DBD, i've never used these). 3) revising all the code checking for syntiax problem like these exposed, rewriting them in more standard as possible sql. 4) revise all the code to make them happy with referential integrity (for experience changing a schema from a db without RI to one with, expose a bounch of little problem/race condition in db handling code) It is not a patch nor a little work... doable for 1.4.X release?! ;) -- dott. Marco Gaiarin GNUPG Key ID: 240A3D66 Associazione ``La Nostra Famiglia'' http://www.sv.lnf.it/ Polo FVG - Via della Bontà, 7 - 33078 - San Vito al Tagliamento (PN) gaio(at)sv.lnf.it tel +39-0434-842711 fax +39-0434-842797 Supporta il disegno di legge sul software libero! http://www.softwarelibero.it/news/news020417_01.shtml
Marco Gaiarin a écrit:
Mandi! Chris Cormack In chel di` si favelave...
And in the same file:
@@ -155,7 +155,7 @@ # called by add_form, used to insert/modify data in DB } elsif ($op eq 'add_validate') { my $dbh=C4Connect; - my $query = "replace currency (currency,rate) values ("; + my $query = "update currency set (currency,rate) values ("; $query.= $dbh->quote($input->param('currency')).","; $query.= $dbh->quote($input->param('rate')).")"; my $sth=$dbh->prepare($query);
REPLACE?! What sort of SQL instruction are REPLACE?!
REPLACE is a non standard SQL instruction, but very nice : if the primary key exists, it does a "update". If not, it does an "insert". if not primary key in the table... it does not work ;-) (but who does tables without pk ???)
Then i've gived up. ;( dpkg -i mysql-server started installing mysql on my woody server...
Best idea for instance, i think. If it does not give you a heart-break ;-)))
I think that is possibile to port koha to other DB engine, but a great work have to be done. I suppose:
1) porting the schema to more standard SQL format, using referential integrity (FOREIGN KEY) 2) do some sort of compatibility function to handle date format, seral/auto_increment differencies (if not just handle by DBI/DBD, i've never used these). 3) revising all the code checking for syntiax problem like these exposed, rewriting them in more standard as possible sql. 4) revise all the code to make them happy with referential integrity (for experience changing a schema from a db without RI to one with, expose a bounch of little problem/race condition in db handling code)
I FULLY AGREE with point 4 : i once ported a DB from mySQL to interbase/firebird... was a nightmare... worst, we had to maintain both for a while, so i had to develop some script to do this every night ;-\\\\
It is not a patch nor a little work... doable for 1.4.X release?! ;)
Bad news : i think there are a LOT of more important things to do before spending time on this problem (i say this from a librarian point of vue : it doesn't matter for a librarian if we use mySQL, postgreSQL, Oracle or ASCII file...) Note : i think this discussion should be followed in koha-devel@lists.sourceforge.net... (if you're heavily interested, we have a koha-cvs too) -- Paul Koha release manager for 1.4 version.
Mandi! paul POULAIN In chel di` si favelave...
REPLACE is a non standard SQL instruction, but very nice : if the primary key exists, it does a "update". If not, it does an "insert". if not primary key in the table... it does not work ;-) (but who does tables without pk ???)
Oh. I've used MySQL some year ago, but i don't remember this. I've really no comment to do... ;-)))
dpkg -i mysql-server started installing mysql on my woody server... Best idea for instance, i think. If it does not give you a heart-break ;-)))
No, no, apart the joke i simply prefer postgres, i've nothing against MySQL. There's simply no way to compare this two DB engine... O;-)))
It is not a patch nor a little work... doable for 1.4.X release?! ;) Bad news : i think there are a LOT of more important things to do before spending time on this problem (i say this from a librarian point of vue
Ok. In fact really a problem for now is localization, for me a real problem...
Note : i think this discussion should be followed in koha-devel@lists.sourceforge.net... (if you're heavily interested, we have a koha-cvs too)
In this moment, no. I can contribute back an italian translation (if you say me how work translation in 1.4.X), but i've no time to spend in real hacking now: but if my organization adopt koha as i hope... -- dott. Marco Gaiarin GNUPG Key ID: 240A3D66 Associazione ``La Nostra Famiglia'' http://www.sv.lnf.it/ Polo FVG - Via della Bontà, 7 - 33078 - San Vito al Tagliamento (PN) gaio(at)sv.lnf.it tel +39-0434-842711 fax +39-0434-842797 Supporta il disegno di legge sul software libero! http://www.softwarelibero.it/news/news020417_01.shtml
On Thu, 2002-07-04 at 03:03, Marco Gaiarin wrote:
Mandi! Chris Cormack In chel di` si favelave...
Koha was originally built and designed with PostgreSQL as its database
Really?! Why leave postgres in flavour of mysql?!
Kia Ora Marco Without getting into a database war :) Back when we made the decision MySQL offered us some speed improvements over PostgreSQL. It was a long time ago, and I have since use postgres for other projects and am very happy with its performance. Really what would be best would be if Koha could be as database independent as possible. Certainly this was in our minds at the beginning. But as they say "the best laid plans of mice and men oft go astray". So its definitely a goal to get a system that can run with almost any sql database in the background. Though I dont think an immediate goal. Chris -- Chris Cormack chris@katipo.co.nz Programmer 025 500 789 Katipo Communications www.katipo.co.nz
participants (6)
-
Andrea Brugiolo -
Chris Cormack -
Marco Gaiarin -
Pat Eyler -
paul POULAIN -
Zeno Tajoli