[Koha-devel] Orphaned biblioitems

Paul A paul.a at navalmarinearchive.com
Thu May 1 17:42:32 CEST 2014


At 10:31 PM 4/30/2014 -0500, Joy Nelson wrote:
>Paul,
>I can confirm something along the lines of what you are seeing.  I've 
>never been sure if this was cataloger error or Koha error though. What 
>I've seen is that there is a row (i.e. biblionumber) in the biblio table 
>but no corresponding biblionumber row in the biblioitems table.  exists 
>in biblio but not in biblioitems.  Sounds like you are saying that you 
>have a value in biblioitems for a biblionumber but not in the biblio table.Â
>
>My first instinct is that this would be a delete gone bad.  or a merge 
>gone awry.  Perhaps starting there?  I'm curious though if the 
>biblionumber that you are not finding exists in the deleted biblio table???

Thanks for your interest. It is not in either deletedbiblio or 
deletedbiblioitems:
mysql> select * from deletedbiblio where biblionumber=19151;
Empty set (0.00 sec)
mysql> select * from deletedbiblioitems where biblionumber=19151;
Empty set (0.00 sec)

but it is in biblio:

mysql> select * from biblio where biblionumber=19151;
[snip]
|        19151 |               | Toland, John | The Flying Tigers. | 
NULL     | NULL  |      0 | NULL        |          1963 | 2013-01-15 
16:49:15 | 2013-01-15  | Flying Tigers, Clair Chennault, WWII |
+--------------+---------------+--------------+--------------------+----------+-------+--------+-------------+---------------+---------------------+-------------+--------------------------------------+
1 row in set (0.00 sec)

But a staff/admin search 
/cgi-bin/koha/catalogue/search.pl?q=biblionumber%3D19151 gives "No results 
found No results match your search for 'biblionumber=19151' in NMA Catalog."

I don't think the UTF-8 " = " (equals sign) when it leaves my browser but 
returned by Koha? Apache? as " %3D " has any relevance.

Weird.

Best -- Paul

>-joy
>
>
>On Wed, Apr 30, 2014 at 7:22 PM, Paul A 
><<mailto:paul.a at navalmarinearchive.com>paul.a at navalmarinearchive.com> wrote:
>At 10:51 AM 5/1/2014 +1200, Robin Sheat wrote:
>Paul A schreef op wo 30-04-2014 om 10:03 [-0400]:
> > Can anyone please suggest where I could start looking in the code for
> > what
> > might cause orphaned biblioitems?
>
>You're going to have to define what an orphaned biblioitem record is,
>because that SQL query doesn't seem to do anything that I'd relate to
>that term. Do you mean duplicate biblios?
>
>
>Sort of... sorry to be vague, so here's an example, the tail of the query 
>(simplified to remove the html:
>
>mysql> SELECT GROUP_CONCAT(biblionumber SEPARATOR ', ') AS BibNums,
>Â  Â  -> EXTRACTVALUE(marcxml,'//controlfield[@tag="001"]') AS Id FROM 
>biblioitems
>Â  Â  -> GROUP BY Id HAVING count(Id) > 1;
>+---------------------+--------------+
>| BibNums             | Id           |
>+---------------------+--------------+
>[snip]
>| 22969, 19151 Â  Â  Â  Â | 8914106 Â  Â  Â |
>+---------------------+--------------+
>31 rows in set (0.89 sec)
>
>gives me 2 biblio numbers (22969, 19151), both for John Toland's book "The 
>flying tigers" which has the Library of Congress 001. A search in the 
>staff page and the OPAC confirm that we only have one -- both show "The 
>Flying Tigers / (Record no. 22969)"
>
>If I search for the other number as 
>cgi-bin/koha/catalogue/<http://search.pl?q=biblionumber=19151>search.pl?q=biblionumber=19151 
>in the staff page I get "No results found No results match your search for 
>'biblionumber=19151' in NMA Catalog."
>
>BUT... if I specifically go to 
>/cgi-bin/koha/cataloguing/<http://addbiblio.pl?biblionumber=19151>addbiblio.pl?biblionumber=19151, 
>I get a biblio that our cataloguers either overwrote or deleted or 
>whatever... And, because it's not "findable" in the staff page, it cannot 
>be deleted without direct intervention in the MySQL db.
>
>I called it an "orphaned biblioitem" because, without looking for that LoC 
>001 in biblioitems, I would have had no clue that an unused record was 
>"floating around."
>
>
>All it's doing is finding the first biblionumber of a set where members
>have the same 001. This could just be cataloguing the same thing twice,
>or records with badly generated 001 entries, or something along those
>lines.
>
>
>I'm convinced that your thought "cataloguing the same thing twice" is 
>correct -- quite often our cataloguers use Z39.50 to update/overwrite a 
>biblio, but they swear blind that they always delete any previous record 
>that still appears after re-indexing.
>
>That's why I'm intrigued about these "orphans"
>
>Thanks for your interest and best regards -- Paul
>_______________________________________________
>Koha-devel mailing list
><mailto:Koha-devel at lists.koha-community.org>Koha-devel at lists.koha-community.org
>http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
>website : <http://www.koha-community.org/>http://www.koha-community.org/
>git : <http://git.koha-community.org/>http://git.koha-community.org/
>bugs : <http://bugs.koha-community.org/>http://bugs.koha-community.org/
>
>
>
>
>--
>Joy Nelson
>Director of Migrations
>
><http://bywatersolutions.com>ByWater Solutions
>Support and Consulting for Open Source Software
>Office: Fort Worth, TX
>Phone/Fax (888)900-8944
><http://bywatersolutions.com/what-is-koha/>What is Koha?

---
Maritime heritage and history, preservation and conservation,
research and education through the written word and the arts.
<http://NavalMarineArchive.com> and <http://UltraMarine.ca>



More information about the Koha-devel mailing list