[Koha] Koha VS Home-grown software/database
deckrider at myrealbox.com
Fri Aug 6 10:09:42 NZST 2004
Others may correct me, but I found the easiest thing to is to convert my
data to MARC format.
I'm currently running Debian/Sarge. My experience was not with a
database but with, of all things, someone who stored their data in and
First thing I did was to save this as a CSV file. Based on your email,
I'm guessing you probably can figure out how to do this with your
Then I installed the libxml-csv-perl package. I simply used the 3-line
"Example #1" from "man XML::CSV" against my CVS file to convert it to
From there, I installed xalan and created an XSL file to map my new XML
file to XML that conforms to MARC XML (http://www.loc.gov/MARC21/slim).
Finally, I took the MARC XML file used libmarc-xml-perl_0.65-1_all.deb
to turn it into a traditional MARC record. This was not in Debian/Sarge,
but it was easily made into a package using dh-make-perl.
I know this sounds like many steps, but it was fairly easy, since I
didn't have to do any programming. The hardest thing to was the logical
mapping into MARC records.
On Thu, Aug 05, 2004 at 04:45:16PM -0400, Bill Benedetto wrote:
> Good day.
> I have what I think is a somewhat unusual question about Koha.
> A couple of years ago my daughter and I created a Library
> Database for our grade school library (Kindergarten through 8th
> Since I'm fairly well-versed in the land of Linux, here's the
> infrastructure that we came up with:
> Debian (Woody)
> The librarian just wanted something to catalog the books. She
> didn't want to do check-in/check-out. Nor did she want anything
> more than Title, Author, Keywords, Section (of the library). She
> also just wanted to do the Fiction part of the library so
> CallNumber was pretty basic (something like "TWA 3").
> During this library-system creation, I stumbled across Koha. I
> thought that Koha would be a much better choice than rolling my
> own. Consequently, I spent a fair amount of time trying to
> figure out how to convert my MySQL DB into Koha's.
> Unfortunately, I couldn't figure out how to map from my table
> layout to Koha's table layout.
> Now, time has passed, the Library DB is all created and in use.
> (And the librarian really likes it!) Now, of course, the
> librarian wants a check-in/checkout system. I may be up to the
> task of modifying my DB and scripts to do this but it seems kind
> of silly to roll my own when a great system like Koha already
> So, here's my question, finally.....
> Is it possible for me to take my data and map it to the Koha
> layout? That is, if I start with a mysqldump of my data, can I
> use Perl to mangle it into a mysqldump of data suitable for
> importing into Koha?
> Yeah, yeah. I know. *ANYTHING'S* possible. But could someone
> possibly provide me with enough guidance (or documentation) so
> that I could do the job?
> Here's my table layout:
> CREATE TABLE catalog (
> bookidnum smallint(6) NOT NULL auto_increment,
> title varchar(75) NOT NULL default '',
> author varchar(30) NOT NULL default '',
> keywords varchar(50) NOT NULL default '',
> numcopies tinyint(4) NOT NULL default '1',
> callnumber varchar(10) NOT NULL default '',
> hard_paperback char(1) NOT NULL default 'H',
> section varchar(30) NOT NULL default '',
> PRIMARY KEY (bookidnum),
> UNIQUE KEY bookidnum (bookidnum)
> ) TYPE=MyISAM;
> o The bookidnum has nothing to do with the physical book. It's
> just basically the record number in the DB.
> o keywords consists of a string that looks something like "cats
> christmas" or "mississippi" or "berenstain bears" or
> "dinosaurs holidays". We would really like to keep these
> keywords because that's one of the ways that the
> librarian/user can search for books.
> o numcopies is misnamed and is actually the copy number. The
> first book is copy #1. The second is copy #2. And so on.
> o hard_paperback is just "H" or "P".
> o section looks like one of these:
> Easy Fiction
> Intermediate Fiction
> Easy Non-Fiction
> Intermediate Non-Fiction
> Easy Holidays
> I realize that I'm asking a lot here. What I'm really looking
> for is some kind of one-to-one mapping that says something like
> "Your 'bookidnum' field is really field 'bookno' in table 'booktable'"
> so that I might be able to mangle the data from my output to a
> new input for Koha (rather than have to re-enter all of this
> data). FWIW, we have around 6000 books in this DB.
> I appreciate any guidance that I can get!
> - Bill Benedetto
> Koha mailing list
> Koha at lists.katipo.co.nz
Encrypted Mail Preferred:
Key ID: 8527B9AF
Key Fingerprint: E1B6 40B6 B73F 695E 0D3B 644E 6427 DD74 8527 B9AF
ASCII ribbon campaign:
() against HTML email
/\ against Microsoft attachments
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
Url : http://lists.katipo.co.nz/pipermail/koha/attachments/20040805/96afac19/attachment-0001.pgp
More information about the Koha