MADS Names

From UA Libraries Digital Services Planning and Documentation
Jump to: navigation, search

There are 2 Perl scripts for you to use for interacting with the MADS Names Database when working with batches.

  If you want to work interactively with the database, please see For_Subjects_and_Names!

[ To use the batch scripts, you need ActivePerl installed on your desktop, then run “ppm install DBI” “ppm update DBI” “ppm install DBD-mysql” … in order to use them, as they talk to the database on the libcontent server. Jeremiah can help with this part.]

1) in S:\Metadata\Authorities\FromDatabase you’ll find “”. to run, just click on it. It will regenerate the MADS.txt and MADS.xml in S:\Metadata\Authorities from the database.

  • Open Excel. Click File -> Open and navigate to S:\Metadata\Authorities.
  • Change the dropdown above "Open" to "All Files (*.*)" -- then select MADS.txt and click "Open".
  • Change the File Origin value to "65001: Unicode (UTF-8)" and click "Next".
  • Change the Text Qualifier value to "{none}" and click "Finish".
  • Save as ".xlsx" type file. You may now use this spreadsheet normally.

2) In S:\Metadata\Authorities\ToDatabase you’ll find “”.

    You can use this to modify what’s in the database.   How?
  • When working with the MADS.txt file in Excel:
  • Start a separate Excel instance and open a blank worksheet. You will copy into this blank worksheet any lines you want to add, delete, or change.
    • To avoid confusion, it might be best to copy the top line with the header information to the blank worksheet. (You don't want to add "Mrs." as a date, for example)
    • Those you want to add: put ADD in the first column (you won’t have a database number anyway).
    • Those you want to delete: put DELETE in the status column.
    • Those you want to change: just copy the line as you want it to go in the database. The script will use the database number to find and change the entry.
  • When you’re done with the new spreadsheet, save it as databaseChanges.xlsx in S:\Metadata\Authorities\ToDatabase.
  • Use Excel Converter to export it. The script will expect the file it’s picking up to be called databaseChanges.txt
  • Run by clicking on it. (Found in S:\Meatada\Authorities\ToDatabase)
   If it has errors, it will write those to errors.txt in that directory;  lines that it can’t process will be written to failures.txt.

WARNING: all file encodings and entries must be in UTF8. ALSO: don’t try to add alternate names (in separate lines) for entries that haven’t yet been added to the database, as there’s no database number for them to reference. You CAN add alternate names in the alternateNames column for new entries or changed entries. If this gives you trouble, save copies of the files you tried to upload.

If you run into trouble: just collect all the changes/additions/deletions you want to make, and contact Jody.

  • Please do NOT make updates to the OLD MADSReadable.txt and old MADS.xml. I’ve put them into S:\Metadata\Authorities\old for reference.
  • The versions of MADS.xls, MADS.txt and MADS.xml in S:\Metadata\Authorities are those just generated by the either updateDbase or spitMads.

ALSO: If you use OpenOffice Calc *instead* of Excel, it won’t muck up the dates.

Whenever you run updateDbase, it will re-export the MADS text and xml files.

The Column Headings expected for these files are as follows, in this order:

  • “dnum” – Database Number. An auto-incrementing integer unique to the entry.
  • “namePart” – The name entry, without dates or honorifics (such as Mr., Mrs., etc.) or generational terms (Jr., Sr., III, etc.)
  • “nameDate” – the dates associated with the name (usually {birthdate}-{deathdate} in years, though one of them may be missing or unknown.)
  • “nameType” – Type of name as restricted by MODS, such as “personal”, “conference”, “corporate”, "geographic". Currently, “family” is not in use.
  • “typeAuth” - Authority type: currently we support “naf” if there’s an LCCN number; otherwise, “local” is the correct entry.
  • “nameTerms” – honorifics or generational terms, semi-colon separated, such as “Captain; Jr.” or “Mrs.”, or “Dr.; Sr.”
  • “creationDate” – the date this entry was added to the database, in yyyy-mm-dd form
  • “changeDate” – the date this entry was changed in the database, in yyyy-mm-dd form
  • “LCCN” – the LCCN number if known
  • “VIAF” – the VIAF number if known
  • “notes” -- any additional notes you want to add that will help others
  • “status” – “C” if checked; otherwise this is currently left blank.
  • “collection” – optional field for collection number where this name was first found.
  • “source” – optional field for item number where this name was first found.
  • “altFor” - may contain a single Database Number (dnum) referencing the correct entry to be used in place of this alternative name. When entering a nickname, be sure to reference the correct database number here.
Personal tools