-- ***********************************************************************
-- KOHA UNIMARC STANDARD DEFAULT BIBLIOGRAPHIC FRAMEWORK
--
-- Pretest Version 0.0.1
-- 2007-11-05
--
-- edited
-- with much more work remaining
-- (PLEASE SEE WARNING BELOW)
-- by thd
--
-- originally compiled
-- by Roberto Sturman
--
-- from
--
-- UNIMARC manual : bibliographic format 1994 / IFLA Universal
-- Bibliographic Control and International MARC Core Programme (UBCIM). -
-- "The following list represents the state of the format as at 1 March
-- 2000.  It includes the changes published in Update 3." -
-- http://www.ifla.org/VI/3/p1996-1/sec-uni.htm .
-- 2006-03-15 a

-- From Zeno Tajoli (2010-08-12):
--
-- Improved default id Koha field (090) and koha date field (099). 
-- Insert link to sql coloum biblio.biblionumber in tag 001
-- Insert the use of 942, local data
-- Insert a standard minimun on 995 (holding field)

-- From Bernardo Gonzalez Kriegel (2013-12-26)
--
-- Add/update fields/subfields
-- UNIMARC manual: bibliographic format (2008)
-- [http://archive.ifla.org/VI/8/unimarc-concise-bibliographic-format-2008.pdf]
-- with updates up to 2012 [http://www.ifla.org/node/7974]
-- ***********************************************************************



-- ***********************************************************************


-- ****************************************************************************
-- WARNING
-- RISK OF DATA LOSS
--
-- Modestly corrected and augmented.  Missing many elements.  The work of the
-- original compiler had been done before significant improvements to Koha
-- MARC frameworks implementation had been introduced in 2006 for displaying,
-- editing, and preserving record data.
--
-- The documentation cited by the original compiler is known to be out of date
-- and incomplete.  Furthermore, the original compiler did not include all
-- fields and subfields from the documentation he consulted.
--
-- Completely unsafe for production use without significant correction and
-- augmentation.  These problems could be fixed but a few days work would be
-- required to fix them completely. -- thd.
-- ****************************************************************************




-- ******************************************************
-- KOHA RECORD AND HOLDINGS MANAGEMENT FIELDS/SUBFIELDS.
-- ******************************************************


-- Current Record ID Field/Subfields (090)

insert  into `marc_tag_structure`(`tagfield`,`liblibrarian`,`libopac`,`repeatable`,`mandatory`,`authorised_value`,`frameworkcode`) values
	('090','System Control Numbers (Koha)','System Control Numbers (Koha)',0,0,'','');

insert  into `marc_subfield_structure`(`tagfield`,`tagsubfield`,`liblibrarian`,`libopac`,`repeatable`,`mandatory`,`kohafield`,`tab`,`authorised_value`,`authtypecode`,`value_builder`,`isurl`,`hidden`,`frameworkcode`,`seealso`,`link`,`defaultvalue`) values 
	('090','a','Koha biblioitem number (autogenerated)','Koha biblioitem number (autogenerated)',0,0,'biblioitems.biblioitemnumber',9,'','','',0,-5,'',NULL,'','');

-- Local date field/Subfields (099)

insert  into `marc_tag_structure`(`tagfield`,`liblibrarian`,`libopac`,`repeatable`,`mandatory`,`authorised_value`,`frameworkcode`) values
	('099','local dates','',0,0,'','');

insert  into `marc_subfield_structure`(`tagfield`,`tagsubfield`,`liblibrarian`,`libopac`,`repeatable`,`mandatory`,`kohafield`,`tab`,`authorised_value`,`authtypecode`,`value_builder`,`isurl`,`hidden`,`frameworkcode`,`seealso`,`link`,`defaultvalue`) values 
	('099','c','Date of creation (bib. record)','Date of creation (bib. record)',0,0,'biblio.datecreated',0,'','','',0,-5,'',NULL,'','');
 
insert  into `marc_subfield_structure`(`tagfield`,`tagsubfield`,`liblibrarian`,`libopac`,`repeatable`,`mandatory`,`kohafield`,`tab`,`authorised_value`,`authtypecode`,`value_builder`,`isurl`,`hidden`,`frameworkcode`,`seealso`,`link`,`defaultvalue`) values
	('099','d','Last modified date (bib. record)','Last modified data (bib. record)',0,0,'biblio.timestamp',0,'','','',0,-5,'',NULL,'','');


-- Current primary biblioitems Field/Subfields (942)


INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeatable`, `mandatory`, `authorised_value`, `frameworkcode`) VALUES
		('942', 'ADDED ENTRY ELEMENTS (KOHA)', 'ADDED ENTRY ELEMENTS (KOHA)', 0, 0, '', '');

INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian`, `libopac`, `repeatable`, `mandatory`, `kohafield`, `tab`, `authorised_value`, `authtypecode`, `value_builder`, `isurl`, `hidden`, `frameworkcode`, `seealso`, `link`, `defaultvalue`) VALUES
		('942', '0', 'Koha issues (borrowed), all copies', 'Koha issues (borrowed), all copies', 0, 0, 'biblioitems.totalissues', 9, '', '', '', NULL, -5, '', '', '', NULL),
		('942', '2', 'Source of classification or shelving scheme', 'Source of classification or shelving scheme', 0, 0, 'biblioitems.cn_source', 9, '', '', '', NULL, 0, '', '', '', NULL),
		('942', '6', 'Koha normalized classification for sorting', 'Koha normalized classification for sorting', 0, 0, 'biblioitems.cn_sort', -1, '', '', '', 0, 7, '', '', '', NULL),
		('942', 'c', 'Koha item type', 'Koha item type', 0, 1, 'biblioitems.itemtype', 9, 'itemtypes', '', '', NULL, 0, '', '', '', NULL),
		('942', 's', 'Serial record flag', 'Serial record', 0, 0, 'biblio.serial', 9, '', '', '', NULL, -5, '', '', '', NULL);


-- ******************************************************


-- Recommandation 995 is designed for interlibrary loan.  It is not designed
-- for holdings even if libraries have used it for holdings.

-- Original items Field/Subfields

-- Adapted from:
-- Recommandation 995 sur la fourniture de données locales dans les
-- échanges de notices bibliographiques en UNIMARC accompagnant le prêt
-- ou le dépôt d'exemplaires / ABF (Association des bibliothécaires
-- français) ; FULBI (Fédération des utilisateurs de logiciels de
-- bibliothèque) ; ADBDP (Association des directeurs de bibliothèques
-- départementales de prêt) ; ADBGV (Association des directeurs de
-- bibliothèques municipales et intercommunales des grandes villes de
-- France) ADDNB (Association pour le développement des documents
-- numériques en bibliothèque.



-- Current items Field/Subfields

INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeatable`, `mandatory`, `authorised_value`, `frameworkcode`) VALUES
		('995', 'Location and Item Information (Koha)', 'Location and Item Information (Koha)', 0, 0, '', '');

INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian`, `libopac`, `repeatable`, `mandatory`, `kohafield`, `tab`, `authorised_value`, `authtypecode`, `value_builder`, `isurl`, `hidden`, `frameworkcode`, `seealso`, `link`, `defaultvalue`) VALUES
               ('995', '0', 'Withdrawn status', 'Withdrawn status', 0, 0, 'items.withdrawn', 10, 'WITHDRAWN', '', '', 0, 0, '', '', '', NULL),
		('995', '2', 'Lost status', 'Lost status', 0, 0, 'items.itemlost', 10, 'LOST', '', '', 0, 0, '', '', '', NULL),
		('995', '3', 'Use restrictions', 'Use restrictions', 0, 0, 'items.restricted', 10, 'RESTRICTED', '', '', 0, 0, '', '', '', NULL),
		('995', '5', 'Date acquired', 'Coded location qualifier', 0, 0, 'items.dateaccessioned', 10, '', '', '', NULL, 0, '', '', '', NULL),
		('995', '6', 'Copy number', 'Copy number', 0, 0, 'items.copynumber', 10, '', '', '', NULL, 0, '', '', '', NULL),
		('995', '7', 'Uniform Resource Identifier', 'Uniform Resource Identifier', 0, 0, 'items.uri', 10, '', '', '', 0, 0, '', '', '', NULL),
		('995', '9', 'Internal item number (Koha itemnumber, autogenerated)', 'Internal itemnumber (Koha itemnumber)', 0, 0, 'items.itemnumber', -1, '', '', '', 0, -5, '', '', '', NULL),
		('995', 'a', 'Origin of the item (home branch) (free text)', 'Origin of item (home branch) (free text)', 0, 1, '', 10, '', '', '', 0, 0, '', '', '', NULL),
		('995', 'b', 'Origin of item (home branch) (coded)', 'Origin of item (home branch (coded)', 0, 0, 'items.homebranch', 10, 'branches', '', '', 0, -1, '', '', '', NULL),
		('995', 'c', 'Lending or holding organisation (holding branch) code', 'Lending or holding organisation (holding branch) code ', 0, 1, 'items.holdingbranch', 10, 'branches', '', '', 0, 0, '', '', '', NULL),
		('995', 'd', 'Lending or holding organisation (holding branch) (free text)', 'Lending or holding organisation (holding branch) (free text)', 0, 0, '', 10, '', '', '', 0, -1, '', '', '', NULL),
		('995', 'e', 'Shelving location', 'Shelving location', 0, 0, 'items.location', 10, 'LOC', '', '', 0, 0, '', '', '', NULL),
		('995', 'f', 'Barcode', 'Barcode', 0, 0, 'items.barcode', 10, '', '', 'barcode.pl', 0, 0, '', '', '', NULL),
		('995', 'h', 'Koha collection', 'Koha collection', 0, 0, 'items.ccode', 10, 'CCODE', '', '', 0, 0, '', '', '', NULL),
		('995', 'j', 'Inventory number', 'Inventory number', 0, 0, 'items.stocknumber ', 10, '', '', '', 0, 0, '', '', '', NULL),
		('995', 'k', 'Call number (full call number)', 'Call number (full call number)', 0, 0, 'items.itemcallnumber', 10, '', '', '', 0, 0, '', '', '', NULL),
		('995', 'l', 'Numbering (volume or other part)', 'Numbering (bound volume or other part)', 0, 0, 'items.materials', 10, '', '', '', 0, 0, '', '', '', NULL),
		('995', 'm', 'Date of loan or deposit', 'Date of loan or deposit', 0, 0, 'items.datelastborrowed', 10, '', '', '', 0, -5, '', '', '', NULL),
		('995', 'n', 'Expiration of loan date', 'Expiration of loan date', 0, 0, 'items.onloan', 10, '', '', '', 0, -1, '', '', '', NULL),
		('995', 'o', 'Circulation type (not for loan)', 'Circulation type (not for loan)', 0, 0, 'items.notforloan', 10, '', '', '', 0, 0, '', '', '', NULL),
		('995', 'r', 'Type of item and material', 'Type of item and material', 0, 1, 'items.itype', 10, 'itemtypes', '', '', 0, 0, '', '', '', NULL),
		('995', 'u', 'Copy note', 'Copy note', 0, 0, 'items.itemnotes', 10, '', '', '', 0, 0, '', '', '', NULL),
		('995', 'v', 'Serial Enumeration / chronology', 'Serial Enumeration / chronology', 0, 0, 'items.enumchron', 10, '', '', '', 0, -1, '', '', '', NULL);
 


-- *******************************************************
-- UNIMARC FIELDS/SUBFIELDS AND COMMMONLY USED EXTENSIONS.
-- *******************************************************


INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeatable`, `mandatory`, `authorised_value`, `frameworkcode`) VALUES
		('000', 'Record Label', 'Record Label', 0, 1, '', ''),
		('001', 'Record Identifier', 'Record Identifier', 0, 1, '', ''),
		('003', 'Persistent Record Identifier', 'Persistent Record Identifier', 0, 0, '', ''),
		('005', 'Version Identifier', 'Version Identifier', 0, 0, '', ''),
		('010', 'International Standard Book Number (ISBN)', 'International Standard Book Number (ISBN)', 1, 0, '', ''),
		('011', 'International Standard Serial Number (ISSN)', 'International Standard Serial Number (ISSN)', 1, 0, '', ''),
		('012', 'Fingerprint Identifier', 'Fingerprint Identifier', 1, 0, '', ''),
		('013', 'International Standard Music Number (ISMN)', 'International Standard Music Number (ISMN)', 1, 0, '', ''),
		('014', 'Article Identifier', 'Article Identifier', 1, 0, '', ''),
		('015', 'International Standard Technical Report Number (ISRN)', 'International Standard Technical Report Number (ISRN)', 1, 0, '', ''),
		('016', 'International Standard Recording Code (ISRC)', 'International Standard Recording Code (ISRC)', 1, 0, '', ''),
		('017', 'Other Standard Identifier', 'Other Standard Identifier', 1, 0, '', ''),
		('020', 'National Bibliography Number', 'National Bibliography Number', 1, 0, '', ''),
		('021', 'Legal Deposit Number', 'Legal Deposit Number', 1, 0, '', ''),
		('022', 'Government Publication Number', 'Government Publication Number', 1, 0, '', ''),
		('035', 'Other System Control Numbers', 'Other System Control Numbers', 1, 0, '', ''),
		('036', 'Music Incipit', 'Music Incipit', 1, 0, '', ''),
		('040', 'CODEN (Serials)', 'CODEN (Serials)', 1, 0, '', ''),
		('071', 'Publisher\'s Number', 'Publisher\'s Number', 1, 0, '', ''),
		('072', 'Universal Product Code (UPC)', 'Universal Product Code (UPC)', 1, 0, '', ''),
		('073', 'International Article Number (EAN)', 'International Article Number (EAN)', 1, 0, '', ''),
		('100', 'General Processing Data', 'General Processing Data', 0, 1, '', ''),
		('101', 'Language of the Resource', 'Language of the Resource', 0, 0, '', ''),
		('102', 'Country of Publication or Production', 'Country of Publication or Production', 0, 0, '', ''),
		('105', 'Coded Data Field: Textual Material, Monographic', 'Coded Data Field: Textual Material, Monographic', 0, 0, '', ''),
		('106', 'Coded Data Field: Textual Material - Physical Attributes', 'Coded Data Field: Textual Material - Physical Attributes', 0, 0, '', ''),
		('110', 'Coded Data Field: Continuing Resources', 'Coded Data Field: Continuing Resources', 0, 0, '', ''),
		('115', 'Coded Data Field: Visual Projections, Videorecordings and Motion Pictures', 'Coded Data Fields: Visual Projections, Videorecordings and Motion Pictures', 1, 0, '', ''),
		('116', 'Coded Data Field: Graphics', 'Coded Data Field: Graphics', 1, 0, '', ''),
		('117', 'Coded Data Field: Three-Dimensional Artefacts and Realia', 'Coded Data Field: Three-Dimensional Artefacts and Realia', 1, 0, '', ''),
		('120', 'Coded Data Field: Cartographic Materials - General', 'Coded Data Field: Cartographic Materials - General', 0, 0, '', ''),
		('121', 'Coded Data Field: Cartographic Materials: Physical Attributes', 'Coded Data Field: Cartographic Materials: Physical Attributes', 0, 0, '', ''),
		('122', 'Coded Data Field: Time Period of Item Content', 'Coded Data Field: Time Period of Item Content', 1, 0, '', ''),
		('123', 'Coded Data Field: Cartographic Resources - Scale and Co-Ordinates', 'Coded Data Field: Cartographic Resources - Scale and Co-Ordinates', 1, 0, '', ''),
		('124', 'Coded Data Field: Cartographic Materials - Specific Material Designation Analysis', 'Coded Data Field: Cartographic Materials - Specific Material Designation Analysis', 0, 0, '', ''),
		('125', 'Coded Data Field: Sound Recordings and Music', 'Coded Data Field: Sound Recordings and Music', 0, 0, '', ''),
		('126', 'Coded Data Field: Sound Recordings - Physical Attributes', 'Coded Data Field: Sound Recordings - Physical Attributes', 0, 0, '', ''),
		('127', 'Coded Data Field: Duration of Sound Recordings and Printed Music', 'Coded Data Field: Duration of Sound Recordings and Printed Music', 0, 0, '', ''),
		('128', 'Coded Data Field: Form of Musical Work and Key or Mode', 'Coded Data Field: Form of Musical Work and Key or Mode', 1, 0, '', ''),
		('130', 'Coded Data Field: Microforms - Physical Attributes', 'Coded Data Field: Microforms - Physical Attributes', 1, 0, '', ''),
		('131', 'Coded Data Field: Cartographic Materials: Geodetic, Grid and Vertical Measurement', 'Coded Data Field: Cartographic Materials: Geodetic, Grid and Vertical Measurement', 0, 0, '', ''),
		('135', 'Coded Data Field: Electronic Resources', 'Coded Data Field: Electronic Resources', 1, 0, '', ''),
		('140', 'Coded Data Field: Antiquarian - General', 'Coded Data Field: Antiquarian - General', 0, 0, '', ''),
		('141', 'Coded Data Field: Copy Specific Attributes', 'Coded Data Field: Copy Specific Attributes', 1, 0, '', ''),
		('145', 'Coded Data Field: Medium of Performance [Obsolete]', 'Coded Data Field: Medium of Performance [Obsolete]', 1, 0, '', ''),
		('146', 'Coded Data Field: Medium of Performance', 'Coded Data Field: Medium of Performance', 1, 0, '', ''),
		('200', 'Title and Statement of Responsibility', 'Title and Statement of Responsibility', 0, 1, '', ''),
		('204', 'General Material Designation [Obsolete]', 'General Material Designation [Obsolete]', 1, 0, '', ''),
		('205', 'Edition Statement', 'Edition Statement', 1, 0, '', ''),
		('206', 'Material Specific Area: Cartographic Resources - Mathematical Data', 'Material Specific Area: Cartographic Resources - Mathematical Data', 1, 0, '', ''),
		('207', 'Material Specific Area: Numbering of Continuing Resources', 'Material Specific Area: Numbering of Continuing Resources', 0, 0, '', ''),
		('208', 'Material Specific Area: Printed Music Specific Statement', 'Material Specific Area: Printed Music Specific Statement', 0, 0, '', ''),
		('210', 'Publication, Distribution, etc.', 'Publication, Distribution, etc.', 1, 0, '', ''),
		('211', 'Projected Publication Date', 'Projected Publication Date', 0, 0, '', ''),
		('215', 'Physical Description', 'Physical Description', 1, 0, '', ''),
		('225', 'Series', 'Series', 1, 0, '', ''),
		('230', 'Material Specific Area: Electronic Resource Characteristics', 'Material Specific Area: Electronic Resource Characteristics', 1, 0, '', ''),
		('251', 'Organization and Arrangement of Materials', 'Organization and Arrangement of Materials', 1, 0, '', ''),
		('300', 'General Notes', 'General Notes', 1, 0, '', ''),
		('301', 'Notes Pertaining to Identification Numbers', 'Notes Pertaining to Identification Numbers', 1, 0, '', ''),
		('302', 'Notes Pertaining to Coded Information', 'Notes Pertaining to Coded Information', 1, 0, '', ''),
		('303', 'General Notes Pertaining to Descriptive Information', 'General Notes Pertaining to Descriptive Information', 1, 0, '', ''),
		('304', 'Notes Pertaining to Title and Statement of Responsibility', 'Notes Pertaining to Title and Statement of Responsibility', 1, 0, '', ''),
		('305', 'Notes Pertaining to Edition and Bibliographic History', 'Notes Pertaining to Edition and Bibliographic History', 1, 0, '', ''),
		('306', 'Notes Pertaining to Publication, Distribution, etc.', 'Notes Pertaining to Publication, Distribution, etc.', 1, 0, '', ''),
		('307', 'Notes Pertaining to Physical Description', 'Notes Pertaining to Physical Description', 1, 0, '', ''),
		('308', 'Notes Pertaining to Series', 'Notes Pertaining to Series', 1, 0, '', ''),
		('310', 'Notes Pertaining to Binding and Availability', 'Notes Pertaining to Binding and Availability', 1, 0, '', ''),
		('311', 'Notes Pertaining to Linking Fields', 'Notes Pertaining to Linking Fields', 1, 0, '', ''),
		('312', 'Notes Pertaining to Related Titles', 'Notes Pertaining to Related Titles', 1, 0, '', ''),
		('313', 'Notes Pertaining to Subject Access', 'Notes Pertaining to Subject Access', 1, 0, '', ''),
		('314', 'Notes Pertaining to Responsibility', 'Notes Pertaining to Responsibility', 1, 0, '', ''),
		('315', 'Notes Pertaining to Material (Or Type of Publication) Specific Information', 'Notes Pertaining to Material (Or Type of Publication) Specific Information', 1, 0, '', ''),
		('316', 'Note Relating to the Copy in Hand', 'Note Relating to the Copy in Hand', 1, 0, '', ''),
		('317', 'Provenance Note', 'Provenance Note', 1, 0, '', ''),
		('318', 'Action Note', 'Action Note', 1, 0, '', ''),
		('320', 'Internal Bibliographies/Indexes Note', 'Internal Bibliographies/Indexes Note', 1, 0, '', ''),
		('321', 'External Indexes/Abstracts/References Note', 'External Indexes/Abstracts/References Note', 1, 0, '', ''),
		('322', 'Credits Note (Projected and Video Material and Sound Recordings)', 'Credits Note (Projected and Video Material and Sound Recordings)', 0, 0, '', ''),
		('323', 'Cast Note (Projected and Video Material and Sound Recordings)', 'Cast Note (Projected and Video Material and Sound Recordings)', 1, 0, '', ''),
		('324', 'Original Version Note', 'Original Version Note', 0, 0, '', ''),
		('325', 'Reproduction Note', 'Reproduction Note', 1, 0, '', ''),
		('326', 'Frequency Statement Note (Continuing Resources)', 'Frequency Statement Note (Continuing Resources)', 1, 0, '', ''),
		('327', 'Contents Note', 'Contents Note', 1, 0, '', ''),
		('328', 'Dissertation (Thesis) Note', 'Dissertation (Thesis) Note', 1, 0, '', ''),
		('330', 'Summary or Abstract', 'Summary or Abstract', 1, 0, '', ''),
		('332', 'Preferred Citation of Described Materials', 'Preferred Citation of Described Materials', 1, 0, '', ''),
		('333', 'Users/Intended Audience Note', 'Users/Intended Audience Note', 1, 0, '', ''),
		('334', 'Awards Note', 'Awards Note', 1, 0, '', ''),
		('335', 'Location of Originals/ Reproductions', 'Location of Originals/ Reproductions', 1, 0, '', ''),
		('336', 'Type of Electronic Resource Note', 'Type of Electronic Resource Note', 1, 0, '', ''),
		('337', 'System Requirements Note (Electronic Resources)', 'System Requirements Note (Electronic Resources)', 1, 0, '', ''),
		('345', 'Acquisition Information Note', 'Acquisition Information Note', 0, 0, '', ''),
		('371', 'Notes on Information Service Policy', 'Notes on Information Service Policy', 1, 0, '', ''),
		('410', 'Series', 'Series', 0, 0, '', ''),
		('411', 'Subseries', 'Subseries', 0, 0, '', ''),
		('412', 'Source of Excerpt or Offprint', 'Source of Excerpt or Offprint', 0, 0, '', ''),
		('413', 'Excerpt or Offprint', 'Excerpt or Offprint', 0, 0, '', ''),
		('421', 'Supplement', 'Supplement', 0, 0, '', ''),
		('422', 'Parent of Supplement', 'Parent of Supplement', 0, 0, '', ''),
		('423', 'Issued with', 'Issued with', 0, 0, '', ''),
		('424', 'is Updated by', 'is Updated by', 0, 0, '', ''),
		('425', 'Updates', 'Updates', 0, 0, '', ''),
		('430', 'Continues', 'Continues', 0, 0, '', ''),
		('431', 'Continues in Part', 'Continues in Part', 0, 0, '', ''),
		('432', 'Supersedes', 'Supersedes', 0, 0, '', ''),
		('433', 'Supersedes in Part', 'Supersedes in Part', 0, 0, '', ''),
		('434', 'Absorbed', 'Absorbed', 0, 0, '', ''),
		('435', 'Absorbed in Part', 'Absorbed in Part', 0, 0, '', ''),
		('436', 'Formed by Merger of', 'Formed by Merger of', 0, 0, '', ''),
		('437', 'Separated from', 'Separated from', 0, 0, '', ''),
		('440', 'Continued by', 'Continued by', 0, 0, '', ''),
		('441', 'Continued in Part by', 'Continued in Part by', 0, 0, '', ''),
		('442', 'Superseded by', 'Superseded by', 0, 0, '', ''),
		('443', 'Superseded in Part by', 'Superseded in Part by', 0, 0, '', ''),
		('444', 'Absorbed by', 'Absorbed by', 0, 0, '', ''),
		('445', 'Absorbed in Part by', 'Absorbed in Part by', 0, 0, '', ''),
		('446', 'Split into', 'Split into', 0, 0, '', ''),
		('447', 'Merged with XXX to Form', 'Merged with XXX to Form', 0, 0, '', ''),
		('448', 'Changed Back to', 'Changed Back to', 0, 0, '', ''),
		('451', 'Other Edition in the Same Medium', 'Other Edition in the Same Medium', 0, 0, '', ''),
		('452', 'Other Edition in Another Medium', 'Other Edition in Another Medium', 0, 0, '', ''),
		('453', 'Translated as', 'Translated as', 0, 0, '', ''),
		('454', 'Translation of', 'Translation of', 0, 0, '', ''),
		('455', 'Other Edition, State or Impression in the Same Medium', 'Other Edition, State or Impression in the Same Medium', 0, 0, '', ''),
		('456', 'Reproduced as', 'Reproduced as', 0, 0, '', ''),
		('461', 'Set Level', 'Set Level', 0, 0, '', ''),
		('462', 'Subset Level', 'Subset Level', 0, 0, '', ''),
		('463', 'Piece Level', 'Piece Level', 0, 0, '', ''),
		('464', 'Piece-Analytic Level', 'Piece-Analytic Level', 0, 0, '', ''),
		('470', 'Item Reviewed', 'Item Reviewed', 0, 0, '', ''),
		('481', 'Also Bound with This Volume', 'Also Bound with This Volume', 0, 0, '', ''),
		('482', 'Bound with', 'Bound with', 0, 0, '', ''),
		('488', 'Other Related Works', 'Other Related Works', 0, 0, '', ''),
		('500', 'Preferred Access Point', 'Preferred Access Point', 1, 0, '', ''),
		('501', 'Collective Preferred Title', 'Collective Preferred Title', 1, 0, '', ''),
		('503', 'Preferred Conventional Heading', 'Preferred Conventional Heading', 1, 0, '', ''),
		('506', 'Preferred Access Point - Identification of a Work', 'Preferred Access Point - Identification of a Work', 1, 0, '', ''),
		('507', 'Preferred Access Point - Identification of an Expression', 'Preferred Access Point - Identification of an Expression', 1, 0, '', ''),
		('510', 'Parallel Title Proper', 'Parallel Title Proper', 1, 0, '', ''),
		('511', 'Half Title', 'Half Title', 1, 0, '', ''),
		('512', 'Cover Title', 'Cover Title', 1, 0, '', ''),
		('513', 'Added Title-Page Title', 'Added Title-Page Title', 1, 0, '', ''),
		('514', 'Caption Title', 'Caption Title', 1, 0, '', ''),
		('515', 'Running Title', 'Running Title', 1, 0, '', ''),
		('516', 'Spine Title', 'Spine Title', 1, 0, '', ''),
		('517', 'Other Variant Titles', 'Other Variant Titles', 1, 0, '', ''),
		('518', 'Title in Standard Modern Spelling', 'Title in Standard Modern Spelling', 1, 0, '', ''),
		('520', 'Former Title (Continuing Resources)', 'Former Title (Continuing Resources)', 1, 0, '', ''),
		('530', 'Key Title (Continuing Resources)', 'Key Title (Continuing Resources)', 1, 0, '', ''),
		('531', 'Abbreviated Title (Continuing Resources)', 'Abbreviated Title (Continuing Resources)', 1, 0, '', ''),
		('532', 'Expanded Title', 'Expanded Title', 1, 0, '', ''),
		('540', 'Additional Title Supplied by Cataloguer', 'Additional Title Supplied by Cataloguer', 1, 0, '', ''),
		('541', 'Translated Title Supplied by Cataloguer', 'Translated Title Supplied by Cataloguer', 1, 0, '', ''),
		('545', 'Section Title', 'Section Title', 1, 0, '', ''),
		('560', 'Artifical Title', 'Artifical Title', 1, 0, '', ''),
		('576', 'Name / Preferred Access Point - Identification of a Work', 'Name / Preferred Access Point - Identification of a Work', 1, 0, '', ''),
		('577', 'Name / Preferred Access Point - Identification of an Expression', 'Name / Preferred Access Point - Identification of an Expression', 1, 0, '', ''),
		('600', 'Personal Name Used as Subject', 'Personal Name Used as Subject', 1, 0, '', ''),
		('601', 'Corporate Body Name Used as Subject', 'Corporate Body Name Used as Subject', 1, 0, '', ''),
		('602', 'Family Name Used as Subject', 'Family Name Used as Subject', 1, 0, '', ''),
		('604', 'Name and Title Used as Subject', 'Name and Title Used as Subject', 1, 0, '', ''),
		('605', 'Title Used as Subject', 'Title Used as Subject', 1, 0, '', ''),
		('606', 'Topical Name Used as Subject', 'Topical Name Used as Subject', 1, 0, '', ''),
		('607', 'Geographical Name Used as Subject', 'Geographical Name Used as Subject', 1, 0, '', ''),
		('608', 'Form, Genre or Physical Characteristics Heading', 'Form, Genre or Physical Characteristics Heading', 1, 0, '', ''),
		('610', 'Uncontrolled Subject Terms', 'Uncontrolled Subject Terms', 1, 0, '', ''),
		('615', 'Subject Category (Provisional)', 'Subject Category (Provisional)', 1, 0, '', ''),
		('616', 'Trademark Used as Subject', 'Trademark Used as Subject', 1, 0, '', ''),
		('617', 'Hierarchical Geographical Name Used as Subject', 'Hierarchical Geographical Name Used as Subject', 1, 0, '', ''),
		('620', 'Place and Date of Publication, Performance, etc.', 'Place and Date of Publication, Performance, etc.', 1, 0, '', ''),
		('621', 'Place and Date of Provenance', 'Place and Date of Provenance', 1, 0, '', ''),
		('626', 'Technical Details Access (Electronic Resources) [Obsolete]', 'Technical Details Access (Electronic Resources) [Obsolete]', 1, 0, '', ''),
		('660', 'Geographic Area Code', 'Geographic Area Code', 1, 0, '', ''),
		('661', 'Time Period Code', 'Time Period Code', 1, 0, '', ''),
		('670', 'PRECIS', 'PRECIS', 1, 0, '', ''),
		('675', 'Universal Decimal Classification (UDC)', 'Universal Decimal Classification (UDC)', 1, 0, '', ''),
		('676', 'Dewey Decimal Classification', 'Dewey Decimal Classification', 1, 0, '', ''),
		('680', 'Library of Congress Classification', 'Library of Congress Classification', 1, 0, '', ''),
		('686', 'Other Class Numbers', 'Other Class Numbers', 1, 0, '', ''),
		('700', 'Personal Name - Primary Responsibility', 'Personal Name - Primary Responsibility', 0, 0, '', ''),
		('701', 'Personal Name - Alternative Responsibility', 'Personal Name - Alternative Responsibility', 1, 0, '', ''),
		('702', 'Personal Name - Secondary Responsibility', 'Personal Name - Secondary Responsibility', 1, 0, '', ''),
		('703', 'Personal Name - Provenance or Ownership', 'Personal Name - Provenance or Ownership', 1, 0, '', ''),
		('710', 'Corporate Body Name - Primary Responsibility', 'Corporate Body Name - Primary Responsibility', 0, 0, '', ''),
		('711', 'Corporate Body Name - Alternative Responsibility', 'Corporate Body Name - Alternative Responsibility', 1, 0, '', ''),
		('712', 'Corporate Body Name - Secondary Responsibility', 'Corporate Body Name - Secondary Responsibility', 1, 0, '', ''),
		('713', 'Corporate Body Name - Provenance or Ownership', 'Corporate Body Name - Provenance or Ownership', 1, 0, '', ''),
		('716', 'Trademark', 'Trademark', 1, 0, '', ''),
		('720', 'Family Name - Primary Responsibility', 'Family Name - Primary Responsibility', 0, 0, '', ''),
		('721', 'Family Name - Alternative Responsibility', 'Family Name - Alternative Responsibility', 1, 0, '', ''),
		('722', 'Family Name - Secondary Responsibility', 'Family Name - Secondary Responsibility', 1, 0, '', ''),
		('723', 'Family Name - Provenance or Ownership', 'Family Name - Provenance or Ownership', 1, 0, '', ''),
		('730', 'Name - Entity Responsible', 'Name - Entity Responsible', 1, 0, '', ''),
		('740', 'Uniform Conventional Heading for Legal and Religious Texts - Primary Responsibility', 'Uniform Conventional Heading for Legal and Religious Texts - Primary Responsibility', 0, 0, '', ''),
		('741', 'Uniform Conventional Heading for Legal and Religious Texts - Alternative Responsibility', 'Uniform Conventional Heading for Legal and Religious Texts - Alternative Responsibility', 1, 0, '', ''),
		('742', 'Uniform Conventional Heading for Legal and Religious Texts - Secondary Responsibility', 'Uniform Conventional Heading for Legal and Religious Texts - Secondary Responsibility', 1, 0, '', ''),
		('801', 'Originating Source', 'Originating Source', 1, 1, '', ''),
		('802', 'National ISSN Centre', 'National ISSN Centre', 0, 0, '', ''),
		('830', 'General Cataloguer\'s Note', 'General Cataloguer\'s Note', 1, 0, '', ''),
		('850', 'Holding Institution', 'Holding Institution', 1, 0, '', ''),
		('852', 'Location and Call Number', 'Location and Call Number', 1, 0, '', ''),
		('856', 'Electronic Location and Access', 'Electronic Location and Access', 1, 0, '', ''),
		('886', 'Data Not Converted from Source Format', 'Data Not Converted from Source Format', 1, 0, '', '');




UPDATE `marc_subfield_structure` SET maxlength=24 WHERE tagfield='000';
UPDATE `marc_subfield_structure` SET maxlength=36 WHERE tagfield='100';
