I had hoped to parse the MARC records into the JSON documents that are required by /instance-storage/instances, /holdings-storage/holdings, and /items-storage/items (including the UUIDs that connect items w/holdings and instances) and save them in a MySQL db but FOLIO seems to need to create those UUIDs itself. So all I'm doing here is putting the MARC records, and the item data that is not included in the 999, in these two MySQL db tables: 


mysql> describe marcRecords;
+---------------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+---------------+-------------+------+-----+---------+-------+
| marc | mediumtext | YES | | NULL | |
| json | mediumtext | YES | | NULL | |
| instanceId | varchar(36) | YES | | NULL | |
| shadowFlag | varchar(1) | YES | | NULL | |
| catalogedDate | varchar(8) | YES | | NULL | |
| marcHoldings | varchar(1) | YES | | NULL | |
| catalogKey | int(11) | NO | PRI | NULL | |
+---------------+-------------+------+-----+---------+-------+

mysql> describe itemData;
+-------------------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------------------+-------------+------+-----+---------+-------+
| analyticPosition | int(11) | YES | | NULL | |
| callNumShadowFlag | varchar(1) | YES | | NULL | |
| circNote | mediumtext | YES | | NULL | |
| publicNote | mediumtext | YES | | NULL | |
| staffNote | mediumtext | YES | | NULL | |
| itemCat1 | varchar(10) | YES | | NULL | |
| itemCat2 | varchar(10) | YES | | NULL | |
| itemShadowFlag | varchar(1) | YES | | NULL | |
| catalogKey | int(11) | YES | | NULL | |
| barcode | varchar(16) | NO | PRI | NULL | |
+-------------------+-------------+------+-----+---------+-------+

For MARC Holdings Records I've added a marcHoldings column to the marcRecords table to give bibLoad.pl a heads up that there is data in the marcHoldingsRecords table

mysql> describe marcHoldingsRecords;
+------------+-------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+------------+-------------+------+-----+---------+----------------+
| catalogKey | int(11) | YES | | NULL | |
| m852c | varchar(10) | YES | | NULL | |
| m863 | mediumtext | YES | | NULL | |
| m866 | mediumtext | YES | | NULL | |
| m867 | mediumtext | YES | | NULL | |
| m868 | mediumtext | YES | | NULL | |
| id | int(11) | NO | PRI | NULL | auto_increment |
+------------+-------------+------+-----+---------+----------------+


m852c is the location per the ILS and will have to be translated into a FOLIO location by bibLoad.pl - the data in rows m863, m866, m867, and m868 contain pipe-delimited data like so:

  • m863    : enumeration|chronology|staffNote|publicNote||
  • m866-8 : holdingsStatement|note||



  • No labels