[OPEN-ILS-DEV] Authority Record Linking script
Mike Rylander
mrylander at gmail.com
Mon May 16 16:32:21 EDT 2011
On Mon, May 16, 2011 at 4:23 PM, Duimovich, George
<George.Duimovich at nrcan-rncan.gc.ca> wrote:
> Hello,
>
> The authority_control_fields.pl script provides handy tool to create
> authority record / bib record linkages.
>
> In earlier upgrade testing I removed duplicates from our production
> "authority.record_entry" table using a delete by id statement. Duplicates
> were identified and then rows were deleted from entries that had known lower
> quality sources, etc.
>
> Problem: my delete query against "authority.record_entry" didn't seem to
> auto-update the related index entries in "authority.full_rec" -- we can
> still find rows in "authority.full_rec" that point to authority records that
> had been deleted. And since the "authority_control_fields.pl" script uses
> those values from "authority.full_rec" it runs into trouble when it finds a
> reference to a value's id that is no longer in "authority.record_entry". So
> I've removed duplicates from record_entry, but full_rec still has references
> to duplicate index values.
>
> Question: How can I completely refresh / rebuild the "authority.full_rec"
> table so that we have a clean table for "authority_control_fields.pl" to
> use?
>
You could, but you could instead just:
DELETE FROM authority.full_rec WHERE NOT EXISTS (SELECT id FROM
authority.record_entry WHERE NOT DELETED AND authority.record_entry.id
= authority.full_rec.record);
or similar.
However, it would probably be better to teach
authority_control_fields.pl to ignore deleted authorities instead.
--
Mike Rylander
| VP, Research and Design
| Equinox Software, Inc. / Your Library's Guide to Open Source
| phone: 1-877-OPEN-ILS (673-6457)
| email: miker at esilibrary.com
| web: http://www.esilibrary.com
More information about the Open-ils-dev
mailing list