]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/sql/Pg/002.schema.config.sql
adding lit_form_map
[Evergreen.git] / Open-ILS / src / sql / Pg / 002.schema.config.sql
1
2 DROP SCHEMA stats CASCADE;
3 DROP SCHEMA config CASCADE;
4
5 BEGIN;
6 CREATE SCHEMA stats;
7
8 CREATE SCHEMA config;
9 COMMENT ON SCHEMA config IS $$
10 /*
11  * Copyright (C) 2005  Georgia Public Library Service 
12  * Mike Rylander <mrylander@gmail.com>
13  *
14  * The config schema holds static configuration data for the
15  * Open-ILS installation.
16  *
17  * ****
18  *
19  * This program is free software; you can redistribute it and/or
20  * modify it under the terms of the GNU General Public License
21  * as published by the Free Software Foundation; either version 2
22  * of the License, or (at your option) any later version.
23  *
24  * This program is distributed in the hope that it will be useful,
25  * but WITHOUT ANY WARRANTY; without even the implied warranty of
26  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
27  * GNU General Public License for more details.
28  */
29 $$;
30
31
32 CREATE TABLE config.bib_source (
33         id      SERIAL  PRIMARY KEY,
34         quality INT     CHECK ( quality BETWEEN 0 AND 100 ),
35         source  TEXT    NOT NULL UNIQUE
36 );
37 COMMENT ON TABLE config.bib_source IS $$
38 /*
39  * Copyright (C) 2005  Georgia Public Library Service 
40  * Mike Rylander <mrylander@gmail.com>
41  *
42  * Valid sources of MARC records
43  *
44  * This is table is used to set up the relative "quality" of each
45  * MARC source, such as OCLC.
46  *
47  * ****
48  *
49  * This program is free software; you can redistribute it and/or
50  * modify it under the terms of the GNU General Public License
51  * as published by the Free Software Foundation; either version 2
52  * of the License, or (at your option) any later version.
53  *
54  * This program is distributed in the hope that it will be useful,
55  * but WITHOUT ANY WARRANTY; without even the implied warranty of
56  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
57  * GNU General Public License for more details.
58  */
59 $$;
60
61
62 INSERT INTO config.bib_source (quality, source) VALUES (90, 'OcLC');
63 INSERT INTO config.bib_source (quality, source) VALUES (10, 'System Local');
64
65 CREATE TABLE config.standing (
66         id              SERIAL  PRIMARY KEY,
67         value           TEXT    NOT NULL UNIQUE
68 );
69 COMMENT ON TABLE config.standing IS $$
70 /*
71  * Copyright (C) 2005  Georgia Public Library Service 
72  * Mike Rylander <mrylander@gmail.com>
73  *
74  * Patron Standings
75  *
76  * This table contains the values that can be applied to a patron
77  * by a staff member.  These values should not be changed, other
78  * that for translation, as the ID column is currently a "magic
79  * number" in the source. :(
80  *
81  * ****
82  *
83  * This program is free software; you can redistribute it and/or
84  * modify it under the terms of the GNU General Public License
85  * as published by the Free Software Foundation; either version 2
86  * of the License, or (at your option) any later version.
87  *
88  * This program is distributed in the hope that it will be useful,
89  * but WITHOUT ANY WARRANTY; without even the implied warranty of
90  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
91  * GNU General Public License for more details.
92  */
93 $$;
94
95 INSERT INTO config.standing (value) VALUES ('Good');
96 INSERT INTO config.standing (value) VALUES ('Barred');
97
98
99
100 CREATE TABLE config.metabib_field (
101         id              SERIAL  PRIMARY KEY,
102         field_class     TEXT    NOT NULL CHECK (lower(field_class) IN ('title','author','subject','keyword','series')),
103         name            TEXT    NOT NULL UNIQUE,
104         xpath           TEXT    NOT NULL
105 );
106 COMMENT ON TABLE config.metabib_field IS $$
107 /*
108  * Copyright (C) 2005  Georgia Public Library Service 
109  * Mike Rylander <mrylander@gmail.com>
110  *
111  * XPath used for WoRMing
112  *
113  * This table contains the XPath used to chop up MODS into it's
114  * indexable parts.  Each XPath entry is named and assigned to
115  * a "class" of either title, subject, author, keyword or series.
116  * 
117  *
118  * ****
119  *
120  * This program is free software; you can redistribute it and/or
121  * modify it under the terms of the GNU General Public License
122  * as published by the Free Software Foundation; either version 2
123  * of the License, or (at your option) any later version.
124  *
125  * This program is distributed in the hope that it will be useful,
126  * but WITHOUT ANY WARRANTY; without even the implied warranty of
127  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
128  * GNU General Public License for more details.
129  */
130 $$;
131
132
133 INSERT INTO config.metabib_field ( field_class, name, xpath ) VALUES ( 'series', 'seriestitle', $$//mods:mods/mods:relatedItem[@type="series"]/mods:titleInfo$$ );
134 INSERT INTO config.metabib_field ( field_class, name, xpath ) VALUES ( 'title', 'abbreviated', $$//mods:mods/mods:titleInfo[mods:title and (@type='abreviated')]$$ );
135 INSERT INTO config.metabib_field ( field_class, name, xpath ) VALUES ( 'title', 'translated', $$//mods:mods/mods:titleInfo[mods:title and (@type='translated')]$$ );
136 INSERT INTO config.metabib_field ( field_class, name, xpath ) VALUES ( 'title', 'uniform', $$//mods:mods/mods:titleInfo[mods:title and (@type='uniform')]$$ );
137 INSERT INTO config.metabib_field ( field_class, name, xpath ) VALUES ( 'title', 'proper', $$//mods:mods/mods:titleInfo[mods:title and not (@type)]$$ );
138 INSERT INTO config.metabib_field ( field_class, name, xpath ) VALUES ( 'author', 'corporate', $$//mods:mods/mods:name[@type='corporate']/mods:namePart[../mods:role/mods:text[text()='creator']]$$ );
139 INSERT INTO config.metabib_field ( field_class, name, xpath ) VALUES ( 'author', 'personal', $$//mods:mods/mods:name[@type='personal']/mods:namePart[../mods:role/mods:text[text()='creator']]$$ );
140 INSERT INTO config.metabib_field ( field_class, name, xpath ) VALUES ( 'author', 'conference', $$//mods:mods/mods:name[@type='conference']/mods:namePart[../mods:role/mods:text[text()='creator']]$$ );
141 INSERT INTO config.metabib_field ( field_class, name, xpath ) VALUES ( 'author', 'other', $$//mods:mods/mods:name[@type='personal']/mods:namePart[not(../mods:role)]$$ );
142 INSERT INTO config.metabib_field ( field_class, name, xpath ) VALUES ( 'subject', 'geographic', $$//mods:mods/mods:subject/mods:geographic$$ );
143 INSERT INTO config.metabib_field ( field_class, name, xpath ) VALUES ( 'subject', 'name', $$//mods:mods/mods:subject/mods:name$$ );
144 INSERT INTO config.metabib_field ( field_class, name, xpath ) VALUES ( 'subject', 'temporal', $$//mods:mods/mods:subject/mods:temporal$$ );
145 INSERT INTO config.metabib_field ( field_class, name, xpath ) VALUES ( 'subject', 'topic', $$//mods:mods/mods:subject/mods:topic$$ );
146 -- INSERT INTO config.metabib_field ( field_class, name, xpath ) VALUES ( 'subject', 'genre', $$//mods:mods/mods:genre$$ );
147 INSERT INTO config.metabib_field ( field_class, name, xpath ) VALUES ( 'keyword', 'keyword', $$//mods:mods/*[not(local-name()='originInfo')]$$ ); -- /* to fool vim */
148
149 CREATE TABLE config.non_cataloged_type (
150         id              SERIAL          PRIMARY KEY,
151         owning_lib      INT             NOT NULL, -- REFERENCES actor.org_unit (id),
152         name            TEXT            NOT NULL UNIQUE,
153         circ_duration   INTERVAL        NOT NULL DEFAULT '14 days'::INTERVAL
154 );
155 COMMENT ON TABLE config.non_cataloged_type IS $$
156 /*
157  * Copyright (C) 2005  Georgia Public Library Service 
158  * Mike Rylander <mrylander@gmail.com>
159  *
160  * Types of valid non-cataloged items.
161  *
162  *
163  * ****
164  *
165  * This program is free software; you can redistribute it and/or
166  * modify it under the terms of the GNU General Public License
167  * as published by the Free Software Foundation; either version 2
168  * of the License, or (at your option) any later version.
169  *
170  * This program is distributed in the hope that it will be useful,
171  * but WITHOUT ANY WARRANTY; without even the implied warranty of
172  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
173  * GNU General Public License for more details.
174  */
175 $$;
176
177
178 INSERT INTO config.non_cataloged_type ( owning_lib, name ) VALUES ( 1, 'Paperback Book' );
179
180 CREATE TABLE config.identification_type (
181         id              SERIAL  PRIMARY KEY,
182         name            TEXT    NOT NULL UNIQUE
183 );
184 COMMENT ON TABLE config.identification_type IS $$
185 /*
186  * Copyright (C) 2005  Georgia Public Library Service 
187  * Mike Rylander <mrylander@gmail.com>
188  *
189  * Types of valid patron identification.
190  *
191  * Each patron must display at least one valid form of identification
192  * in order to get a library card.  This table lists those forms.
193  * 
194  *
195  * ****
196  *
197  * This program is free software; you can redistribute it and/or
198  * modify it under the terms of the GNU General Public License
199  * as published by the Free Software Foundation; either version 2
200  * of the License, or (at your option) any later version.
201  *
202  * This program is distributed in the hope that it will be useful,
203  * but WITHOUT ANY WARRANTY; without even the implied warranty of
204  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
205  * GNU General Public License for more details.
206  */
207 $$;
208
209
210 INSERT INTO config.identification_type ( name ) VALUES ( 'Drivers Licence' );
211 INSERT INTO config.identification_type ( name ) VALUES ( 'Voter Card' );
212 INSERT INTO config.identification_type ( name ) VALUES ( 'Two Utility Bills' );
213 INSERT INTO config.identification_type ( name ) VALUES ( 'State ID' );
214 INSERT INTO config.identification_type ( name ) VALUES ( 'SSN' );
215
216 CREATE TABLE config.rule_circ_duration (
217         id              SERIAL          PRIMARY KEY,
218         name            TEXT            NOT NULL UNIQUE CHECK ( name ~ '^\\w+$' ),
219         extended        INTERVAL        NOT NULL,
220         normal          INTERVAL        NOT NULL,
221         shrt            INTERVAL        NOT NULL,
222         max_renewals    INT             NOT NULL
223 );
224 COMMENT ON TABLE config.rule_circ_duration IS $$
225 /*
226  * Copyright (C) 2005  Georgia Public Library Service 
227  * Mike Rylander <mrylander@gmail.com>
228  *
229  * Circulation Duration rules
230  *
231  * Each circulation is given a duration based on one of these rules.
232  * 
233  *
234  * ****
235  *
236  * This program is free software; you can redistribute it and/or
237  * modify it under the terms of the GNU General Public License
238  * as published by the Free Software Foundation; either version 2
239  * of the License, or (at your option) any later version.
240  *
241  * This program is distributed in the hope that it will be useful,
242  * but WITHOUT ANY WARRANTY; without even the implied warranty of
243  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
244  * GNU General Public License for more details.
245  */
246 $$;
247
248 INSERT INTO config.rule_circ_duration VALUES (DEFAULT, '2wk_default', '21 days', '14 days', '7 days', 2);
249
250
251 CREATE TABLE config.rule_max_fine (
252         id      SERIAL          PRIMARY KEY,
253         name    TEXT            NOT NULL UNIQUE CHECK ( name ~ '^\\w+$' ),
254         amount  NUMERIC(6,2)    NOT NULL
255 );
256 COMMENT ON TABLE config.rule_max_fine IS $$
257 /*
258  * Copyright (C) 2005  Georgia Public Library Service 
259  * Mike Rylander <mrylander@gmail.com>
260  *
261  * Circulation Max Fine rules
262  *
263  * Each circulation is given a maximum fine based on one of
264  * these rules.
265  * 
266  *
267  * ****
268  *
269  * This program is free software; you can redistribute it and/or
270  * modify it under the terms of the GNU General Public License
271  * as published by the Free Software Foundation; either version 2
272  * of the License, or (at your option) any later version.
273  *
274  * This program is distributed in the hope that it will be useful,
275  * but WITHOUT ANY WARRANTY; without even the implied warranty of
276  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
277  * GNU General Public License for more details.
278  */
279 $$;
280
281 INSERT INTO config.rule_max_fine VALUES (DEFAULT, 'books', 50.00);
282
283
284 CREATE TABLE config.rule_recuring_fine (
285         id                      SERIAL          PRIMARY KEY,
286         name                    TEXT            NOT NULL UNIQUE CHECK ( name ~ '^\\w+$' ),
287         high                    NUMERIC(6,2)    NOT NULL,
288         normal                  NUMERIC(6,2)    NOT NULL,
289         low                     NUMERIC(6,2)    NOT NULL,
290         recurance_interval      INTERVAL        NOT NULL DEFAULT '1 day'::INTERVAL
291 );
292 COMMENT ON TABLE config.rule_recuring_fine IS $$
293 /*
294  * Copyright (C) 2005  Georgia Public Library Service 
295  * Mike Rylander <mrylander@gmail.com>
296  *
297  * Circulation Recuring Fine rules
298  *
299  * Each circulation is given a recuring fine amount based on one of
300  * these rules.  The recurance_interval should not be any shorter
301  * than the interval between runs of the fine_processor.pl script
302  * (which is run from CRON), or you could miss fines.
303  * 
304  *
305  * ****
306  *
307  * This program is free software; you can redistribute it and/or
308  * modify it under the terms of the GNU General Public License
309  * as published by the Free Software Foundation; either version 2
310  * of the License, or (at your option) any later version.
311  *
312  * This program is distributed in the hope that it will be useful,
313  * but WITHOUT ANY WARRANTY; without even the implied warranty of
314  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
315  * GNU General Public License for more details.
316  */
317 $$;
318
319 INSERT INTO config.rule_recuring_fine VALUES (1, 'books', 0.50, 0.10, 0.10, '1 day');
320
321
322 CREATE TABLE config.rule_age_hold_protect (
323         id      SERIAL          PRIMARY KEY,
324         name    TEXT            NOT NULL UNIQUE CHECK ( name ~ '^\\w+$' ),
325         age     INTERVAL        NOT NULL,
326         prox    INT             NOT NULL
327 );
328 COMMENT ON TABLE config.rule_age_hold_protect IS $$
329 /*
330  * Copyright (C) 2005  Georgia Public Library Service 
331  * Mike Rylander <mrylander@gmail.com>
332  *
333  * Hold Item Age Protection rules
334  *
335  * A hold request can only capture new(ish) items when they are
336  * within a particular proximity of the home_ou of the requesting
337  * user.  The proximity ('prox' column) is calculated by counting
338  * the number of tree edges beween the user's home_ou and the owning_lib
339  * of the copy that could fulfill the hold.
340  * 
341  *
342  * ****
343  *
344  * This program is free software; you can redistribute it and/or
345  * modify it under the terms of the GNU General Public License
346  * as published by the Free Software Foundation; either version 2
347  * of the License, or (at your option) any later version.
348  *
349  * This program is distributed in the hope that it will be useful,
350  * but WITHOUT ANY WARRANTY; without even the implied warranty of
351  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
352  * GNU General Public License for more details.
353  */
354 $$;
355
356 INSERT INTO config.rule_age_hold_protect VALUES (DEFAULT, '3month', '3 mons', 0);
357 INSERT INTO config.rule_age_hold_protect VALUES (DEFAULT, '6month', '6 mons', 2);
358
359
360 CREATE TABLE config.copy_status (
361         id              SERIAL  PRIMARY KEY,
362         name            TEXT    NOT NULL UNIQUE,
363         holdable        BOOL    NOT NULL DEFAULT FALSE
364 );
365 COMMENT ON TABLE config.copy_status IS $$
366 /*
367  * Copyright (C) 2005  Georgia Public Library Service 
368  * Mike Rylander <mrylander@gmail.com>
369  *
370  * Copy Statuses
371  *
372  * The available copy statuses, and whether a copy in that
373  * status is available for hold request capture.  0 (zero) is
374  * the only special number in this set, meaning that the item
375  * is available for imediate checkout, and is counted as available
376  * in the OPAC.
377  *
378  * Statuses with an ID below 100 are not removable, and have special
379  * meaning in the code.  Do not change them except to translate the
380  * textual name.
381  *
382  * You may add and remove statuses above 100, and these can be used
383  * to remove items from normal circulation without affecting the rest
384  * of the copy's values or it's location.
385  *
386  * ****
387  *
388  * This program is free software; you can redistribute it and/or
389  * modify it under the terms of the GNU General Public License
390  * as published by the Free Software Foundation; either version 2
391  * of the License, or (at your option) any later version.
392  *
393  * This program is distributed in the hope that it will be useful,
394  * but WITHOUT ANY WARRANTY; without even the implied warranty of
395  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
396  * GNU General Public License for more details.
397  */
398 $$;
399
400 INSERT INTO config.copy_status (id,name,holdable)       VALUES (0,'Available','t');
401 INSERT INTO config.copy_status (name,holdable)          VALUES ('Checked out','t');
402 INSERT INTO config.copy_status (name)                   VALUES ('Bindery');
403 INSERT INTO config.copy_status (name)                   VALUES ('Lost');
404 INSERT INTO config.copy_status (name)                   VALUES ('Missing');
405 INSERT INTO config.copy_status (name,holdable)          VALUES ('In process','t');
406 INSERT INTO config.copy_status (name,holdable)          VALUES ('In transit','t');
407 INSERT INTO config.copy_status (name,holdable)          VALUES ('Reshelving','t');
408 INSERT INTO config.copy_status (name)                   VALUES ('On holds shelf');
409 INSERT INTO config.copy_status (name,holdable)          VALUES ('On order','t');
410 INSERT INTO config.copy_status (name)                   VALUES ('ILL');
411 INSERT INTO config.copy_status (name)                   VALUES ('Cataloging');
412 INSERT INTO config.copy_status (name)                   VALUES ('Reserves');
413 INSERT INTO config.copy_status (name)                   VALUES ('Discard/Weed');
414
415 SELECT SETVAL('config.copy_status_id_seq'::TEXT, 100);
416
417
418 CREATE TABLE config.net_access_level (
419         id      SERIAL          PRIMARY KEY,
420         name    TEXT            NOT NULL UNIQUE
421 );
422 COMMENT ON TABLE config.net_access_level IS $$
423 /*
424  * Copyright (C) 2005  Georgia Public Library Service 
425  * Mike Rylander <mrylander@gmail.com>
426  *
427  * Patron Network Access level
428  *
429  * This will be used to inform the in-library firewall of how much
430  * internet access the using patron should be allowed.
431  *
432  * ****
433  *
434  * This program is free software; you can redistribute it and/or
435  * modify it under the terms of the GNU General Public License
436  * as published by the Free Software Foundation; either version 2
437  * of the License, or (at your option) any later version.
438  *
439  * This program is distributed in the hope that it will be useful,
440  * but WITHOUT ANY WARRANTY; without even the implied warranty of
441  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
442  * GNU General Public License for more details.
443  */
444 $$;
445
446 INSERT INTO config.net_access_level (name) VALUES ('Restricted');
447 INSERT INTO config.net_access_level (name) VALUES ('Full');
448 INSERT INTO config.net_access_level (name) VALUES ('None');
449
450 CREATE TABLE config.lit_form_map (
451         code            "char"  PRIMARY KEY,
452         value           TEXT    NOT NULL,
453         description     TEXT
454 );
455
456 COPY config.lit_form_map FROM STDIN;
457 0       Not fiction (not further specified)     The item is not a work of fiction and no further identification of the literary form is desired
458 1       Fiction (not further specified) The item is a work of fiction and no further identification of the literary form is desired
459 c       Comic strips    \N
460 d       Dramas  \N
461 e       Essays  \N
462 f       Novels  \N
463 h       Humor, satires, etc.    The item is a humorous work, satire or of similar literary form.
464 i       Letters The item is a single letter or collection of correspondence.
465 j       Short stories   The item is a short story or collection of short stories.
466 m       Mixed forms     The item is a variety of literary forms (e.g., poetry and short stories).
467 p       Poetry  The item is a poem or collection of poems.
468 s       Speeches        The item is a speech or collection of speeches.
469 u       Unknown The literary form of the item is unknown.
470 \.
471
472 CREATE TABLE config.language_map (
473         code    TEXT    PRIMARY KEY,
474         value   TEXT    NOT NULL
475 );
476
477 COPY config.language_map FROM STDIN;
478 aar     Afar
479 abk     Abkhaz
480 ace     Achinese
481 ach     Acoli
482 ada     Adangme
483 ady     Adygei
484 afa     Afroasiatic (Other)
485 afh     Afrihili (Artificial language)
486 afr     Afrikaans
487 -ajm    Aljamía
488 aka     Akan
489 akk     Akkadian
490 alb     Albanian
491 ale     Aleut
492 alg     Algonquian (Other)
493 amh     Amharic
494 ang     English, Old (ca. 450-1100)
495 apa     Apache languages
496 ara     Arabic
497 arc     Aramaic
498 arg     Aragonese Spanish
499 arm     Armenian
500 arn     Mapuche
501 arp     Arapaho
502 art     Artificial (Other)
503 arw     Arawak
504 asm     Assamese
505 ast     Bable
506 ath     Athapascan (Other)
507 aus     Australian languages
508 ava     Avaric
509 ave     Avestan
510 awa     Awadhi
511 aym     Aymara
512 aze     Azerbaijani
513 bad     Banda
514 bai     Bamileke languages
515 bak     Bashkir
516 bal     Baluchi
517 bam     Bambara
518 ban     Balinese
519 baq     Basque
520 bas     Basa
521 bat     Baltic (Other)
522 bej     Beja
523 bel     Belarusian
524 bem     Bemba
525 ben     Bengali
526 ber     Berber (Other)
527 bho     Bhojpuri
528 bih     Bihari
529 bik     Bikol
530 bin     Edo
531 bis     Bislama
532 bla     Siksika
533 bnt     Bantu (Other)
534 bos     Bosnian
535 bra     Braj
536 bre     Breton
537 btk     Batak
538 bua     Buriat
539 bug     Bugis
540 bul     Bulgarian
541 bur     Burmese
542 cad     Caddo
543 cai     Central American Indian (Other)
544 -cam    Khmer
545 car     Carib
546 cat     Catalan
547 cau     Caucasian (Other)
548 ceb     Cebuano
549 cel     Celtic (Other)
550 cha     Chamorro
551 chb     Chibcha
552 che     Chechen
553 chg     Chagatai
554 chi     Chinese
555 chk     Truk
556 chm     Mari
557 chn     Chinook jargon
558 cho     Choctaw
559 chp     Chipewyan
560 chr     Cherokee
561 chu     Church Slavic
562 chv     Chuvash
563 chy     Cheyenne
564 cmc     Chamic languages
565 cop     Coptic
566 cor     Cornish
567 cos     Corsican
568 cpe     Creoles and Pidgins, English-based (Other)
569 cpf     Creoles and Pidgins, French-based (Other)
570 cpp     Creoles and Pidgins, Portuguese-based (Other)
571 cre     Cree
572 crh     Crimean Tatar
573 crp     Creoles and Pidgins (Other)
574 cus     Cushitic (Other)
575 cze     Czech
576 dak     Dakota
577 dan     Danish
578 dar     Dargwa
579 day     Dayak
580 del     Delaware
581 den     Slave
582 dgr     Dogrib
583 din     Dinka
584 div     Divehi
585 doi     Dogri
586 dra     Dravidian (Other)
587 dua     Duala
588 dum     Dutch, Middle (ca. 1050-1350)
589 dut     Dutch
590 dyu     Dyula
591 dzo     Dzongkha
592 efi     Efik
593 egy     Egyptian
594 eka     Ekajuk
595 elx     Elamite
596 eng     English
597 enm     English, Middle (1100-1500)
598 epo     Esperanto
599 -esk    Eskimo languages
600 -esp    Esperanto
601 est     Estonian
602 -eth    Ethiopic
603 ewe     Ewe
604 ewo     Ewondo
605 fan     Fang
606 fao     Faroese
607 -far    Faroese
608 fat     Fanti
609 fij     Fijian
610 fin     Finnish
611 fiu     Finno-Ugrian (Other)
612 fon     Fon
613 fre     French
614 -fri    Frisian
615 frm     French, Middle (ca. 1400-1600)
616 fro     French, Old (ca. 842-1400)
617 fry     Frisian
618 ful     Fula
619 fur     Friulian
620 gaa     Gã
621 -gae    Scottish Gaelic
622 -gag    Galician
623 -gal    Oromo
624 gay     Gayo
625 gba     Gbaya
626 gem     Germanic (Other)
627 geo     Georgian
628 ger     German
629 gez     Ethiopic
630 gil     Gilbertese
631 gla     Scottish Gaelic
632 gle     Irish
633 glg     Galician
634 glv     Manx
635 gmh     German, Middle High (ca. 1050-1500)
636 goh     German, Old High (ca. 750-1050)
637 gon     Gondi
638 gor     Gorontalo
639 got     Gothic
640 grb     Grebo
641 grc     Greek, Ancient (to 1453)
642 gre     Greek, Modern (1453- )
643 grn     Guarani
644 -gua    Guarani
645 guj     Gujarati
646 gwi     Gwich'in
647 hai     Haida
648 hat     Haitian French Creole
649 hau     Hausa
650 haw     Hawaiian
651 heb     Hebrew
652 her     Herero
653 hil     Hiligaynon
654 him     Himachali
655 hin     Hindi
656 hit     Hittite
657 hmn     Hmong
658 hmo     Hiri Motu
659 hun     Hungarian
660 hup     Hupa
661 iba     Iban
662 ibo     Igbo
663 ice     Icelandic
664 ido     Ido
665 iii     Sichuan Yi
666 ijo     Ijo
667 iku     Inuktitut
668 ile     Interlingue
669 ilo     Iloko
670 ina     Interlingua (International Auxiliary Language Association)
671 inc     Indic (Other)
672 ind     Indonesian
673 ine     Indo-European (Other)
674 inh     Ingush
675 -int    Interlingua (International Auxiliary Language Association)
676 ipk     Inupiaq
677 ira     Iranian (Other)
678 -iri    Irish
679 iro     Iroquoian (Other)
680 ita     Italian
681 jav     Javanese
682 jpn     Japanese
683 jpr     Judeo-Persian
684 jrb     Judeo-Arabic
685 kaa     Kara-Kalpak
686 kab     Kabyle
687 kac     Kachin
688 kal     Kalâtdlisut
689 kam     Kamba
690 kan     Kannada
691 kar     Karen
692 kas     Kashmiri
693 kau     Kanuri
694 kaw     Kawi
695 kaz     Kazakh
696 kbd     Kabardian
697 kha     Khasi
698 khi     Khoisan (Other)
699 khm     Khmer
700 kho     Khotanese
701 kik     Kikuyu
702 kin     Kinyarwanda
703 kir     Kyrgyz
704 kmb     Kimbundu
705 kok     Konkani
706 kom     Komi
707 kon     Kongo
708 kor     Korean
709 kos     Kusaie
710 kpe     Kpelle
711 kro     Kru
712 kru     Kurukh
713 kua     Kuanyama
714 kum     Kumyk
715 kur     Kurdish
716 -kus    Kusaie
717 kut     Kutenai
718 lad     Ladino
719 lah     Lahnda
720 lam     Lamba
721 -lan    Occitan (post-1500)
722 lao     Lao
723 -lap    Sami
724 lat     Latin
725 lav     Latvian
726 lez     Lezgian
727 lim     Limburgish
728 lin     Lingala
729 lit     Lithuanian
730 lol     Mongo-Nkundu
731 loz     Lozi
732 ltz     Letzeburgesch
733 lua     Luba-Lulua
734 lub     Luba-Katanga
735 lug     Ganda
736 lui     Luiseño
737 lun     Lunda
738 luo     Luo (Kenya and Tanzania)
739 lus     Lushai
740 mac     Macedonian
741 mad     Madurese
742 mag     Magahi
743 mah     Marshallese
744 mai     Maithili
745 mak     Makasar
746 mal     Malayalam
747 man     Mandingo
748 mao     Maori
749 map     Austronesian (Other)
750 mar     Marathi
751 mas     Masai
752 -max    Manx
753 may     Malay
754 mdr     Mandar
755 men     Mende
756 mga     Irish, Middle (ca. 1100-1550)
757 mic     Micmac
758 min     Minangkabau
759 mis     Miscellaneous languages
760 mkh     Mon-Khmer (Other)
761 -mla    Malagasy
762 mlg     Malagasy
763 mlt     Maltese
764 mnc     Manchu
765 mni     Manipuri
766 mno     Manobo languages
767 moh     Mohawk
768 mol     Moldavian
769 mon     Mongolian
770 mos     Mooré
771 mul     Multiple languages
772 mun     Munda (Other)
773 mus     Creek
774 mwr     Marwari
775 myn     Mayan languages
776 nah     Nahuatl
777 nai     North American Indian (Other)
778 nap     Neapolitan Italian
779 nau     Nauru
780 nav     Navajo
781 nbl     Ndebele (South Africa)
782 nde     Ndebele (Zimbabwe)  
783 ndo     Ndonga
784 nds     Low German
785 nep     Nepali
786 new     Newari
787 nia     Nias
788 nic     Niger-Kordofanian (Other)
789 niu     Niuean
790 nno     Norwegian (Nynorsk)
791 nob     Norwegian (Bokmål)
792 nog     Nogai
793 non     Old Norse
794 nor     Norwegian
795 nso     Northern Sotho
796 nub     Nubian languages
797 nya     Nyanja
798 nym     Nyamwezi
799 nyn     Nyankole
800 nyo     Nyoro
801 nzi     Nzima
802 oci     Occitan (post-1500)
803 oji     Ojibwa
804 ori     Oriya
805 orm     Oromo
806 osa     Osage
807 oss     Ossetic
808 ota     Turkish, Ottoman
809 oto     Otomian languages
810 paa     Papuan (Other)
811 pag     Pangasinan
812 pal     Pahlavi
813 pam     Pampanga
814 pan     Panjabi
815 pap     Papiamento
816 pau     Palauan
817 peo     Old Persian (ca. 600-400 B.C.)
818 per     Persian
819 phi     Philippine (Other)
820 phn     Phoenician
821 pli     Pali
822 pol     Polish
823 pon     Ponape
824 por     Portuguese
825 pra     Prakrit languages
826 pro     Provençal (to 1500)
827 pus     Pushto
828 que     Quechua
829 raj     Rajasthani
830 rap     Rapanui
831 rar     Rarotongan
832 roa     Romance (Other)
833 roh     Raeto-Romance
834 rom     Romani
835 rum     Romanian
836 run     Rundi
837 rus     Russian
838 sad     Sandawe
839 sag     Sango (Ubangi Creole)
840 sah     Yakut
841 sai     South American Indian (Other)
842 sal     Salishan languages
843 sam     Samaritan Aramaic
844 san     Sanskrit
845 -sao    Samoan
846 sas     Sasak
847 sat     Santali
848 scc     Serbian
849 sco     Scots
850 scr     Croatian
851 sel     Selkup
852 sem     Semitic (Other)
853 sga     Irish, Old (to 1100)
854 sgn     Sign languages
855 shn     Shan
856 -sho    Shona
857 sid     Sidamo
858 sin     Sinhalese
859 sio     Siouan (Other)
860 sit     Sino-Tibetan (Other)
861 sla     Slavic (Other)
862 slo     Slovak
863 slv     Slovenian
864 sma     Southern Sami
865 sme     Northern Sami
866 smi     Sami
867 smj     Lule Sami
868 smn     Inari Sami
869 smo     Samoan
870 sms     Skolt Sami
871 sna     Shona
872 snd     Sindhi
873 -snh    Sinhalese
874 snk     Soninke
875 sog     Sogdian
876 som     Somali
877 son     Songhai
878 sot     Sotho
879 spa     Spanish
880 srd     Sardinian
881 srr     Serer
882 ssa     Nilo-Saharan (Other)
883 -sso    Sotho
884 ssw     Swazi
885 suk     Sukuma
886 sun     Sundanese
887 sus     Susu
888 sux     Sumerian
889 swa     Swahili
890 swe     Swedish
891 -swz    Swazi
892 syr     Syriac
893 -tag    Tagalog
894 tah     Tahitian
895 tai     Tai (Other)
896 -taj    Tajik
897 tam     Tamil
898 -tar    Tatar
899 tat     Tatar
900 tel     Telugu
901 tem     Temne
902 ter     Terena
903 tet     Tetum
904 tgk     Tajik
905 tgl     Tagalog
906 tha     Thai
907 tib     Tibetan
908 tig     Tigré
909 tir     Tigrinya
910 tiv     Tiv
911 tkl     Tokelauan
912 tli     Tlingit
913 tmh     Tamashek
914 tog     Tonga (Nyasa)
915 ton     Tongan
916 tpi     Tok Pisin
917 -tru    Truk
918 tsi     Tsimshian
919 tsn     Tswana
920 tso     Tsonga
921 -tsw    Tswana
922 tuk     Turkmen
923 tum     Tumbuka
924 tup     Tupi languages
925 tur     Turkish
926 tut     Altaic (Other)
927 tvl     Tuvaluan
928 twi     Twi
929 tyv     Tuvinian
930 udm     Udmurt
931 uga     Ugaritic
932 uig     Uighur
933 ukr     Ukrainian
934 umb     Umbundu
935 und     Undetermined
936 urd     Urdu
937 uzb     Uzbek
938 vai     Vai
939 ven     Venda
940 vie     Vietnamese
941 vol     Volapük
942 vot     Votic
943 wak     Wakashan languages
944 wal     Walamo
945 war     Waray
946 was     Washo
947 wel     Welsh
948 wen     Sorbian languages
949 wln     Walloon
950 wol     Wolof
951 xal     Kalmyk
952 xho     Xhosa
953 yao     Yao (Africa)
954 yap     Yapese
955 yid     Yiddish
956 yor     Yoruba
957 ypk     Yupik languages
958 zap     Zapotec
959 zen     Zenaga
960 zha     Zhuang
961 znd     Zande
962 zul     Zulu
963 zun     Zuni
964 \.
965
966 CREATE TABLE config.item_form_map (
967         code    TEXT    PRIMARY KEY,
968         value   TEXT    NOT NULL
969 );
970
971 COPY config.item_form_map FROM STDIN;
972 a       Microfilm
973 b       Microfiche
974 c       Microopaque
975 d       Large print
976 f       Braille
977 r       Regular print reproduction
978 s       Electronic
979 \.
980
981 CREATE TABLE config.item_type_map (
982         code    TEXT    PRIMARY KEY,
983         value   TEXT    NOT NULL
984 );
985
986 COPY config.item_type_map FROM STDIN;
987 a       Language material
988 t       Manuscript language material
989 g       Projected medium
990 k       Two-dimensional nonprojectable graphic
991 r       Three-dimensional artifact or naturally occurring object
992 o       Kit
993 p       Mixed materials
994 e       Cartographic material
995 f       Manuscript cartographic material
996 c       Notated music
997 d       Manuscript notated music
998 i       Nonmusical sound recording
999 j       Musical sound recording
1000 m       Computer file
1001 \.
1002
1003 COMMIT;
1004