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