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