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