Chapter 14. Schema metabib

Table of Contents

Tables in metabib
author_field_entry
browse_entry
browse_entry_def_map
browse_entry_simple_heading_map
combined_author_field_entry
combined_identifier_field_entry
combined_keyword_field_entry
combined_series_field_entry
combined_subject_field_entry
combined_title_field_entry
facet_entry
full_rec
identifier_field_entry
keyword_field_entry
metarecord
metarecord_source_map
real_full_rec
rec_descriptor
record_attr
series_field_entry
subject_field_entry
title_field_entry
Functions in metabib

Below are the tables, views and functions for metabib

Tables in metabib

author_field_entry

  • id bigserial PRIMARY KEY
  • source bigint NOT NULL REFERENCES biblio.table.record-entry
  • field integer NOT NULL REFERENCES config.table.metabib-field
  • value text NOT NULL
  • index_vector tsvector NOT NULL

Indexes on author_field_entry

  • metabib_author_field_entry_index_vector_idx index_vector
  • metabib_author_field_entry_source_idx source
  • metabib_author_field_entry_value_idx "substring"(value, 1, 1024)) WHERE (index_vector = ''::tsvector

browse_entry

  • id bigserial PRIMARY KEY
  • value text UNIQUE #1
  • index_vector tsvector
  • sort_value text UNIQUE #1 NOT NULL

Indexes on browse_entry

  • browse_entry_sort_value_idx sort_value
  • metabib_browse_entry_index_vector_idx index_vector

Tables referencing via foreign key constraints

  • metabib.table.browse-entry-def-map
  • metabib.table.browse-entry-simple-heading-map

browse_entry_def_map

  • id bigserial PRIMARY KEY
  • entry bigint REFERENCES metabib.table.browse-entry
  • def integer REFERENCES config.table.metabib-field
  • source bigint REFERENCES biblio.table.record-entry
  • authority bigint REFERENCES authority.table.record-entry

Indexes on browse_entry_def_map

  • browse_entry_def_map_def_idx def
  • browse_entry_def_map_entry_idx entry
  • browse_entry_def_map_source_idx source

browse_entry_simple_heading_map

  • id bigserial PRIMARY KEY
  • entry bigint REFERENCES metabib.table.browse-entry
  • simple_heading bigint REFERENCES authority.table.simple-heading

Indexes on browse_entry_simple_heading_map

  • browse_entry_sh_map_entry_idx entry
  • browse_entry_sh_map_sh_idx simple_heading

combined_author_field_entry

  • record bigint NOT NULL
  • metabib_field integer
  • index_vector tsvector NOT NULL

Indexes on combined_author_field_entry

  • metabib_combined_author_field_entry_index_vector_idx index_vector
  • metabib_combined_author_field_source_idx metabib_field

combined_identifier_field_entry

  • record bigint NOT NULL
  • metabib_field integer
  • index_vector tsvector NOT NULL

Indexes on combined_identifier_field_entry

  • metabib_combined_identifier_field_entry_index_vector_idx index_vector
  • metabib_combined_identifier_field_source_idx metabib_field

combined_keyword_field_entry

  • record bigint NOT NULL
  • metabib_field integer
  • index_vector tsvector NOT NULL

Indexes on combined_keyword_field_entry

  • metabib_combined_keyword_field_entry_index_vector_idx index_vector
  • metabib_combined_keyword_field_source_idx metabib_field

combined_series_field_entry

  • record bigint NOT NULL
  • metabib_field integer
  • index_vector tsvector NOT NULL

Indexes on combined_series_field_entry

  • metabib_combined_series_field_entry_index_vector_idx index_vector
  • metabib_combined_series_field_source_idx metabib_field

combined_subject_field_entry

  • record bigint NOT NULL
  • metabib_field integer
  • index_vector tsvector NOT NULL

Indexes on combined_subject_field_entry

  • metabib_combined_subject_field_entry_index_vector_idx index_vector
  • metabib_combined_subject_field_source_idx metabib_field

combined_title_field_entry

  • record bigint NOT NULL
  • metabib_field integer
  • index_vector tsvector NOT NULL

Indexes on combined_title_field_entry

  • metabib_combined_title_field_entry_index_vector_idx index_vector
  • metabib_combined_title_field_source_idx metabib_field

facet_entry

  • id bigserial PRIMARY KEY
  • source bigint NOT NULL
  • field integer NOT NULL
  • value text NOT NULL

Indexes on facet_entry

  • metabib_facet_entry_field_idx field
  • metabib_facet_entry_source_idx source
  • metabib_facet_entry_value_idx "substring"(value, 1, 1024)

full_rec

  • id bigint
  • record bigint
  • tag character(3)
  • ind1 text
  • ind2 text
  • subfield text
  • value text
  • index_vector tsvector

identifier_field_entry

  • id bigserial PRIMARY KEY
  • source bigint NOT NULL REFERENCES biblio.table.record-entry
  • field integer NOT NULL REFERENCES config.table.metabib-field
  • value text NOT NULL
  • index_vector tsvector NOT NULL

Indexes on identifier_field_entry

  • metabib_identifier_field_entry_index_vector_idx index_vector
  • metabib_identifier_field_entry_source_idx source
  • metabib_identifier_field_entry_value_idx "substring"(value, 1, 1024)) WHERE (index_vector = ''::tsvector

keyword_field_entry

  • id bigserial PRIMARY KEY
  • source bigint NOT NULL REFERENCES biblio.table.record-entry
  • field integer NOT NULL REFERENCES config.table.metabib-field
  • value text NOT NULL
  • index_vector tsvector NOT NULL

Indexes on keyword_field_entry

  • metabib_keyword_field_entry_index_vector_idx index_vector
  • metabib_keyword_field_entry_source_idx source
  • metabib_keyword_field_entry_value_idx "substring"(value, 1, 1024)) WHERE (index_vector = ''::tsvector

metarecord

  • id bigserial PRIMARY KEY
  • fingerprint text NOT NULL
  • master_record bigint REFERENCES biblio.table.record-entry
  • mods text

Indexes on metarecord

  • metabib_metarecord_fingerprint_idx fingerprint
  • metabib_metarecord_master_record_idx master_record

Tables referencing via foreign key constraints

  • metabib.table.metarecord-source-map

metarecord_source_map

  • id bigserial PRIMARY KEY
  • metarecord bigint NOT NULL REFERENCES metabib.table.metarecord
  • source bigint NOT NULL REFERENCES biblio.table.record-entry

Indexes on metarecord_source_map

  • metabib_metarecord_source_map_metarecord_idx metarecord
  • metabib_metarecord_source_map_source_record_idx source

real_full_rec

  • id bigint PRIMARY KEY DEFAULT nextval('metabib.full_rec_id_seq'::regclass)
  • record bigint NOT NULL REFERENCES biblio.table.record-entry
  • tag character(3) NOT NULL
  • ind1 text
  • ind2 text
  • subfield text
  • value text NOT NULL
  • index_vector tsvector NOT NULL

Indexes on real_full_rec

  • metabib_full_rec_02x_tag_subfield_lower_substring tag, subfield, lower("substring"(value, 1, 1024))) WHERE (tag = ANY (ARRAY['020'::bpchar, '022'::bpchar, '024'::bpchar])
  • metabib_full_rec_index_vector_idx index_vector
  • metabib_full_rec_isxn_caseless_idx lower(value)) WHERE (tag = ANY (ARRAY['020'::bpchar, '022'::bpchar, '024'::bpchar])
  • metabib_full_rec_record_idx record
  • metabib_full_rec_tag_subfield_idx tag, subfield
  • metabib_full_rec_value_idx "substring"(value, 1, 1024)
  • metabib_full_rec_value_tpo_index "substring"(value, 1, 1024) text_pattern_ops

rec_descriptor

  • id bigint
  • record bigint
  • item_type text
  • item_form text
  • bib_level text
  • control_type text
  • char_encoding text
  • enc_level text
  • audience text
  • lit_form text
  • type_mat text
  • cat_form text
  • pub_status text
  • item_lang text
  • vr_format text
  • date1 text
  • date2 text

record_attr

  • id bigint PRIMARY KEY REFERENCES biblio.table.record-entry
  • attrs hstore NOT NULL DEFAULT ''::hstore

Indexes on record_attr

  • metabib_svf_attrs_idx attrs
  • metabib_svf_date1_idx attrs -> 'date1'::text
  • metabib_svf_dates_idx attrs -> 'date1'::text, attrs -> 'date2'::text

series_field_entry

  • id bigserial PRIMARY KEY
  • source bigint NOT NULL REFERENCES biblio.table.record-entry
  • field integer NOT NULL REFERENCES config.table.metabib-field
  • value text NOT NULL
  • index_vector tsvector NOT NULL

Indexes on series_field_entry

  • metabib_series_field_entry_index_vector_idx index_vector
  • metabib_series_field_entry_source_idx source
  • metabib_series_field_entry_value_idx "substring"(value, 1, 1024)) WHERE (index_vector = ''::tsvector

subject_field_entry

  • id bigserial PRIMARY KEY
  • source bigint NOT NULL REFERENCES biblio.table.record-entry
  • field integer NOT NULL REFERENCES config.table.metabib-field
  • value text NOT NULL
  • index_vector tsvector NOT NULL

Indexes on subject_field_entry

  • metabib_subject_field_entry_index_vector_idx index_vector
  • metabib_subject_field_entry_source_idx source
  • metabib_subject_field_entry_value_idx "substring"(value, 1, 1024)) WHERE (index_vector = ''::tsvector

title_field_entry

  • id bigserial PRIMARY KEY
  • source bigint NOT NULL REFERENCES biblio.table.record-entry
  • field integer NOT NULL REFERENCES config.table.metabib-field
  • value text NOT NULL
  • index_vector tsvector NOT NULL

Indexes on title_field_entry

  • metabib_title_field_entry_index_vector_idx index_vector
  • metabib_title_field_entry_source_idx source
  • metabib_title_field_entry_value_idx "substring"(value, 1, 1024)) WHERE (index_vector = ''::tsvector