]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/src/sql/Pg/002.schema.config.sql
adding audience map; adding multiple filters (type,form,lit-type,audience,lang)
[working/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.audience_map (
451         code            "char"  PRIMARY KEY,
452         value           TEXT    NOT NULL,
453         description     TEXT
454 );
455
456 COPY config.audience_map FROM STDIN;
457         Unknown or unspecified  The target audience for the item not known or not specified.
458 a       Preschool       The item is intended for children, approximate ages 0-5 years.
459 b       Primary The item is intended for children, approximate ages 6-8 years.
460 c       Pre-adolescent  The item is intended for young people, approximate ages 9-13 years.
461 d       Adolescent      The item is intended for young people, approximate ages 14-17 years.
462 e       Adult   The item is intended for adults.
463 f       Specialized     The item is aimed at a particular audience and the nature of the presentation makes the item of little interest to another audience.
464 g       General The item is of general interest and not aimed at an audience of a particular intellectual level.
465 j       Juvenile        The item is intended for children and young people, approximate ages 0-15 years.
466 \.
467
468
469 CREATE TABLE config.lit_form_map (
470         code            "char"  PRIMARY KEY,
471         value           TEXT    NOT NULL,
472         description     TEXT
473 );
474
475 COPY config.lit_form_map FROM STDIN;
476 0       Not fiction (not further specified)     The item is not a work of fiction and no further identification of the literary form is desired
477 1       Fiction (not further specified) The item is a work of fiction and no further identification of the literary form is desired
478 c       Comic strips    \N
479 d       Dramas  \N
480 e       Essays  \N
481 f       Novels  \N
482 h       Humor, satires, etc.    The item is a humorous work, satire or of similar literary form.
483 i       Letters The item is a single letter or collection of correspondence.
484 j       Short stories   The item is a short story or collection of short stories.
485 m       Mixed forms     The item is a variety of literary forms (e.g., poetry and short stories).
486 p       Poetry  The item is a poem or collection of poems.
487 s       Speeches        The item is a speech or collection of speeches.
488 u       Unknown The literary form of the item is unknown.
489 \.
490
491 CREATE TABLE config.language_map (
492         code    TEXT    PRIMARY KEY,
493         value   TEXT    NOT NULL
494 );
495
496 COPY config.language_map FROM STDIN;
497 aar     Afar
498 abk     Abkhaz
499 ace     Achinese
500 ach     Acoli
501 ada     Adangme
502 ady     Adygei
503 afa     Afroasiatic (Other)
504 afh     Afrihili (Artificial language)
505 afr     Afrikaans
506 -ajm    Aljamía
507 aka     Akan
508 akk     Akkadian
509 alb     Albanian
510 ale     Aleut
511 alg     Algonquian (Other)
512 amh     Amharic
513 ang     English, Old (ca. 450-1100)
514 apa     Apache languages
515 ara     Arabic
516 arc     Aramaic
517 arg     Aragonese Spanish
518 arm     Armenian
519 arn     Mapuche
520 arp     Arapaho
521 art     Artificial (Other)
522 arw     Arawak
523 asm     Assamese
524 ast     Bable
525 ath     Athapascan (Other)
526 aus     Australian languages
527 ava     Avaric
528 ave     Avestan
529 awa     Awadhi
530 aym     Aymara
531 aze     Azerbaijani
532 bad     Banda
533 bai     Bamileke languages
534 bak     Bashkir
535 bal     Baluchi
536 bam     Bambara
537 ban     Balinese
538 baq     Basque
539 bas     Basa
540 bat     Baltic (Other)
541 bej     Beja
542 bel     Belarusian
543 bem     Bemba
544 ben     Bengali
545 ber     Berber (Other)
546 bho     Bhojpuri
547 bih     Bihari
548 bik     Bikol
549 bin     Edo
550 bis     Bislama
551 bla     Siksika
552 bnt     Bantu (Other)
553 bos     Bosnian
554 bra     Braj
555 bre     Breton
556 btk     Batak
557 bua     Buriat
558 bug     Bugis
559 bul     Bulgarian
560 bur     Burmese
561 cad     Caddo
562 cai     Central American Indian (Other)
563 -cam    Khmer
564 car     Carib
565 cat     Catalan
566 cau     Caucasian (Other)
567 ceb     Cebuano
568 cel     Celtic (Other)
569 cha     Chamorro
570 chb     Chibcha
571 che     Chechen
572 chg     Chagatai
573 chi     Chinese
574 chk     Truk
575 chm     Mari
576 chn     Chinook jargon
577 cho     Choctaw
578 chp     Chipewyan
579 chr     Cherokee
580 chu     Church Slavic
581 chv     Chuvash
582 chy     Cheyenne
583 cmc     Chamic languages
584 cop     Coptic
585 cor     Cornish
586 cos     Corsican
587 cpe     Creoles and Pidgins, English-based (Other)
588 cpf     Creoles and Pidgins, French-based (Other)
589 cpp     Creoles and Pidgins, Portuguese-based (Other)
590 cre     Cree
591 crh     Crimean Tatar
592 crp     Creoles and Pidgins (Other)
593 cus     Cushitic (Other)
594 cze     Czech
595 dak     Dakota
596 dan     Danish
597 dar     Dargwa
598 day     Dayak
599 del     Delaware
600 den     Slave
601 dgr     Dogrib
602 din     Dinka
603 div     Divehi
604 doi     Dogri
605 dra     Dravidian (Other)
606 dua     Duala
607 dum     Dutch, Middle (ca. 1050-1350)
608 dut     Dutch
609 dyu     Dyula
610 dzo     Dzongkha
611 efi     Efik
612 egy     Egyptian
613 eka     Ekajuk
614 elx     Elamite
615 eng     English
616 enm     English, Middle (1100-1500)
617 epo     Esperanto
618 -esk    Eskimo languages
619 -esp    Esperanto
620 est     Estonian
621 -eth    Ethiopic
622 ewe     Ewe
623 ewo     Ewondo
624 fan     Fang
625 fao     Faroese
626 -far    Faroese
627 fat     Fanti
628 fij     Fijian
629 fin     Finnish
630 fiu     Finno-Ugrian (Other)
631 fon     Fon
632 fre     French
633 -fri    Frisian
634 frm     French, Middle (ca. 1400-1600)
635 fro     French, Old (ca. 842-1400)
636 fry     Frisian
637 ful     Fula
638 fur     Friulian
639 gaa     Gã
640 -gae    Scottish Gaelic
641 -gag    Galician
642 -gal    Oromo
643 gay     Gayo
644 gba     Gbaya
645 gem     Germanic (Other)
646 geo     Georgian
647 ger     German
648 gez     Ethiopic
649 gil     Gilbertese
650 gla     Scottish Gaelic
651 gle     Irish
652 glg     Galician
653 glv     Manx
654 gmh     German, Middle High (ca. 1050-1500)
655 goh     German, Old High (ca. 750-1050)
656 gon     Gondi
657 gor     Gorontalo
658 got     Gothic
659 grb     Grebo
660 grc     Greek, Ancient (to 1453)
661 gre     Greek, Modern (1453- )
662 grn     Guarani
663 -gua    Guarani
664 guj     Gujarati
665 gwi     Gwich'in
666 hai     Haida
667 hat     Haitian French Creole
668 hau     Hausa
669 haw     Hawaiian
670 heb     Hebrew
671 her     Herero
672 hil     Hiligaynon
673 him     Himachali
674 hin     Hindi
675 hit     Hittite
676 hmn     Hmong
677 hmo     Hiri Motu
678 hun     Hungarian
679 hup     Hupa
680 iba     Iban
681 ibo     Igbo
682 ice     Icelandic
683 ido     Ido
684 iii     Sichuan Yi
685 ijo     Ijo
686 iku     Inuktitut
687 ile     Interlingue
688 ilo     Iloko
689 ina     Interlingua (International Auxiliary Language Association)
690 inc     Indic (Other)
691 ind     Indonesian
692 ine     Indo-European (Other)
693 inh     Ingush
694 -int    Interlingua (International Auxiliary Language Association)
695 ipk     Inupiaq
696 ira     Iranian (Other)
697 -iri    Irish
698 iro     Iroquoian (Other)
699 ita     Italian
700 jav     Javanese
701 jpn     Japanese
702 jpr     Judeo-Persian
703 jrb     Judeo-Arabic
704 kaa     Kara-Kalpak
705 kab     Kabyle
706 kac     Kachin
707 kal     Kalâtdlisut
708 kam     Kamba
709 kan     Kannada
710 kar     Karen
711 kas     Kashmiri
712 kau     Kanuri
713 kaw     Kawi
714 kaz     Kazakh
715 kbd     Kabardian
716 kha     Khasi
717 khi     Khoisan (Other)
718 khm     Khmer
719 kho     Khotanese
720 kik     Kikuyu
721 kin     Kinyarwanda
722 kir     Kyrgyz
723 kmb     Kimbundu
724 kok     Konkani
725 kom     Komi
726 kon     Kongo
727 kor     Korean
728 kos     Kusaie
729 kpe     Kpelle
730 kro     Kru
731 kru     Kurukh
732 kua     Kuanyama
733 kum     Kumyk
734 kur     Kurdish
735 -kus    Kusaie
736 kut     Kutenai
737 lad     Ladino
738 lah     Lahnda
739 lam     Lamba
740 -lan    Occitan (post-1500)
741 lao     Lao
742 -lap    Sami
743 lat     Latin
744 lav     Latvian
745 lez     Lezgian
746 lim     Limburgish
747 lin     Lingala
748 lit     Lithuanian
749 lol     Mongo-Nkundu
750 loz     Lozi
751 ltz     Letzeburgesch
752 lua     Luba-Lulua
753 lub     Luba-Katanga
754 lug     Ganda
755 lui     Luiseño
756 lun     Lunda
757 luo     Luo (Kenya and Tanzania)
758 lus     Lushai
759 mac     Macedonian
760 mad     Madurese
761 mag     Magahi
762 mah     Marshallese
763 mai     Maithili
764 mak     Makasar
765 mal     Malayalam
766 man     Mandingo
767 mao     Maori
768 map     Austronesian (Other)
769 mar     Marathi
770 mas     Masai
771 -max    Manx
772 may     Malay
773 mdr     Mandar
774 men     Mende
775 mga     Irish, Middle (ca. 1100-1550)
776 mic     Micmac
777 min     Minangkabau
778 mis     Miscellaneous languages
779 mkh     Mon-Khmer (Other)
780 -mla    Malagasy
781 mlg     Malagasy
782 mlt     Maltese
783 mnc     Manchu
784 mni     Manipuri
785 mno     Manobo languages
786 moh     Mohawk
787 mol     Moldavian
788 mon     Mongolian
789 mos     Mooré
790 mul     Multiple languages
791 mun     Munda (Other)
792 mus     Creek
793 mwr     Marwari
794 myn     Mayan languages
795 nah     Nahuatl
796 nai     North American Indian (Other)
797 nap     Neapolitan Italian
798 nau     Nauru
799 nav     Navajo
800 nbl     Ndebele (South Africa)
801 nde     Ndebele (Zimbabwe)  
802 ndo     Ndonga
803 nds     Low German
804 nep     Nepali
805 new     Newari
806 nia     Nias
807 nic     Niger-Kordofanian (Other)
808 niu     Niuean
809 nno     Norwegian (Nynorsk)
810 nob     Norwegian (Bokmål)
811 nog     Nogai
812 non     Old Norse
813 nor     Norwegian
814 nso     Northern Sotho
815 nub     Nubian languages
816 nya     Nyanja
817 nym     Nyamwezi
818 nyn     Nyankole
819 nyo     Nyoro
820 nzi     Nzima
821 oci     Occitan (post-1500)
822 oji     Ojibwa
823 ori     Oriya
824 orm     Oromo
825 osa     Osage
826 oss     Ossetic
827 ota     Turkish, Ottoman
828 oto     Otomian languages
829 paa     Papuan (Other)
830 pag     Pangasinan
831 pal     Pahlavi
832 pam     Pampanga
833 pan     Panjabi
834 pap     Papiamento
835 pau     Palauan
836 peo     Old Persian (ca. 600-400 B.C.)
837 per     Persian
838 phi     Philippine (Other)
839 phn     Phoenician
840 pli     Pali
841 pol     Polish
842 pon     Ponape
843 por     Portuguese
844 pra     Prakrit languages
845 pro     Provençal (to 1500)
846 pus     Pushto
847 que     Quechua
848 raj     Rajasthani
849 rap     Rapanui
850 rar     Rarotongan
851 roa     Romance (Other)
852 roh     Raeto-Romance
853 rom     Romani
854 rum     Romanian
855 run     Rundi
856 rus     Russian
857 sad     Sandawe
858 sag     Sango (Ubangi Creole)
859 sah     Yakut
860 sai     South American Indian (Other)
861 sal     Salishan languages
862 sam     Samaritan Aramaic
863 san     Sanskrit
864 -sao    Samoan
865 sas     Sasak
866 sat     Santali
867 scc     Serbian
868 sco     Scots
869 scr     Croatian
870 sel     Selkup
871 sem     Semitic (Other)
872 sga     Irish, Old (to 1100)
873 sgn     Sign languages
874 shn     Shan
875 -sho    Shona
876 sid     Sidamo
877 sin     Sinhalese
878 sio     Siouan (Other)
879 sit     Sino-Tibetan (Other)
880 sla     Slavic (Other)
881 slo     Slovak
882 slv     Slovenian
883 sma     Southern Sami
884 sme     Northern Sami
885 smi     Sami
886 smj     Lule Sami
887 smn     Inari Sami
888 smo     Samoan
889 sms     Skolt Sami
890 sna     Shona
891 snd     Sindhi
892 -snh    Sinhalese
893 snk     Soninke
894 sog     Sogdian
895 som     Somali
896 son     Songhai
897 sot     Sotho
898 spa     Spanish
899 srd     Sardinian
900 srr     Serer
901 ssa     Nilo-Saharan (Other)
902 -sso    Sotho
903 ssw     Swazi
904 suk     Sukuma
905 sun     Sundanese
906 sus     Susu
907 sux     Sumerian
908 swa     Swahili
909 swe     Swedish
910 -swz    Swazi
911 syr     Syriac
912 -tag    Tagalog
913 tah     Tahitian
914 tai     Tai (Other)
915 -taj    Tajik
916 tam     Tamil
917 -tar    Tatar
918 tat     Tatar
919 tel     Telugu
920 tem     Temne
921 ter     Terena
922 tet     Tetum
923 tgk     Tajik
924 tgl     Tagalog
925 tha     Thai
926 tib     Tibetan
927 tig     Tigré
928 tir     Tigrinya
929 tiv     Tiv
930 tkl     Tokelauan
931 tli     Tlingit
932 tmh     Tamashek
933 tog     Tonga (Nyasa)
934 ton     Tongan
935 tpi     Tok Pisin
936 -tru    Truk
937 tsi     Tsimshian
938 tsn     Tswana
939 tso     Tsonga
940 -tsw    Tswana
941 tuk     Turkmen
942 tum     Tumbuka
943 tup     Tupi languages
944 tur     Turkish
945 tut     Altaic (Other)
946 tvl     Tuvaluan
947 twi     Twi
948 tyv     Tuvinian
949 udm     Udmurt
950 uga     Ugaritic
951 uig     Uighur
952 ukr     Ukrainian
953 umb     Umbundu
954 und     Undetermined
955 urd     Urdu
956 uzb     Uzbek
957 vai     Vai
958 ven     Venda
959 vie     Vietnamese
960 vol     Volapük
961 vot     Votic
962 wak     Wakashan languages
963 wal     Walamo
964 war     Waray
965 was     Washo
966 wel     Welsh
967 wen     Sorbian languages
968 wln     Walloon
969 wol     Wolof
970 xal     Kalmyk
971 xho     Xhosa
972 yao     Yao (Africa)
973 yap     Yapese
974 yid     Yiddish
975 yor     Yoruba
976 ypk     Yupik languages
977 zap     Zapotec
978 zen     Zenaga
979 zha     Zhuang
980 znd     Zande
981 zul     Zulu
982 zun     Zuni
983 \.
984
985 CREATE TABLE config.item_form_map (
986         code    TEXT    PRIMARY KEY,
987         value   TEXT    NOT NULL
988 );
989
990 COPY config.item_form_map FROM STDIN;
991 a       Microfilm
992 b       Microfiche
993 c       Microopaque
994 d       Large print
995 f       Braille
996 r       Regular print reproduction
997 s       Electronic
998 \.
999
1000 CREATE TABLE config.item_type_map (
1001         code    TEXT    PRIMARY KEY,
1002         value   TEXT    NOT NULL
1003 );
1004
1005 COPY config.item_type_map FROM STDIN;
1006 a       Language material
1007 t       Manuscript language material
1008 g       Projected medium
1009 k       Two-dimensional nonprojectable graphic
1010 r       Three-dimensional artifact or naturally occurring object
1011 o       Kit
1012 p       Mixed materials
1013 e       Cartographic material
1014 f       Manuscript cartographic material
1015 c       Notated music
1016 d       Manuscript notated music
1017 i       Nonmusical sound recording
1018 j       Musical sound recording
1019 m       Computer file
1020 \.
1021
1022 COMMIT;
1023