User Tools

Site Tools


acq:serials:basic_predicting_and_receiving

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
acq:serials:basic_predicting_and_receiving [2010/05/13 15:47] – add asset.copy_template idea dbw2acq:serials:basic_predicting_and_receiving [2022/02/10 13:34] (current) – external edit 127.0.0.1
Line 1: Line 1:
 ====== Proposal: Serials - Basic Predicting and Receiving ====== ====== Proposal: Serials - Basic Predicting and Receiving ======
 FIXME This proposal is still in progress, please do not edit yet FIXME FIXME This proposal is still in progress, please do not edit yet FIXME
 +
 +Okay - but let's keep a link to the [[https://docs.google.com/drawings/view?id=196Cyl9CAIzZ33cOVt0AphvUSbAwc9kfRGRB5Nz-5tTI&hl=en&pli=1|latest schema diagram]] handy, at least.
 +
 ===== Summary ===== ===== Summary =====
 Now that MFHD records can be added and are linked to bib records, the next step is to start populating the issuance table in order to predict and receive issues. As issues are received the MFHD record must be updated accordingly.  This proposal will focus on fleshing-out the database schema and defining how the MFHD record will hook in. Now that MFHD records can be added and are linked to bib records, the next step is to start populating the issuance table in order to predict and receive issues. As issues are received the MFHD record must be updated accordingly.  This proposal will focus on fleshing-out the database schema and defining how the MFHD record will hook in.
Line 15: Line 18:
  id BIGSERIAL PRIMARY KEY,  id BIGSERIAL PRIMARY KEY,
  record BIGINT REFERENCES biblio.record_entry (id) ON DELETE SET NULL DEFERRABLE INITIALLY DEFERRED,  record BIGINT REFERENCES biblio.record_entry (id) ON DELETE SET NULL DEFERRABLE INITIALLY DEFERRED,
- owning_lib INT NOT NULL DEFAULT 1 REFERENCES actor.org_unit (id) ON DELETE SET NULL DEFERRABLE INITIALLY DEFERRED, + owning_lib INT REFERENCES actor.org_unit (id) ON DELETE SET NULL DEFERRABLE INITIALLY DEFERRED, 
- creator INT NOT NULL DEFAULT 1+ creator INT NOT NULL REFERENCES actor.usr (id) DEFERRABLE INITIALLY DEFERRED
- editor INT NOT NULL DEFAULT 1,+ editor INT NOT NULL REFERENCES actor.usr (id) DEFERRABLE INITIALLY DEFERRED,
  source INT,  source INT,
  create_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),  create_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
Line 63: Line 66:
 CREATE TABLE serial.issuance ( CREATE TABLE serial.issuance (
  id SERIAL PRIMARY KEY,  id SERIAL PRIMARY KEY,
- creator INT NOT NULL DEFAULT 1+ creator INT NOT NULL REFERENCES actor.usr (id) DEFERRABLE INITIALLY DEFERRED
-        editor INT NOT NULL DEFAULT 1,+        editor INT NOT NULL REFERENCES actor.usr (id) DEFERRABLE INITIALLY DEFERRED,
         create_date TIMESTAMP WITH TIME ZONE        NOT NULL DEFAULT now(),         create_date TIMESTAMP WITH TIME ZONE        NOT NULL DEFAULT now(),
         edit_date TIMESTAMP WITH TIME ZONE        NOT NULL DEFAULT now(),         edit_date TIMESTAMP WITH TIME ZONE        NOT NULL DEFAULT now(),
Line 71: Line 74:
         date_published TIMESTAMP WITH TIME ZONE DEFAULT NULL,         date_published TIMESTAMP WITH TIME ZONE DEFAULT NULL,
         holding_code TEXT DEFAULT NULL,         holding_code TEXT DEFAULT NULL,
-        holding_type TEXT DEFAULT NULL CHECK (holding_type IN (NULL,'basic','supplement','index')),+        holding_type TEXT DEFAULT NULL CHECK ( holding_type IS NULL OR holding_type IN ('basic','supplement','index') ),
         holding_link_id INT DEFAULT NULL         holding_link_id INT DEFAULT NULL
  -- TODO: add columns for separate enumeration/chronology values  -- TODO: add columns for separate enumeration/chronology values
Line 78: Line 81:
 CREATE TABLE serial.item ( CREATE TABLE serial.item (
  id SERIAL PRIMARY KEY,  id SERIAL PRIMARY KEY,
- creator INT NOT NULL DEFAULT 1+ creator INT NOT NULL REFERENCES actor.usr (id) DEFERRABLE INITIALLY DEFERRED
-        editor INT NOT NULL DEFAULT 1,+        editor INT NOT NULL REFERENCES actor.usr (id) DEFERRABLE INITIALLY DEFERRED,
         create_date TIMESTAMP WITH TIME ZONE        NOT NULL DEFAULT now(),         create_date TIMESTAMP WITH TIME ZONE        NOT NULL DEFAULT now(),
         edit_date TIMESTAMP WITH TIME ZONE        NOT NULL DEFAULT now(),         edit_date TIMESTAMP WITH TIME ZONE        NOT NULL DEFAULT now(),
Line 99: Line 102:
  id SERIAL PRIMARY KEY,  id SERIAL PRIMARY KEY,
  item INT NOT NULL REFERENCES serial.item (id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED,  item INT NOT NULL REFERENCES serial.item (id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED,
- creator INT NOT NULL DEFAULT 1,+ creator INT NOT NULL REFERENCES actor.usr (id) DEFERRABLE INITIALLY DEFERRED,
  create_date TIMESTAMP WITH TIME ZONE DEFAULT NOW(),  create_date TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
  pub BOOL NOT NULL DEFAULT FALSE,  pub BOOL NOT NULL DEFAULT FALSE,
Line 133: Line 136:
  id SERIAL PRIMARY KEY,  id SERIAL PRIMARY KEY,
  owning_lib INT NOT NULL REFERENCES actor.org_unit (id) DEFERRABLE INITIALLY DEFERRED,  owning_lib INT NOT NULL REFERENCES actor.org_unit (id) DEFERRABLE INITIALLY DEFERRED,
- creator BIGINT NOT NULL, + creator BIGINT NOT NULL REFERENCES actor.usr (id) DEFERRABLE INITIALLY DEFERRED
- editor BIGINT NOT NULL,+ editor BIGINT NOT NULL REFERENCES actor.usr (id) DEFERRABLE INITIALLY DEFERRED,
  create_date TIMESTAMP WITH TIME ZONE DEFAULT NOW(),  create_date TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
  edit_date TIMESTAMP WITH TIME ZONE DEFAULT NOW(),  edit_date TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
 + name TEXT NOT NULL,
  -- columns above this point are attributes of the template itself  -- columns above this point are attributes of the template itself
  -- columns after this point are attributes of the copy this template modifies/creates  -- columns after this point are attributes of the copy this template modifies/creates
Line 142: Line 146:
  status INT,  status INT,
  location INT,  location INT,
- loan_duration INT CHECK ( loan_duration IN (NULL,1,2,3) ), + loan_duration INT CHECK ( loan_duration IS NULL OR loan_duration IN (1,2,3) ), 
- fine_level INT CHECK ( fine_level IN (NULL,1,2,3) ),+ fine_level INT CHECK ( loan_duration IS NULL OR loan_duration IN (1,2,3) ),
  age_protect INT,  age_protect INT,
  circulate BOOL,  circulate BOOL,
Line 153: Line 157:
  circ_modifier TEXT,  circ_modifier TEXT,
  circ_as_type TEXT,  circ_as_type TEXT,
- --not sure if these 'dummy' cols make sense in a template (what do they do?) 
- --dummy_title TEXT, 
- --dummy_author TEXT, 
  alert_message TEXT,  alert_message TEXT,
  opac_visible BOOL,  opac_visible BOOL,
Line 177: Line 178:
  id BIGSERIAL PRIMARY KEY,  id BIGSERIAL PRIMARY KEY,
  record BIGINT REFERENCES biblio.record_entry (id) ON DELETE SET NULL DEFERRABLE INITIALLY DEFERRED,  record BIGINT REFERENCES biblio.record_entry (id) ON DELETE SET NULL DEFERRABLE INITIALLY DEFERRED,
- owning_lib INT NOT NULL DEFAULT 1 REFERENCES actor.org_unit (id) ON DELETE SET NULL DEFERRABLE INITIALLY DEFERRED, + owning_lib INT NOT NULL REFERENCES actor.org_unit (id) ON DELETE SET NULL DEFERRABLE INITIALLY DEFERRED, 
- creator INT NOT NULL DEFAULT 1+ creator INT NOT NULL REFERENCES actor.usr (id) DEFERRABLE INITIALLY DEFERRED
- editor INT NOT NULL DEFAULT 1,+ editor INT NOT NULL REFERENCES actor.usr (id) DEFERRABLE INITIALLY DEFERRED,
  source INT,  source INT,
  create_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),  create_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
Line 232: Line 233:
 CREATE TABLE serial.issuance ( CREATE TABLE serial.issuance (
  id SERIAL PRIMARY KEY,  id SERIAL PRIMARY KEY,
- creator INT NOT NULL DEFAULT 1+ creator INT NOT NULL REFERENCES actor.usr (id) DEFERRABLE INITIALLY DEFERRED
-        editor INT NOT NULL DEFAULT 1,+        editor INT NOT NULL REFERENCES actor.usr (id) DEFERRABLE INITIALLY DEFERRED,
         create_date TIMESTAMP WITH TIME ZONE        NOT NULL DEFAULT now(),         create_date TIMESTAMP WITH TIME ZONE        NOT NULL DEFAULT now(),
         edit_date TIMESTAMP WITH TIME ZONE        NOT NULL DEFAULT now(),         edit_date TIMESTAMP WITH TIME ZONE        NOT NULL DEFAULT now(),
Line 261: Line 262:
  id SERIAL PRIMARY KEY,  id SERIAL PRIMARY KEY,
  issuance INT NOT NULL REFERENCES serial.issuance (id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED,  issuance INT NOT NULL REFERENCES serial.issuance (id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED,
- creator INT NOT NULL DEFAULT 1,+ creator INT NOT NULL REFERENCES actor.usr (id) DEFERRABLE INITIALLY DEFERRED,
  create_date TIMESTAMP WITH TIME ZONE DEFAULT NOW(),  create_date TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
  pub BOOL NOT NULL DEFAULT FALSE,  pub BOOL NOT NULL DEFAULT FALSE,
Line 270: Line 271:
 CREATE TABLE serial.claim ( CREATE TABLE serial.claim (
  id SERIAL PRIMARY KEY,  id SERIAL PRIMARY KEY,
- creator INT NOT NULL DEFAULT 1+ creator INT NOT NULL REFERENCES actor.usr (id) DEFERRABLE INITIALLY DEFERRED
-        editor INT NOT NULL DEFAULT 1,+        editor INT NOT NULL REFERENCES actor.usr (id) DEFERRABLE INITIALLY DEFERRED,
         create_date TIMESTAMP WITH TIME ZONE        NOT NULL DEFAULT now(),         create_date TIMESTAMP WITH TIME ZONE        NOT NULL DEFAULT now(),
         edit_date TIMESTAMP WITH TIME ZONE        NOT NULL DEFAULT now(),         edit_date TIMESTAMP WITH TIME ZONE        NOT NULL DEFAULT now(),
Line 320: Line 321:
   - The system will then temporarily reinstantiate the last available issuance for the journal in question, predict another issuance based on this instance, then add the new issuance to the database.   - The system will then temporarily reinstantiate the last available issuance for the journal in question, predict another issuance based on this instance, then add the new issuance to the database.
 It is also desirable for the user to have the ability to 'regenerate all predictions' for any given serial. It is also desirable for the user to have the ability to 'regenerate all predictions' for any given serial.
 +
 +===== Historical info of potential interest =====
 +[[acq:serials:proto_schema_geometry|Proto-schema using geometric datatypes for issuance tracking and indexing]]
  
 ===== Status Updates ===== ===== Status Updates =====
 +  * 2010-05-17: Added historical proto-schema
   * 2010-05-03: Schema and diagram updated   * 2010-05-03: Schema and diagram updated
   * 2010-03-03: Schema proposal update, diagram added   * 2010-03-03: Schema proposal update, diagram added
   * 2009-11: Initial preview   * 2009-11: Initial preview
acq/serials/basic_predicting_and_receiving.1273780076.txt.gz · Last modified: 2022/02/10 13:33 (external edit)

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki

© 2008-2022 GPLS and others. Evergreen is open source software, freely licensed under GNU GPLv2 or later.
The Evergreen Project is a U.S. 501(c)3 non-profit organization.