Schema vandelay

Table: authority_attr_definition

Columns: 

field name : datatype -- parameters, contraints and notes
id : serial -- PRIMARY KEY,
code : text -- UNIQUE, NOT NULL,
description : text --
xpath : text -- NOT NULL,
remove : text -- NOT NULL, DEFAULT ''::text,
ident : boolean -- NOT NULL, DEFAULT false,

Tables referencing vandelay.queued_authority_record_attr via Foreign Key Constraints: 

vandelay.queued_authority_record_attr 

Table: authority_match

Columns: 

field name : datatype -- parameters, contraints and notes
id : bigserial -- PRIMARY KEY,
matched_attr : integer -- REFERENCES vandelay.queued_authority_record_attr.
queued_record : bigint -- REFERENCES vandelay.queued_authority_record.
eg_record : bigint -- REFERENCES authority.record_entry.

Table: authority_queue

Columns: 

field name : datatype -- parameters, contraints and notes
id : bigint -- PRIMARY KEY, DEFAULT nextval('vandelay.queue_id_seq'::regclass),
owner : integer -- UNIQUE#1, NOT NULL,
name : text -- UNIQUE#1, NOT NULL,
complete : boolean -- NOT NULL, DEFAULT false,
queue_type : text -- UNIQUE#1, NOT NULL, DEFAULT 'authority'::text,

Constraints: 

authority_queue_queue_type_check : CHECK ((queue_type = 'authority'::text))
queue_queue_type_check : CHECK ((queue_type = ANY (ARRAY['bib'::text, 'authority'::text])))

Tables referencing vandelay.queued_authority_record via Foreign Key Constraints: 

vandelay.queued_authority_record 

Table: bib_attr_definition

Columns: 

field name : datatype -- parameters, contraints and notes
id : serial -- PRIMARY KEY,
code : text -- UNIQUE, NOT NULL,
description : text --
xpath : text -- NOT NULL,
remove : text -- NOT NULL, DEFAULT ''::text,
ident : boolean -- NOT NULL, DEFAULT false,

Tables referencing vandelay.queued_bib_record_attr via Foreign Key Constraints: 

vandelay.queued_bib_record_attr 

Table: bib_match

Columns: 

field name : datatype -- parameters, contraints and notes
id : bigserial -- PRIMARY KEY,
field_type : text -- NOT NULL,
matched_attr : integer -- REFERENCES vandelay.queued_bib_record_attr.
queued_record : bigint -- REFERENCES vandelay.queued_bib_record.
eg_record : bigint -- REFERENCES biblio.record_entry.

Constraints: 

bib_match_field_type_check : CHECK ((field_type = ANY (ARRAY['isbn'::text, 'tcn_value'::text, 'id'::text])))

Table: bib_queue

Columns: 

field name : datatype -- parameters, contraints and notes
id : bigint -- PRIMARY KEY, DEFAULT nextval('vandelay.queue_id_seq'::regclass),
owner : integer -- UNIQUE#1, NOT NULL,
name : text -- UNIQUE#1, NOT NULL,
complete : boolean -- NOT NULL, DEFAULT false,
queue_type : text -- UNIQUE#1, NOT NULL, DEFAULT 'bib'::text,
item_attr_def : bigint -- REFERENCES vandelay.import_item_attr_definition.

Constraints: 

bib_queue_queue_type_check : CHECK ((queue_type = 'bib'::text))
queue_queue_type_check : CHECK ((queue_type = ANY (ARRAY['bib'::text, 'authority'::text])))

Tables referencing vandelay.queued_bib_record via Foreign Key Constraints: 

vandelay.queued_bib_record 

Table: import_bib_trash_fields

Columns: 

field name : datatype -- parameters, contraints and notes
id : bigserial -- PRIMARY KEY,
owner : integer -- UNIQUE#1, NOT NULL, REFERENCES actor.org_unit.
field : text -- UNIQUE#1, NOT NULL,

Table: import_item

Columns: 

field name : datatype -- parameters, contraints and notes
id : bigserial -- PRIMARY KEY,
record : bigint -- NOT NULL, REFERENCES vandelay.queued_bib_record.
definition : bigint -- NOT NULL, REFERENCES vandelay.import_item_attr_definition.
owning_lib : integer --
circ_lib : integer --
call_number : text --
copy_number : integer --
status : integer --
location : integer --
circulate : boolean --
deposit : boolean --
deposit_amount : numeric(8,2) --
ref : boolean --
holdable : boolean --
price : numeric(8,2) --
barcode : text --
circ_modifier : text --
circ_as_type : text --
alert_message : text --
pub_note : text --
priv_note : text --
opac_visible : boolean --

Table: import_item_attr_definition

Columns: 

field name : datatype -- parameters, contraints and notes
id : bigserial -- PRIMARY KEY,
owner : integer -- UNIQUE#1, NOT NULL, REFERENCES actor.org_unit.
name : text -- UNIQUE#1, NOT NULL,
tag : text -- NOT NULL,
keep : boolean -- NOT NULL, DEFAULT false,
owning_lib : text --
circ_lib : text --
call_number : text --
copy_number : text --
status : text --
location : text --
circulate : text --
deposit : text --
deposit_amount : text --
ref : text --
holdable : text --
price : text --
barcode : text --
circ_modifier : text --
circ_as_type : text --
alert_message : text --
opac_visible : text --
pub_note_title : text --
pub_note : text --
priv_note_title : text --
priv_note : text --

Tables referencing vandelay.bib_queue via Foreign Key Constraints: 

vandelay.bib_queuevandelay.import_item

Table: merge_profile

Columns: 

field name : datatype -- parameters, contraints and notes
id : bigserial -- PRIMARY KEY,
owner : integer -- UNIQUE#1, NOT NULL, REFERENCES actor.org_unit.
name : text -- UNIQUE#1, NOT NULL,
add_spec : text --
replace_spec : text --
strip_spec : text --
preserve_spec : text --

Constraints: 

add_replace_strip_or_preserve : CHECK ((((preserve_spec IS NOT NULL) OR (replace_spec IS NOT NULL)) OR ((preserve_spec IS NULL) AND (replace_spec IS NULL))))

Table: queue

Columns: 

field name : datatype -- parameters, contraints and notes
id : bigserial -- PRIMARY KEY,
owner : integer -- UNIQUE#1, NOT NULL, REFERENCES actor.usr.
name : text -- UNIQUE#1, NOT NULL,
complete : boolean -- NOT NULL, DEFAULT false,
queue_type : text -- UNIQUE#1, NOT NULL, DEFAULT 'bib'::text,

Constraints: 

queue_queue_type_check : CHECK ((queue_type = ANY (ARRAY['bib'::text, 'authority'::text])))

Table: queued_authority_record

Columns: 

field name : datatype -- parameters, contraints and notes
id : bigint -- PRIMARY KEY, DEFAULT nextval('vandelay.queued_record_id_seq'::regclass),
create_time : timestamp with time zone -- NOT NULL, DEFAULT now(),
import_time : timestamp with time zone --
purpose : text -- NOT NULL, DEFAULT 'import'::text,
marc : text -- NOT NULL,
queue : integer -- NOT NULL, REFERENCES vandelay.authority_queue.
imported_as : integer -- REFERENCES authority.record_entry.

Constraints: 

queued_record_purpose_check : CHECK ((purpose = ANY (ARRAY['import'::text, 'overlay'::text])))

Indexes: 

queued_authority_record_queue_idx : queue

Tables referencing vandelay.authority_match via Foreign Key Constraints: 

vandelay.authority_matchvandelay.queued_authority_record_attr

Table: queued_authority_record_attr

Columns: 

field name : datatype -- parameters, contraints and notes
id : bigserial -- PRIMARY KEY,
record : bigint -- NOT NULL, REFERENCES vandelay.queued_authority_record.
field : integer -- NOT NULL, REFERENCES vandelay.authority_attr_definition.
attr_value : text -- NOT NULL,

Indexes: 

queued_authority_record_attr_record_idx : record

Tables referencing vandelay.authority_match via Foreign Key Constraints: 

vandelay.authority_match 

Table: queued_bib_record

Columns: 

field name : datatype -- parameters, contraints and notes
id : bigint -- PRIMARY KEY, DEFAULT nextval('vandelay.queued_record_id_seq'::regclass),
create_time : timestamp with time zone -- NOT NULL, DEFAULT now(),
import_time : timestamp with time zone --
purpose : text -- NOT NULL, DEFAULT 'import'::text,
marc : text -- NOT NULL,
queue : integer -- NOT NULL, REFERENCES vandelay.bib_queue.
bib_source : integer -- REFERENCES config.bib_source.
imported_as : bigint -- REFERENCES biblio.record_entry.

Constraints: 

queued_record_purpose_check : CHECK ((purpose = ANY (ARRAY['import'::text, 'overlay'::text])))

Indexes: 

queued_bib_record_queue_idx : queue

Tables referencing vandelay.bib_match via Foreign Key Constraints: 

vandelay.bib_matchvandelay.import_item
vandelay.queued_bib_record_attr 

Table: queued_bib_record_attr

Columns: 

field name : datatype -- parameters, contraints and notes
id : bigserial -- PRIMARY KEY,
record : bigint -- NOT NULL, REFERENCES vandelay.queued_bib_record.
field : integer -- NOT NULL, REFERENCES vandelay.bib_attr_definition.
attr_value : text -- NOT NULL,

Indexes: 

queued_bib_record_attr_record_idx : record

Tables referencing vandelay.bib_match via Foreign Key Constraints: 

vandelay.bib_match 

Table: queued_record

Columns: 

field name : datatype -- parameters, contraints and notes
id : bigserial -- PRIMARY KEY,
create_time : timestamp with time zone -- NOT NULL, DEFAULT now(),
import_time : timestamp with time zone --
purpose : text -- NOT NULL, DEFAULT 'import'::text,
marc : text -- NOT NULL,

Constraints: 

queued_record_purpose_check : CHECK ((purpose = ANY (ARRAY['import'::text, 'overlay'::text])))

add_field(field text, source_xml text, target_xml text)

Function Properties
Language: SQL
Return Type: text

add_field(force_add text, field text, source_xml text, target_xml integer)

Function Properties
Language: PLPERLU
Return Type: text

auto_overlay_authority_queue(merge_profile_id bigint, queue_id integer)

Function Properties
Language: PLPGSQL
Return Type: SET OF bigint

auto_overlay_authority_queue(queue_id bigint)

Function Properties
Language: SQL
Return Type: SET OF bigint

auto_overlay_authority_record(merge_profile_id bigint, import_id integer)

Function Properties
Language: PLPGSQL
Return Type: boolean

auto_overlay_bib_queue(merge_profile_id bigint, queue_id integer)

Function Properties
Language: PLPGSQL
Return Type: SET OF bigint

auto_overlay_bib_queue(queue_id bigint)

Function Properties
Language: SQL
Return Type: SET OF bigint

auto_overlay_bib_record(merge_profile_id bigint, import_id integer)

Function Properties
Language: PLPGSQL
Return Type: boolean

cleanup_authority_marc()

Function Properties
Language: PLPGSQL
Return Type: trigger

cleanup_bib_marc()

Function Properties
Language: PLPGSQL
Return Type: trigger

compile_profile(incoming_xml text)

Function Properties
Language: PLPGSQL
Return Type: compile_profile

find_bib_tcn_data(xml text)

Function Properties
Language: PLPGSQL
Return Type: SET OF tcn_data

ingest_authority_marc()

Function Properties
Language: PLPGSQL
Return Type: trigger

ingest_bib_items()

Function Properties
Language: PLPGSQL
Return Type: trigger

ingest_bib_marc()

Function Properties
Language: PLPGSQL
Return Type: trigger

ingest_items(attr_def_id bigint, import_id bigint)

Function Properties
Language: PLPGSQL
Return Type: SET OF import_item

match_bib_record()

Function Properties
Language: PLPGSQL
Return Type: trigger

merge_record_xml(strip_rule text, replace_preserve_rule text, add_rule text, source_xml text, target_xml text)

Function Properties
Language: SQL
Return Type: text

merge_record_xml(template_marc text, target_marc text)

Function Properties
Language: PLPGSQL
Return Type: text

overlay_authority_record(merge_profile_id bigint, eg_id bigint, import_id integer)

Function Properties
Language: PLPGSQL
Return Type: boolean

overlay_bib_record(merge_profile_id bigint, eg_id bigint, import_id integer)

Function Properties
Language: PLPGSQL
Return Type: boolean

replace_field(field text, source_xml text, target_xml text)

Function Properties
Language: PLPGSQL
Return Type: text

strip_field(field text, xml text)

Function Properties
Language: PLPERLU
Return Type: text

template_overlay_bib_record(eg_id text, v_marc bigint)

Function Properties
Language: SQL
Return Type: boolean

template_overlay_bib_record(merge_profile_id text, eg_id bigint, v_marc integer)

Function Properties
Language: PLPGSQL
Return Type: boolean