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