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