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