config.marc_field

This table stores a list of MARC fields recognized by the Evergreen instance. Note that we’re not aiming for completely generic ISO2709 support: we’re assuming things like three characters for a tag, one-character subfield labels, two indicators per variable data field, and the like, all of which are technically specializations of ISO2709.

Of particular significance is the owner column; if it’s set to a null value, the field definition is assumed to come from a national standards body; if it’s set to a non-null value, the field definition is an OU-level addition to or override of the standard.

Deferrable Constraints: The following FK constraints are deferrable — they are checked at transaction end, not statement end: config_marc_field_owner_fkey, marc_field_marc_format_fkey.

Columns

Column Type Nullable Default Notes

id PK

integer

No

nextval('config.marc_field_id_seq'::regclass)

marc_format FK

integer

No

config.marc_format(id)

marc_record_type

config.marc_record_type

No

tag

character(3)

No

name

text

Yes

description

text

Yes

fixed_field

boolean

Yes

repeatable

boolean

Yes

mandatory

boolean

Yes

hidden

boolean

Yes

owner FK

integer

Yes

actor.org_unit(id)

Primary Key

(id)

Foreign Keys

Column(s) References On Delete On Update Deferrable Constraint

owner

actor.org_unit(id)

NO ACTION

NO ACTION

DEFERRED

config_marc_field_owner_fkey

marc_format

config.marc_format(id)

NO ACTION

NO ACTION

DEFERRED

marc_field_marc_format_fkey

Check Constraints

  • config_standard_marc_tags_are_fully_specified: CHECK

Indexes

Index Method Definition

marc_field_pkey PK

btree

CREATE UNIQUE INDEX marc_field_pkey ON config.marc_field USING btree (id)

config_standard_marc_tags_are_unique UNIQUE

btree

CREATE UNIQUE INDEX config_standard_marc_tags_are_unique ON config.marc_field USING btree (marc_format, marc_record_type, tag) WHERE (owner IS NULL)

config_marc_field_owner_idx

btree

CREATE INDEX config_marc_field_owner_idx ON config.marc_field USING btree (owner)

config_marc_field_tag_idx

btree

CREATE INDEX config_marc_field_tag_idx ON config.marc_field USING btree (tag)