<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
<article>
  <title>Migrating to Koha ver. 2.0.0</title>

  <articleinfo>
    <date>2004-12-17</date>

    <author>
      <firstname>Stephen</firstname>

      <surname>Hedges</surname>

      <email>shedges AT skemotah.com</email>
    </author>

    <revhistory>
      <revision>
        <revnumber>2.0.0p1</revnumber>

        <date>2004-12-17</date>

        <authorinitials>sh</authorinitials>

        <revdescription>
          <para>Minor changes, mostly in the Copyright and License
          section</para>
        </revdescription>
      </revision>

      <revision>
        <revnumber>2.0.0</revnumber>

        <date>2004-11-08</date>

        <authorinitials>sh</authorinitials>

        <revdescription>
          <para>Initial XML markup of HTML document</para>
        </revdescription>
      </revision>
    </revhistory>
  </articleinfo>

  <section>
    <title>Using this document</title>

    <section>
      <title id="copyright">Copyright and License</title>

      <para>Copyright 2004 Stephen Hedges <email>shedges (at)
      skemotah.com</email></para>

      <para>This document is related to Koha and is licensed to you under the
      GNU General Public License version 2 or later (<ulink
      url="http://www.gnu.org/licenses/gpl.html">http://www.gnu.org/licenses/gpl.html</ulink>).
      Koha-related documents may be reproduced and distributed in whole or in
      part, in any medium physical or electronic, as long as this copyright
      notice is retained on all copies.</para>

      <para>You may create a derivative work and distribute it provided that
      you: <orderedlist>
          <listitem>
            <para>License the derivative work with this same license, or the
            Linux Documentation Project License (<ulink
            url="http://www.tldp.org/COPYRIGHT.html">http://www.tldp.org/COPYRIGHT.html</ulink>).
            Include a copyright notice and at least a pointer to the license
            used.</para>
          </listitem>

          <listitem>
            <para>Give due credit to previous authors and major
            contributors.</para>
          </listitem>
        </orderedlist></para>

      <para>Commercial redistribution is allowed and encouraged; however, the
      author would like to be notified of any such distributions.</para>
    </section>

    <section>
      <title id="disclaimer">Disclaimer</title>

      <para>No liability for the contents of this document can be accepted.
      Use the concepts, examples and information at your own risk. There may
      be errors and inaccuracies, that could be damaging to your system.
      Proceed with caution, and although this is highly unlikely, the
      author(s) do not take any responsibility.</para>

      <para>All copyrights are held by their by their respective owners,
      unless specifically noted otherwise. Use of a term in this document
      should not be regarded as affecting the validity of any trademark or
      service mark. Naming of particular products or brands should not be seen
      as endorsements.</para>
    </section>
  </section>

  <section>
    <title>Introduction</title>

    <section>
      <title>What is Koha?</title>

      <para><application>Koha</application> version 2.0.0 is an open source
      integrated library system (ILS) for automating a lending library. It has
      all of the basic features needed to run a library, handling:</para>

      <itemizedlist>
        <listitem>
          <para>an online public access catalog (OPAC) of the library's
          holdings;</para>
        </listitem>

        <listitem>
          <para>a database of library users;</para>
        </listitem>

        <listitem>
          <para>issuing books to borrowers and returning books to the
          collection;</para>
        </listitem>

        <listitem>
          <para>borrower requests for library items;</para>
        </listitem>

        <listitem>
          <para>orders from vendors;</para>
        </listitem>

        <listitem>
          <para>book budgets;</para>
        </listitem>

        <listitem>
          <para>transfers between library branches;</para>

          <para>and most other functions associated with operating a lending
          library.</para>
        </listitem>
      </itemizedlist>

      <para><application>Koha</application> ver.2.0.0 supports MARC21 and
      UNIMARC bibliographic records. While there are still a few ILS products
      that use their own format for storing bibliographic data, most
      commercial products have adopted some version of the venerable MARC
      (MAchine Readable Cataloging) record standard. Beginning with version
      2.0.0, <application>Koha</application> supports MARC records,
      specifically records following the <ulink
      url="http://www.loc.gov/marc/">MARC21</ulink> and <ulink
      url="http://www.ifla.org/VI/3/p1996-1/sec-uni.htm">UNIMARC</ulink>
      standards.</para>

      <para><application>Koha</application> is currently in use in several
      small to medium size libraries with as many as 130,000 bibliographic
      records and 40,000 borrower records. At the time of this writing (early
      2004), it lacks support for Library of Congress classification, using
      the Dewey Decimal System instead, meaning that it is best-suited for
      schools and public libraries. The current code is maintained on <ulink
      url="http://sourceforge.net/projects/koha">Sourceforge</ulink>.</para>
    </section>

    <section>
      <title>Why Change to Koha?</title>

      <para>The main attraction of <application>Koha</application> is that it
      is free, since it is open source software. It is best to think of it as
      "free to change" however, rather than "free of cost" It is possible to
      set up a functioning <application>Koha</application> system without
      spending any money, but you will still spend more time on the
      implementation than you would with a commercial ILS (where you are
      paying the software vendor to set it up for you), and you will need to
      have a pretty fair knowledge of web server software (usually <ulink
      url="http://www.apache.org/">Apache</ulink>) and the <ulink
      url="http://www.perl.org/">Perl</ulink> programming language in order to
      configure some parts of <application>Koha</application>. Some knowledge
      of <ulink url="http://www.mysql.com/">MySQL</ulink> is also handy for
      database maintenance chores. Most libraries should probably plan on
      investing time, training, and some money before they have
      <application>Koha</application> up and running. That being said,
      <application>Koha</application> is still much less expensive than
      commercial library software, especially when you consider that there are
      no annual license fees.</para>

      <para>The best reason to migrate from a commercial system to
      <application>Koha</application> is the fact that you will have complete
      control over your library software. Because the entire source code is
      open, a library can modify <application>Koha</application> to do things
      as the library wants them done. Commercial systems must aim their
      research and development for the "middle of the market," where most of
      their business can be found. But a library that wants to surpass the
      capabilities of most other libraries will find that
      <application>Koha</application> provides the freedom to try boldly
      imaginative innovations in library service.</para>
    </section>
  </section>

  <section>
    <title>Preparations</title>

    <section>
      <title>Prerequisites</title>

      <para>This document assumes that you have already installed a
      <application>Koha</application> system and have an existing ILS, and now
      wish to transfer your data from the old system to
      <application>Koha</application>. There are no instructions in this
      document, therefore, for installing and configuring the basic
      <application>Koha</application> parameters. (The most recent instruction
      set should be available at <ulink
      url="http://www.koha.org/manual">koha.org/manual</ulink>. There is also
      a very good guide for installing <application>Koha</application> on
      Debian available from <ulink
      url="http://www.kohadocs.org/Installing_Koha_on_Debian_Woody.html">Joshua
      Ferraro</ulink>.) Nor are there any instructions for entering new data
      or using <application>Koha</application>'s Z39.50 client to retrieve
      MARC records from a Z39.50 server. If you are planning to build such
      "new" data instead of transferring data from an existing system,
      however, parts of this document will still be helpful in explaining how
      <application>Koha</application> stores bibliographic and patron
      data.</para>

      <para>Once you have installed the software and are able to run it, you
      will need to set up your system parameters on the administration page
      (<filename>cgi-bin/koha/admin-home.pl</filename>). Some of these, such
      as the book funds and budget, currencies, authorized values, etc., can
      be done if and when you choose to use those features of
      <application>Koha</application>. Others need to be done before you can
      import data into <application>Koha</application> and use it. These
      essential parameters are:</para>

      <itemizedlist>
        <listitem>
          <para>Item types;</para>
        </listitem>

        <listitem>
          <para>MARC tag structure (and Koha to MARC links);</para>
        </listitem>

        <listitem>
          <para>Library branches;</para>
        </listitem>

        <listitem>
          <para>Borrower categories;</para>
        </listitem>

        <listitem>
          <para>Stop words; and</para>
        </listitem>

        <listitem>
          <para>System preferences.</para>
        </listitem>
      </itemizedlist>

      <section>
        <title>Item Types</title>

        <para>The item types are the "categories" into which your library
        items fall. For instance, you probably want to have videocassettes in
        a different category from non-fiction books, and mysteries in a
        different category from children's picture books. If you already are
        using a commercial ILS, you almost certainly already have all of your
        materials divided up into such categories. Now you need to tell
        <application>Koha</application> what your categories are.</para>

        <para>This is more important than it sounds. Much of
        <application>Koha</application> simply does not work right unless your
        item types are defined and every item has some type designated. Small
        things like loan periods and item counts become big headaches if you
        haven't set up your item types. There's good reason for this being at
        the top of the <application>Koha</application> parameters page!</para>

        <para>As you add item types to <application>Koha</application>, you
        should be aware that the type code is limited to four characters. This
        code is rarely displayed by <application>Koha</application>; instead
        the description of the type will be what users see. Loan length is
        specified as a number of (calendar) days and the rental charge is just
        what it sounds like, any amount you might charge to users for
        borrowing items of a certain type (like videos).</para>

        <para>Renewals allowed is a yes/no question on the administration page
        (check the box if items of this type can be renewed). What actually
        happens when the item type is saved is that a number is saved in the
        <varname>renewalsallowed</varname> column in the
        <varname>itemtypes</varname> table of the
        <application>Koha</application> <application>MySQL</application>
        database: yes=1 and no=0. But this number is also used by the code to
        determine how many times an item can be renewed. If your library
        allows items to be renewed more than once, then you will have to
        manually edit the <varname>itemtypes</varname> table to reflect this.
        For example, if you allow some item types to be renewed twice, you
        need to manually change the value of
        <varname>renewalsallowed</varname> from 1 to 2.</para>
      </section>

      <section>
        <title>MARC tag structure</title>

        <para><application>Koha</application> allows you to specify which MARC
        tags you want to use and which you want to ignore. When you downloaded
        and installed <application>Koha</application>, you also got the entire
        list of MARC21 tags and subfields in current use. Now you need to use
        the administration page to edit this list and tell
        <application>Koha</application> which tags you want to use and how you
        want to use them, or modify the tags to conform to UNIMARC
        standards.</para>

        <para>If you are CERTAIN that you will never use a MARC tag, then you
        can delete it, but since this will not result in any appreciable
        improvement in performance, it is probably better to leave it. There
        will be tags you want to add, however. If you are using older MARC
        tags that are not in the list of tags supplied with
        <application>Koha</application>, then use the MARC tag structure
        administration page
        (<filename>cgi-bin/koha/admin/marctagstructure.pl</filename>) to add
        them. Similarly, you will probably need to add the holdings tag you
        currently use, or at least check the subfield structure of the 852 tag
        if you use it for holdings.</para>

        <para>Editing the subfields from the MARC tag structure page is very
        important
        (<filename>cgi-bin/koha/admin/marc_subfields_structure.pl</filename>).
        It is also a very time-consuming process, but one that is absolutely
        necessary if you want your <application>Koha</application>
        installation to behave as intended. As an ilustration, here is a
        possible subfield structure for the 245 "title statement" tag:</para>

        <programlisting>SELECT tagsubfield,kohafield,tab FROM marc_subfield_structure WHERE tagfield=245;
+-------------+-------------------------+------+
| tagsubfield | kohafield               | tab  |
+-------------+-------------------------+------+
| 6           |                         |   -1 |
| 8           |                         |   -1 |
| a           | biblio.title            |    1 |
| b           | bibliosubtitle.subtitle |    1 |
| c           |                         |    1 |
| f           |                         |   -1 |
| g           |                         |   -1 |
| h           | biblio.abstract         |    1 |
| k           |                         |   -1 |
| n           |                         |    1 |
| p           |                         |    1 |
| s           |                         |   -1 |
+-------------+-------------------------+------+</programlisting>

        <para>To focus on the important information, the query above does not
        show the "lib for librarians" and "lib for OPAC" values (what the
        librarian or OPAC user will see as the subfield description) or the
        repeatable and mandatory values (always either yes or no, represented
        by 1 or 0 in the database). The standard MARC21 subfield descriptions
        and repeatabilty are supplied with <application>Koha</application>,
        and if you require that <emphasis>every one</emphasis> of your MARC
        records have a particular subfield, then you should set that subfield
        to mandatory.</para>

        <para>The "non-standard" information here is the
        <application>Koha</application> field and the tab. The
        <varname>kohafield</varname> column holds any mapping between the MARC
        tables in the database and the original
        <application>Koha</application> tables. MARC records are capable of
        holding much more information than the original, non-MARC
        <application>Koha</application> tables. For standard searching and
        display of brief bibliographic information, however, the original
        <application>Koha</application> tables are usually adequate.
        Therefore, instead of rewriting most of the scripts and modules in
        <application>Koha</application> version 1.9 to make the
        MARC-compatible version 2.0, the developers set up a separate table
        (<varname>marc_subfield_value</varname>) to hold the MARC record data,
        and linked that data to the original <application>Koha</application>
        tables, so the original scripts and modules could still be
        used.</para>

        <para>In the example above, the 245a MARC tag and subfield is linked
        (mapped) to the title column in the original
        <application>Koha</application> <varname>biblio</varname> table, and
        the 245b tag is linked to the <varname>subtitle</varname> column in
        the <varname>bibliosubtitle</varname> table. This means that every
        time a new MARC record is loaded into the database, any information
        that is in the 245a tag is also stored in a corresponding record in
        the <varname>biblio</varname> table, and anything in the 245b tag also
        gets stored in the <varname>bibliosubtitle</varname> table.</para>

        <para>We just said that the original <application>Koha</application>
        tables are "usually adequate" for storing enough bibliographic
        information to construct brief displays. In the example above,
        however, you can see a "work-around" for an instance in which the
        <application>Koha</application> tables were not adequate. In the
        particular installation of <application>Koha</application> from which
        this example was taken, it was decided that it was important to store
        the 245h "material designation" tag in the original
        <application>Koha</application> tables so it could be displayed in the
        first list of results of any search. The material designation would
        tell the searcher if the bibliographic item shown was something other
        than a book, such as a sound recording or a videorecording. Since
        there was no other place to store this information, an otherwise
        unused <application>Koha</application> column was selected (the
        abstract column in the biblio table), and the templates that build the
        search results displays were altered accordingly. (As with Perl, with
        <application>Koha</application> there is always more than one way to
        do things!)</para>

        <para>Once you have decided which MARC subfields to map to
        <application>Koha</application> columns, don't use the MARC tag
        structure page to do it. While it is possible to do it here,
        <application>Koha</application> has a separate <emphasis
        role="bold">Links Koha-MARC DB</emphasis> page
        (<filename>cgi-bin/koha/admin/koha2marclinks.pl</filename>) that you
        can access from the parameters page
        (<filename>admin-home.pl</filename>). This interface is a much easier
        and safer way to set up your MARC to <application>Koha</application>
        mapping.</para>

        <para>The tab column holds either a -1 or a number from 0 to 10. "Tab"
        is used here in the sense of a tab in a web browser, not a tab in a
        text processor. It controls how MARC tags and subfields are grouped
        and displayed when the librarian or cataloger is working with the MARC
        records. Any tags and subfields that you want to have available for
        editing or displaying in the MARC display pages need to have a value
        between 0 and 9. A -1 value means the subfield is ignored when
        building such pages. While you could give all the other subfields
        (with the exception of subfields in your item information tag) the
        same value, all these subfields, whether empty or not, would display
        every time you wanted to edit or display your MARC record, making a
        very long web page! It is best to subdivide your MARC tags and
        subfields into logical groups that are then displayed on separate
        pages in their own "tabs." Here are a couple of examples to illustrate
        one way to do this:</para>

        <programlisting>SELECT tagfield,tagsubfield,tab FROM marc_subfield_structure WHERE tab=0;
+----------+-------------+------+
| tagfield | tagsubfield | tab  |
+----------+-------------+------+
| 010      | a           |    0 |
| 010      | b           |    0 |
| 020      | a           |    0 |
| 022      | a           |    0 |
| 024      | a           |    0 |
| 024      | d           |    0 |
| 028      | a           |    0 |
| 028      | b           |    0 |
| 035      | a           |    0 |
| 082      | a           |    0 |
| 082      | b           |    0 |
| 100      | a           |    0 |
| 100      | d           |    0 |
| 110      | a           |    0 |
+----------+-------------+------+

SELECT tagfield,tagsubfield,tab FROM marc_subfield_structure WHERE tab=1;
+----------+-------------+------+
| tagfield | tagsubfield | tab  |
+----------+-------------+------+
| 245      | a           |    1 |
| 245      | b           |    1 |
| 245      | c           |    1 |
| 245      | h           |    1 |
| 245      | n           |    1 |
| 245      | p           |    1 |
| 246      | a           |    1 |
| 246      | b           |    1 |
| 246      | h           |    1 |
| 250      | a           |    1 |
| 250      | b           |    1 |
| 256      | a           |    1 |
| 260      | a           |    1 |
| 260      | b           |    1 |
| 260      | c           |    1 |
| 300      | a           |    1 |
| 300      | b           |    1 |
| 300      | c           |    1 |
| 300      | e           |    1 |
| 300      | f           |    1 |
| 300      | g           |    1 |
| 440      | a           |    1 |
| 440      | n           |    1 |
| 440      | v           |    1 |
| 490      | x           |    1 |
| 490      | v           |    1 |
| 490      | a           |    1 |
+----------+-------------+------+</programlisting>

        <para>...and so forth. The tab value 10 is reserved for the item
        information from your holdings tag subfield, since this information is
        always displayed on a separate page when editing or displaying MARC
        records.</para>

        <para>There's one other chore you need to take care of before you are
        ready to load data, and that is checking to make sure the
        <varname>barcode</varname> column in the items table is big enough to
        hold your barcodes. If your barcodes are longer than the space
        allowed, you will need to <ulink
        url="http://dev.mysql.com/doc/mysql/en/ALTER_TABLE.html">alter</ulink>
        the items table accordingly.</para>
      </section>
    </section>
  </section>

  <section>
    <title>Extracting and Loading the Data</title>

    <para>Obviously, if you have an existing ILS, you have a lot of valuable
    data that you have collected that you will want to transfer into
    <application>Koha</application>. This process may be the most complex and
    costly part of migrating to <application>Koha</application>, and is
    unfortunately an area where this document will be of relatively little
    help. Each vendor's product handles data differently, with variations in
    database structure, database software, and exporting tools. You may well
    find that you will need top pay your current vendor to prepare your data
    for export, with no recourse to any other solution because their software
    source code is closed and proprietary.</para>

    <para>Still, there are a few general comments about data extraction that
    will be helpful in planning and negotiating the process of exporting your
    data.</para>

    <para>There are basically three types of data you will want to retrieve
    from your old system:</para>

    <itemizedlist>
      <listitem>
        <para>bibliographic records;</para>
      </listitem>

      <listitem>
        <para>user information; and</para>
      </listitem>

      <listitem>
        <para>transaction records.</para>
      </listitem>
    </itemizedlist>

    <section>
      <title>Bibliographic Records</title>

      <para><note>
          <para>Since it is assumed that you are already using a commercial
          ILS and are migrating to the most current version of
          <application>Koha</application>, the following remarks pertain to
          preparing existing MARC records for import into
          <application>Koha</application>.</para>
        </note><application>Koha</application> version 2.0.0 makes extensive
      use of the <ulink
      url="http://marcpm.sourceforge.net/">MARC::Record</ulink> Perl package
      for reading, checking, and processing records for import. This
      collection of Perl modules is designed to work with MARC data in
      transmission format, more accurately "ISO 2709 exchange format," which
      is the MARC data in a format that's easy for computers to pass back and
      forth, though not so easy for humans to read. As the name "ISO 2709"
      implies, this is an international standard for formating bibliographic
      records; your current ILS vendor should have tools available to export
      your bibliographic records in ISO 2709 format (or you should demand to
      know why they are not conforming to international standards!). Getting
      your records -- your complete records, including holdings information --
      in ISO 2709 format is the essential first step in importing your
      bibliographic information into <application>Koha</application>. If for
      some strange reason your current ILS is incapable of dumping records in
      ISO 2709 format, but can do ASCII or some other widely recognized
      format, you may be lucky enough to be able to use some of the <ulink
      url="http://www.loc.gov/marc/marctools.html">tools</ulink> listed by the
      Library of Congress for manipulating MARC records and do the conversion
      to ISO 2709 yourself. Most likely, however, you will find that your
      vendor can supply the tools you need for exporting your records in the
      standard exchange format, though they may ask for a fee before providing
      them.</para>

      <para>Once you have your records in ISO 2709 format, you will work from
      a command line on your <application>Koha</application> server and run
      the <filename>bulkmarcimport.pl</filename> script that comes with
      <application>Koha</application> to load your records. The command to use
      is: <userinput>KohaFolder/intranet/scripts/misc/bulkmarcimport.pl -file
      YourISO2709fileName</userinput> -- where <filename>KohaFolder</filename>
      is the name of the directory or folder where you installed
      <application>Koha</application> (such as
      <filename>/usr/local/koha</filename>) and
      <filename>YourISO2709fileName</filename> is the name (and location) of
      the file of MARC records dumped from your old ILS.</para>

      <para>If you intend to make any changes to the structure of your MARC
      records (for example, you want to change your holdings tag structure),
      this should be done before you import the records. Again, the Library of
      Congress tools may be helpful. If you are reasonably adept at Perl
      programming, or are willing to pay a small fee to someone who is, you
      can also use the MARC::Record Perl package to rebuild your records.
      Either way, the point is the same: make any changes
      <emphasis>before</emphasis> you import your records, by making changes
      to the ISO 2709 file itself.</para>

      <para>The <filename>bulkmarcimport.pl</filename> script is also a handy
      place to start if you want to write a script to import records on a
      regular basis. This might be the case if you use a different utility to
      generate new MARC records and then do regular imports of those records
      into <application>Koha</application>. Because of differences between
      MARC records and <application>Koha</application> records, you will find
      that some pieces of information do not import cleanly with the 'plain'
      <filename>bulkmarcimport.pl</filename> utility. For example, MARC
      publication dates often have a 'c' (for 'copyright') in front, so
      <filename>bulkmarcimport.pl</filename> will place 'c1999' in the
      <application>Koha</application> publication date column in the database.
      (This is assuming that you have mapped MARC tag 260c to
      <varname>biblioitems.publicationyear</varname>.)
      <application>Koha</application> can select catalog records by
      publication year, but only if the publication year is a number, so
      entries like 'c1999' would not be selected. While it is easy enough to
      correct this after the initial import of your records by using the
      <application>MySQL</application> <ulink
      url="http://dev.mysql.com/doc/mysql/en/String_functions.html">TRIM</ulink>
      function, you won't want to be doing this kind of 'clean-up' work on a
      regular basis, when you can modify the
      <filename>bulkmarcimport.pl</filename> script to do it when the records
      are loaded.</para>

      <para>As of this writing, the <application>Koha</application> import
      process does not handle multiple subject entries very well. In general,
      while a MARC record may have many subject entries, only one currently
      gets loaded into the <application>Koha</application> subjects table
      (<varname>bibliosubject</varname>). Again, this can be remedied by
      modifying the <filename>bulkmarcimport.pl</filename> script if you are
      good at Perl. (Or, at the risk of being repetitious, you are willing to
      hire someone who is.)</para>

      <note>
        <para>Since this document was first written, newer versions of
        <application>Koha</application> have been released which do catalog
        searches directly against the MARC record, instead of the old
        <application>Koha</application> tables, so loading of data into the
        subjects table is less important.</para>
      </note>

      <para>If you are getting ready to do some complex things with your
      records, you need to know a little about
      <application>Koha</application>'s database tables for storing
      records:</para>

      <programlisting>+-------------------------+
| Bibliographic Tables    |
+-------------------------+
| additionalauthors       |
| biblio                  |
| biblioanalysis          |
| biblioitems             |
| bibliosubject           |
| bibliosubtitle          |
| bibliothesaurus         |
| catalogueentry          |
| deletedbiblio           |
| deletedbiblioitems      |
| deleteditems            |
| items                   |
| itemsprices             |
| marc_biblio             |
| marc_blob_subfield      |
| marc_subfield_table     |
| marc_word               |
+-------------------------+</programlisting>

      <para>Many of the table names are self-explanatory, but some are not.
      The three primary 'old-Koha' tables are; <varname>biblio</varname>,
      which holds the basic bibliographic information such as title, author,
      etc.; <varname>biblioitems</varname>, which holds more specific
      information such as format, publication year, item type, etc.; and
      <varname>items</varname>, which holds information about specific items,
      such as barcode number, price, date acquired, etc. These three tables
      are linked together by a common '<varname>biblionumber</varname>.' You
      may have a <varname>biblio</varname> entry for <citetitle>The Two
      Towers</citetitle>, several <varname>biblioitems</varname> entries that
      link to it (perhaps one for the book, one for the audio recording, one
      for the large print edition), and multiple <varname>items</varname>
      (copies) for each biblioitem. This structure mirrors some aspects of the
      International Federation of Library Associations' Functional
      Requirements for Bibliographic Records (<ulink
      url="http://www.ifla.org/VII/s13/frbr/frbr.htm">FRBR</ulink>).</para>

      <para>MARC records do not have such a structure, but instead have a
      basic record, which would contain the information that
      <application>Koha</application> would keep in the
      <varname>biblio</varname> and <varname>biblioitems</varname> tables, and
      a holdings tag, which would contain the information in
      <application>Koha</application>'s <varname>items </varname>table.
      <application>Koha</application> stores MARC records in the
      <varname>marc_subfield_table</varname> table, which breaks the record
      down into tags and subfields and then links everything back together
      using a single '<varname>bibid</varname>' for all the pieces. The
      <varname>marc_biblio</varname> table keeps track of the relationship
      between the <varname>bibid</varname> of the MARC record and the
      <varname>biblionumber</varname> of the corresponding information that
      has been stored in the old-Koha tables.</para>

      <para>There are also two general "keyword" tables that serve somewhat as
      indexes, storing each word in a record with the
      <varname>biblionumber</varname> or <varname>bibid</varname> of the
      record it came from. For items cataloged using the old-Koha interface,
      these words are stored in <varname>catalogueentry</varname>, while words
      from MARC records (either imported or cataloged using the MARC
      interface) are stored in <varname>marc_word</varname>.</para>
    </section>

    <section>
      <title>User Information</title>

      <para>Unlike bibliographic records, there is as yet no commonly used
      standard for user records, though the relatively new <ulink
      url="http://www.niso.org/committees/committee_at.html">NCIP</ulink>
      standard addresses some aspects of user information and may become as
      widespread as MARC records someday. Meanwhile, this is an area where you
      will have to dig out as much information as possible from your existing
      database, using whatever means possible. If you are fortunate enough to
      have some sort of export utility with you current ILS, you just need to
      determine that it exports all the data you want. Most likely, however,
      you have no such utility and will have to either access your database
      directly and dump the data you need (if possible) or ask your current
      vendor to do it for you. In any case, you will want to retrieve the
      following information about your users:</para>

      <itemizedlist>
        <listitem>
          <para>names (first names, last name, and perhaps title);</para>
        </listitem>

        <listitem>
          <para>library card number;</para>
        </listitem>

        <listitem>
          <para>user ID (if different from library card number);</para>
        </listitem>

        <listitem>
          <para>street address;</para>
        </listitem>

        <listitem>
          <para>mailing address, or any other alternate address you might have
          on file;</para>
        </listitem>

        <listitem>
          <para>date of birth (if available);</para>
        </listitem>

        <listitem>
          <para>telephone number;</para>
        </listitem>

        <listitem>
          <para>user category code (e.g. 'A' for adult);</para>
        </listitem>

        <listitem>
          <para>date enrolled (if available);</para>
        </listitem>

        <listitem>
          <para>branch where enrolled (if available);</para>
        </listitem>

        <listitem>
          <para>any status codes (e.g. blocked, bad address, etc.);</para>
        </listitem>

        <listitem>
          <para>user password (if available in plain text);</para>
        </listitem>

        <listitem>
          <para>preferred method of contact (if available);</para>
        </listitem>

        <listitem>
          <para>any notes.</para>
        </listitem>
      </itemizedlist>

      <para>This information will then need to be loaded into the
      <application>Koha</application> <varname>borrowers</varname> table. The
      columns in this table are a little confusing, since the table has been
      expanded at various times to accomodate the needs of libraries needing
      to store more information and therefore needing more columns in the
      table. Here is the current table structure, with some notes on what the
      columns can contain:</para>

      <programlisting>SHOW COLUMNS FROM borrowers;
+------------------+--------------+------+-----+---------+----------------+
| Field            | Type         | Null | Key | Default | Extra          |
+------------------+--------------+------+-----+---------+----------------+
| borrowernumber   | int(11)      |      | MUL | NULL    | auto_increment |
| cardnumber       | varchar(9)   |      | MUL |         |                |
| surname          | text         |      |     |         |                |
| firstname        | text         |      |     |         |                |
| title            | text         | YES  |     | NULL    |                |
| othernames       | text         | YES  |     | NULL    |                |
| initials         | text         |      |     |         |                |
| streetaddress    | text         |      |     |         |                |
| suburb           | text         | YES  |     | NULL    |                |
| city             | text         |      |     |         |                |
| phone            | text         |      |     |         |                |
| emailaddress     | text         | YES  |     | NULL    |                |
| faxnumber        | text         | YES  |     | NULL    |                |
| textmessaging    | text         | YES  |     | NULL    |                |
| altstreetaddress | text         | YES  |     | NULL    |                |
| altsuburb        | text         | YES  |     | NULL    |                |
| altcity          | text         | YES  |     | NULL    |                |
| altphone         | text         | YES  |     | NULL    |                |
| dateofbirth      | date         | YES  |     | NULL    |                |
| branchcode       | varchar(4)   |      |     |         |                |
| categorycode     | char(2)      | YES  |     | NULL    |                |
| dateenrolled     | date         | YES  |     | NULL    |                |
| gonenoaddress    | tinyint(1)   | YES  |     | NULL    |                |
| lost             | tinyint(1)   | YES  |     | NULL    |                |
| debarred         | tinyint(1)   | YES  |     | NULL    |                |
| studentnumber    | text         | YES  |     | NULL    |                |
| school           | text         | YES  |     | NULL    |                |
| contactname      | text         | YES  |     | NULL    |                |
| borrowernotes    | text         | YES  |     | NULL    |                |
| guarantor        | int(11)      | YES  |     | NULL    |                |
| area             | char(2)      | YES  |     | NULL    |                |
| ethnicity        | varchar(50)  | YES  |     | NULL    |                |
| ethnotes         | varchar(255) | YES  |     | NULL    |                |
| sex              | char(1)      | YES  |     | NULL    |                |
| expiry           | date         | YES  |     | NULL    |                |
| altnotes         | varchar(255) | YES  |     | NULL    |                |
| altrelationship  | varchar(100) | YES  |     | NULL    |                |
| streetcity       | text         | YES  |     | NULL    |                |
| phoneday         | varchar(50)  | YES  |     | NULL    |                |
| preferredcont    | char(1)      | YES  |     | NULL    |                |
| physstreet       | varchar(100) | YES  |     | NULL    |                |
| homezipcode      | varchar(25)  | YES  |     | NULL    |                |
| zipcode          | varchar(25)  | YES  |     | NULL    |                |
| userid           | varchar(30)  | YES  |     | NULL    |                |
| password         | varchar(30)  | YES  |     | NULL    |                |
| flags            | int(11)      | YES  |     | NULL    |                |
+------------------+--------------+------+-----+---------+----------------+</programlisting>

      <variablelist>
        <varlistentry>
          <term>borrowernumber</term>

          <listitem>
            <para>This value is automatically generated when a patron is
            added. To add patrons in bulk, however, you may need to generate
            this number manually. For instance, if you put your patron
            information into a comma-delimited file and use
            <application>MySQL</application>'s "LOAD DATA INFILE" command to
            load your data (a very fast operation!), the first comma-delimited
            field should contain a unique borrowernumber, preferably
            sequential.</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>cardnumber</term>

          <listitem>
            <para>the user's library card "number." It does not actually need
            to be a number.</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>surname</term>

          <listitem>
            <para>the user's family name</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>firstname</term>

          <listitem>
            <para>can actually be as many "first" names as necessary</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>title</term>

          <listitem>
            <para>e.g. "Mr."</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>othernames</term>

          <listitem>
            <para>names after the first name can be put here instead of in
            firstname</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>initials</term>

          <listitem>
            <para>the person's initials, e.g. 'John Doe' = 'JD'; rarely used
            and relatively unimportant</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>streetaddress</term>

          <listitem>
            <para>actually the mailing address; see also physstreet</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>suburb</term>

          <listitem>
            <para>useful in some countries</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>city</term>

          <listitem>
            <para>and also the state, etc., any other info needed for the
            mailing address other than the postal code</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>phone</term>

          <listitem>
            <para>the telephone number</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>emailaddress</term>

          <listitem>
            <para>the e-mail address</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>faxnumber</term>

          <listitem>
            <para>the number of the person's fax machine</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>textmessaging</term>

          <listitem>
            <para>contact information for any text messaging device</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>altstreetaddress</term>

          <listitem>
            <para>street address of the person's alternate contact
            (contactname)</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>altsuburb</term>

          <listitem>
            <para>alternate contact's suburb</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>altcity</term>

          <listitem>
            <para>alternate contact's city (and state/province AND postal
            code)</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>altphone</term>

          <listitem>
            <para>alternate contact's telephone number</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>dateofbirth</term>

          <listitem>
            <para>should be entered in <application>MySQL</application> format
            (yyyy-mm-dd), <application>Koha</application> will convert based
            on your parameters setting</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>branchcode</term>

          <listitem>
            <para>your code for the branch where the person enrolled</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>categorycode</term>

          <listitem>
            <para>your code for the type of member; 'C' is suggested for
            children, since this triggers some of the guarantor options</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>dateenrolled</term>

          <listitem>
            <para>the date when the person enrolled, in
            <application>MySQL</application> format (yyyy-mm-dd).<note>
                <para>You should set this to '0000-00-00' if you have no
                enrollment date. Leaving it blank (NULL) leads to inaccurate
                dates when editing borrower records later.</para>
              </note></para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>gonenoaddress</term>

          <listitem>
            <para>set to '1' if the person has moved without leaving a
            forwarding address</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>lost</term>

          <listitem>
            <para>set to '1' if the person's library card has been reported
            lost</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>debarred</term>

          <listitem>
            <para>set to '1' if the person has been "debarred" or blocked from
            receiving library service for excessive overdues or fines,
            etc.</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>studentnumber</term>

          <listitem>
            <para>a student ID number, but could be used for any ID number
            (e.g. Social Security number in the USA)</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>school</term>

          <listitem>
            <para>the student's school (for use with student number)</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>contactname</term>

          <listitem>
            <para>the name of the person's alternate contact</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>borrowernotes</term>

          <listitem>
            <para>any notes or messages about the person</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>guarantor</term>

          <listitem>
            <para>for children, this is the borrowernumber of the adult parent
            or custodian</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>area</term>

          <listitem>
            <para>a two-letter code set by the library to identify the service
            area in which the person resides (may be omitted)</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>ethnicity</term>

          <listitem>
            <para>useful for libraries that are required to track service to
            ethnic minorities, but easily ignored</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>ethnotes</term>

          <listitem>
            <para>any notes related to ethnicity</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>sex</term>

          <listitem>
            <para>'M' or 'F' (male or female); 'M' is the default</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>expiry</term>

          <listitem>
            <para>the date when the person's membership expires, in
            <application>MySQL</application> format (yyyy-mm-dd)</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>altnotes</term>

          <listitem>
            <para>any notes or messages about the alternate contact</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>altrelationship</term>

          <listitem>
            <para>the nature of the alternate contact, can be 'workplace',
            'relative','friend' or 'neighbour'</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>streetcity</term>

          <listitem>
            <para>goes with physstreet if the person lives in a city other
            than their mailing address</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>phoneday</term>

          <listitem>
            <para>the daytime or "work" telephone number</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>preferredcont</term>

          <listitem>
            <para>a one-letter code indicating the person's preferred contact
            method, e.g. 'E' for e-mail</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>physstreet</term>

          <listitem>
            <para>the actual street address, if the person has a different
            mailing address (e.g. post office box)</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>homezipcode</term>

          <listitem>
            <para>the postal code of the person's physical street
            address</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>zipcode</term>

          <listitem>
            <para>the postal code of the person's mailing address</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>userid</term>

          <listitem>
            <para>this is the username the person has chosen to use to gain
            access to their account through the OPAC</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>password</term>

          <listitem>
            <para>this is the password the person has chosen to use to gain
            access to their account through the OPAC; it cannot be plain text,
            but must be encrypted using MD5 (md5_base64) before
            importing</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>flags</term>

          <listitem>
            <para>these are the person's privileges, which can be set when
            editing their record. The privileges are stored as the decimal
            representation of a binary number, with each binary digit
            indicating whether the privilege is allowed ('1') or not allowed
            ('0'). Typically, you will want to give imported borrowers the
            privileges to borrow books and reserve books for themselves, which
            can be set by inserting the integer 384 in this column.</para>
          </listitem>
        </varlistentry>
      </variablelist>

      <para>The most important pieces of information are the borrowernumber
      and the cardnumber (required), the person's surname and firstname, their
      mailing address, and the branch at which they enrolled. All of the other
      information can be useful but may be omitted without affecting
      <application>Koha</application>'s operation significantly.</para>

      <para>Probably the easiest and fastest way to load the borrower data
      into <application>Koha</application> is to use a simple Perl script or a
      spreadsheet utility to put the information into a comma-separated value
      (csv) file, with the same structure as the
      <application>Koha</application> borrowers file, and then use
      <application>MySQL</application>'s <ulink
      url="http://dev.mysql.com/doc/mysql/en/LOAD_DATA.html">LOAD DATA
      INFILE</ulink> utility to load the data. If using a spreadsheet utility
      to do this, for example, you would create a spreadsheet with a column
      corresponding to each column in the borrowers table, put your borrower
      data into these columns, and save the whole thing in csv format. If you
      used "borrowers.csv" for the name of this file, you would then go into
      <application>MySQL</application> and do: <userinput>mysql&gt; LOAD DATA
      INFILE "borrowers.csv" INTO TABLE borrowers FIELDS TERMINATED BY ','
      ENCLOSED BY '"';</userinput></para>

      <para>This process is fast, loading tens of thousands of borrower
      records in only a couple of seconds.</para>
    </section>

    <section>
      <title>Transaction Records</title>

      <para>Obviously, once you have loaded your bibliographic records and
      your borrower records, you need to know which borrowers have borrowed
      which items, which borrowers have reserves on which items, which
      borrowers owe fines for which items, etc. In other words, you need your
      transaction records, which relate your books to your borrowers.</para>

      <para>As with borrower records, you will have to dig out as much
      information as possible from your existing database, using whatever
      means possible. Most likely, you will have to either access your
      database directly and dump the data you need (if possible) or ask your
      current vendor to do it for you. In any case, you will probably want to
      retrieve the following transaction information (at least):<itemizedlist>
          <listitem>
            <para>items on loan, and to whom they are (and were)
            loaned;</para>
          </listitem>

          <listitem>
            <para>borrowers who are blocked from using the library (and
            why);</para>
          </listitem>

          <listitem>
            <para>borrowers who have bad addresses;</para>
          </listitem>

          <listitem>
            <para>charges owed by borrowers;</para>
          </listitem>

          <listitem>
            <para>items reserved by borrowers.</para>
          </listitem>
        </itemizedlist></para>

      <para>Remember, because transaction records bascially involve some sort
      of relationship between borrowers and items, you want to be sure you
      have already loaded both your bibliographic and user records
      <emphasis>before</emphasis> you load transaction data.</para>

      <para>Here are the <application>Koha</application> database tables that
      store transaction data:<programlisting>+-------------------------+
| Transaction Tables      |
+-------------------------+
| accountlines            |
| accountoffsets          |
| issues                  |
| reserves                |
+-------------------------+</programlisting></para>

      <para>Some of the columns in the <varname>borrowers</varname> table also
      hold some transaction-type data, namely <varname>gonenoaddress</varname>
      (set to "1" if the borrower has moved without leaving a new address),
      <varname>lost</varname> (set to "1" if the borrower has lost their
      library card), <varname>debarred</varname> (set to "1" if the borrower's
      library privileges have been suspended), and
      <varname>borrowernotes</varname>, which can hold any textual information
      about the borrower.</para>

      <para>The <varname>accountlines</varname> and
      <varname>accountoffsets</varname> tables hold information about charges
      which the borrower owes the library:<programlisting>SHOW COLUMNS FROM accountlines;
+-------------------+---------------+------+-----+---------+-------+
| Field             | Type          | Null | Key | Default | Extra |
+-------------------+---------------+------+-----+---------+-------+
| borrowernumber    | int(11)       |      | MUL | 0       |       |
| accountno         | smallint(6)   |      |     | 0       |       |
| itemnumber        | int(11)       | YES  |     | NULL    |       |
| date              | date          | YES  |     | NULL    |       |
| amount            | decimal(28,6) | YES  |     | NULL    |       |
| description       | text          | YES  |     | NULL    |       |
| dispute           | text          | YES  |     | NULL    |       |
| accounttype       | varchar(5)    | YES  |     | NULL    |       |
| amountoutstanding | decimal(28,6) | YES  |     | NULL    |       |
| timestamp         | timestamp(14) | YES  | MUL | NULL    |       |
+-------------------+---------------+------+-----+---------+-------+</programlisting><programlisting> SHOW COLUMNS FROM accountoffsets;
+----------------+---------------+------+-----+---------+-------+
| Field          | Type          | Null | Key | Default | Extra |
+----------------+---------------+------+-----+---------+-------+
| borrowernumber | int(11)       |      |     | 0       |       |
| accountno      | smallint(6)   |      |     | 0       |       |
| offsetaccount  | smallint(6)   |      |     | 0       |       |
| offsetamount   | decimal(28,6) | YES  |     | NULL    |       |
| timestamp      | timestamp(14) | YES  |     | NULL    |       |
+----------------+---------------+------+-----+---------+-------+</programlisting></para>

      <para>For migration purposes, <varname>accountlines</varname> is the
      table that needs to be loaded with your existing data about charges owed
      by users. The <varname>accountoffsets</varname> table stores information
      about payments made against the account. For example, if a borrower owes
      the library $20.00 for a lost book, that information would get loaded
      into the <varname>accountlines</varname> table's
      <varname>borrowernumber</varname>, <varname>itemnumber</varname>,
      <varname>amount</varname> and <varname>amountoutstanding</varname>
      columns. Initially, <varname>amount</varname> and
      <varname>amountoutstanding</varname> are the same. If the borrower then
      makes a $10.00 payment toward this account, the payment amount is stored
      in <varname>accountoffsets.offsetamount</varname> and a new value for
      <varname>accountlines.amountoutstanding</varname> is calculated.</para>

      <para>Probably the most important data you want to move from your
      existing ILS to <application>Koha</application> is the record of which
      books each borrower has. This data gets loaded into the
      <varname>issues</varname> table:<programlisting>SHOW COLUMNS FROM issues;
+-----------------+---------------+------+-----+---------+-------+
| Field           | Type          | Null | Key | Default | Extra |
+-----------------+---------------+------+-----+---------+-------+
| borrowernumber  | int(11)       |      | MUL | 0       |       |
| itemnumber      | int(11)       |      | MUL | 0       |       |
| date_due        | date          | YES  |     | NULL    |       |
| branchcode      | char(4)       | YES  |     | NULL    |       |
| issuingbranch   | char(18)      | YES  |     | NULL    |       |
| returndate      | date          | YES  |     | NULL    |       |
| lastreneweddate | date          | YES  |     | NULL    |       |
| return          | char(4)       | YES  |     | NULL    |       |
| renewals        | tinyint(4)    | YES  |     | NULL    |       |
| timestamp       | timestamp(14) | YES  |     | NULL    |       |
+-----------------+---------------+------+-----+---------+-------+</programlisting></para>

      <para>The column names in this table are mostly self-explanatory. The
      most important for the migration process are the
      <varname>borrowernumber</varname> (which, you'll remember, is
      <emphasis>not</emphasis> the same as the library card number), the
      <varname>itemnumber</varname> (not the same as the barcode number) and
      the <varname>date_due</varname>. If you do not know the
      <varname>branch</varname> where the item was issued, that's OK -- you'll
      still have a record of who has what and when it is due.</para>

      <para>All the dates should be loaded in the yyyy-mm-dd format expected
      by <application>MySQL</application>. The <varname>returndate</varname>
      column will remain empty until the item is returned. Records are
      <emphasis>not</emphasis> deleted from the <varname>issues</varname>
      table when the item is returned -- <application>Koha</application> knows
      the item has been returned by checking for a return date.</para>

      <para>Finally, you'll need to load information about reserved items into
      the <varname>reserves</varname> table:<programlisting>SHOW COLUMNS FROM reserves;
+------------------+---------------+------+-----+------------+-------+
| Field            | Type          | Null | Key | Default    | Extra |
+------------------+---------------+------+-----+------------+-------+
| borrowernumber   | int(11)       |      |     | 0          |       |
| reservedate      | date          |      |     | 0000-00-00 |       |
| biblionumber     | int(11)       |      |     | 0          |       |
| constrainttype   | char(1)       | YES  |     | NULL       |       |
| branchcode       | varchar(4)    | YES  |     | NULL       |       |
| notificationdate | date          | YES  |     | NULL       |       |
| reminderdate     | date          | YES  |     | NULL       |       |
| cancellationdate | date          | YES  |     | NULL       |       |
| reservenotes     | text          | YES  |     | NULL       |       |
| priority         | smallint(6)   | YES  |     | NULL       |       |
| found            | char(1)       | YES  |     | NULL       |       |
| timestamp        | timestamp(14) | YES  |     | NULL       |       |
| itemnumber       | int(11)       | YES  |     | NULL       |       |
+------------------+---------------+------+-----+------------+-------+</programlisting></para>

      <para>Again, most of the column names are self-explanatory. The
      <varname>constrainttype</varname> column is used to indicate whether the
      reserve has been placed on "any" copy (in which case the
      <varname>constrainttype</varname> will be "a" and the
      <varname>biblionumber</varname> will be set) or "one" specific copy (in
      which case the <varname>constrainttype</varname> will be "o" and the
      <varname>itemnumber</varname> will be set). The <varname>found</varname>
      column value is set once the item has been returned and is ready to be
      checked out to the borrower or to be sent to the pick-up branch (which
      is recorded in the <varname>branchcode</varname> column). The
      <varname>priority</varname> column keeps track of who is next on the
      list for the item. Once a reserve has been filled, the priority is set
      to "0."</para>
    </section>

    <section>
      <title>Additional Documentation</title>

      <para>Many of the tools you will use in the process of writing scripts
      and manipulating data have web documentation:<variablelist>
          <varlistentry>
            <term><ulink url="http://dev.mysql.com/doc/">MySQL</ulink></term>

            <listitem>
              <para>the basic commands you will need to work directly with
              your database.</para>
            </listitem>
          </varlistentry>

          <varlistentry>
            <term><ulink url="http://www.perldoc.com/">Perl</ulink></term>

            <listitem>
              <para>the programming language used for
              <application>Koha</application>.</para>
            </listitem>
          </varlistentry>

          <varlistentry>
            <term><ulink url="http://dbi.perl.org/docs/">DBI</ulink></term>

            <listitem>
              <para>the Perl database interface that allows you to include
              <application>MySQL</application> commands in your Perl scripts
              and retrieve data for use in scripts.</para>
            </listitem>
          </varlistentry>

          <varlistentry>
            <term><ulink
            url="http://directory.google.com/Top/Computers/Programming/Internet/CGI/Tutorials/?tc=1">CGI</ulink></term>

            <listitem>
              <para>the Common Gateway Interface that allows Perl scripts to
              send data to, and retrieve data from, a webpage.</para>
            </listitem>
          </varlistentry>

          <varlistentry>
            <term><ulink
            url="http://marcpm.sourceforge.net/">MARC::Record</ulink></term>

            <listitem>
              <para>the Perl module that allows you to manipulate MARC
              records.</para>
            </listitem>
          </varlistentry>

          <varlistentry>
            <term><ulink
            url="http://html-template.sourceforge.net/">HTML::Template</ulink></term>

            <listitem>
              <para>the Perl module that allows you to set up webpage
              templates to display <application>Koha</application> data, or
              modify the default templates to suit your library.</para>
            </listitem>
          </varlistentry>
        </variablelist></para>

      <para>Additional help is also available by sending an e-mail to the
      <ulink url="http://www.koha.org/mailing/">Koha mailing
      list</ulink>.</para>
    </section>
  </section>
</article>