[OPEN-ILS-GENERAL] Bulk deletion of authority records from Evergreen database?
Yamil Suarez
ysuarez at berklee.edu
Thu Oct 29 10:24:28 EDT 2015
Linda,
I have some experience with authorities, though I did not write any of
the underlying code so I hope others chime in. My uneducated
impression that I have so far is that within the database authorities
records share a lot of the design of of bib records.
For example, the main table for bib records and auths are both called
"record_entry" though they have their own separate DB schema
(authority.record_entry v.s. biblio.record_entry).
Therefore one approach to batch delete authorities is to use SQL to
set the authority.record_entry boolean column "deleted" to a value of
"true." I have seen this approach taken with bibs, though of course in
this approach "deleted = true" the bib or authority record is not
actually destroyed but just hidden from view.
I would want to hear from someone else to see if there are other
authority tables that should be updated too for this "deleted"
approach or perhaps this is good enough.
Also, at this point I do not know how to write a SQL code that would
only list authorities that have not been linked, so that you only
delete the ones you want.
Of course there is a way with SQL to actually erase/destroy the
authority records, but I would first want to hear from others if there
are additional authority related tables/rows (besides
authority.record_entry) that should also be deleted at the same time.
Therefore keeping your database free from unnecessary table rows. BTW,
one reason you see a lot of EG folks use the "deleted = true" approach
instead of completely erasing records is to guard against accidental
deletions, because this way you can easily undo a deletion.
Hope this helps, and if it does I can supply some sample SQL code to
get you started.
Good luck,
Yamil
On Thu, Oct 29, 2015 at 2:31 AM, Linda Jansova <skolkova at chello.cz> wrote:
> Hi all,
>
> We are on 2.8.2 and just trying to delete authority records that are not
> attached to bib records (or even remove all authority records from our
> database as a vast majority of these records have been imported by accident
> when one import file was confused with another).
>
> Any ideas how to perform this task safely?
>
> Thank you in advance for any clues :-)!
>
> Linda
--
--------------------------------
Yamil Suarez, MCS
Library System Administrator/Developer
Stan Getz Library
Berklee College of Music
1140 Boylston St
Boston, MA 02215
ysuarez at berklee.edu
617-747-2617
More information about the Open-ils-general
mailing list