inveniosoftware / invenio

Invenio digital library framework
https://invenio.readthedocs.io
MIT License
623 stars 292 forks source link

RFC: new circulation module #2976

Closed mvesper closed 8 years ago

mvesper commented 9 years ago

The circulation module is going to be rewritten from scratch in Invenio 2, making it more flexible and covering more library use cases. The purpose of this RFC is to discuss current development stages.

Current stage: Data structure

It's about what to store in a database.

Two ideas:

    1+-----------------+                                          
+--->|Record           |                                          
|    +-----------------+                                          
|    |Won't change this|                                          
|    +-----------------+                                          
|                                                                 
|            +---------------------------------+                  
|            v1                                |                  
|    +--------------+        n+------------+   |                  
|    |ItemManager   |    +--->|Item        |   |                  
|    +--------------+    |    +------------+   |                  
+----+record        |    |    |item_manager+---+                  
     |items: []     +----+ +--+infos       |                      
     |requesters: []+--+   |  |status: []  |                      
     +--------------+  |   |  |history: [] +---------------+      
                       |   |  +------------+               |      
+----------------------+   |           ^n                  |      
|                          |           |                   vn     
|   n+-----------+1        |           |             +-----------+
+---^+Borrower   +^--------+           |             |Event      |
     +-----------+                     |             +-----------+
     |           |                     |             |date       |
     |loans: []  +---------------------+             |description|
     |history: []+---------------------------------->|borrower   |
     ------------+                                  n|item       |
                                                     +-----------+
    1+-----------------+                       
+--->|Record           |                       
|    +-----------------+                       
|    |Won't change this|                       
|    +-----------------+                       
|                                              
|           +---------------------------------+
|           vn                                |
|    +--------------+        1+-----------+   |
|    |Item          |    +--->|Borrower   |   |
|    +--------------+    |    +-----------+   |
+----+record        |    |    |loans: []  +---+
     |borrower      +----+    |history: []+---+
     |status: []    |         +-----------+   |
+----+history: []   |               ^n        |
|    |requesters: []+---------------+         |
|    +--------------+                         |
|                                             |
|                                             |
|   n+-----------+n                           |
+--->|Event      |<---------------------------+
     +-----------+                             
     |date       |                             
     |description|                             
     |borrower   |                             
     |item       |                             
     +-----------+                             

Personally, I suggest the second approach.

Criticism and ideas are highly encouraged :)

jirikuncar commented 9 years ago

Simple (first iteration)

Objects

Relations

States

Second iteration

Objects

Relations

States

Actors

Can we start with proper state machine? Can we meet and create a model in e.g. http://www.uppaal.org/ (please note the uppal requires licence!) ?

aw-bib commented 9 years ago

Some further iteration:

Pinging some of our fellow librarians in join2 for additional input: @katringrosse, @CLSi, @mahncm, @shesselbach, @martinkoehler

kaplun commented 9 years ago
  • States need to be configurable. Additional states would be at least
    • missing
    • reference work (== not for loan)
    • permanent loan (this could also be handled as a sublocation)
  • It would be nice if states can be configured by a librarian not a programmer

Agree on the configurability, up to a certain limit, since some states are expected to exists in order for workflows to correctly work (e.g. from on-shelf to on-loan etc.)

  • The "on shelf" (= shelfing and location) state needs to be more explicit (probably not in this part of the model?): on what shelf?
    • Items might be in several departments
    • several libraries
    • several sublocations within a library (common is: one reference work not for loan, one or several for loan)

A single item can be in a single position (shelf/department/library), and typically it's a stable property for the item. So either the book is on loan, or when it's on shelf it's in its declared position. (which can be of course amended).

  • It can well be, that holding a history of all borrowers of a given item runs into legal issues (privacy). In Germany you may hold the last borrower (sure) but not those before => clipping of borrower history needs to be configurable.

Good point.

tiborsimko commented 9 years ago

Some additional musings:

In addition to @aw-bib's CC list above, I'm CC-ing also @Kennethhole @PXke who may have other requirements coming from @tind clients, and @anastass @jgarcial who may offer insight from IAEA workflows.

aw-bib commented 9 years ago

@kaplun: for configurability, I agree that there's a defined set. Probably, it needs elaboration, but this might depend on the model further down the road. One can treat permanent loans like a collection of a library, maybe this is a better approach.

For the defined shelf: My musing was in the direction of item = one bibliographic item (=record), which holds several of your items. I think now it's clear to me what your item is. Still more status info (thinking in 876 $j in Marc) is locked even to your items: you're right , that "on shelf" is the status, however, Marc 876 always goes with 852 defining which shelf.

@tiborsimko: for individual articles in a proceedings volume, if you want to make them available for lending, you'd have individual bibliographic records and add holdings to them, not the parent. You'd need this anyway for retrieval on the users side. I agree that I'd also have a parent record as a common bracket around them (requires record linking), but the holdings, status and such would live on the articles, not on the parent entity. Very similar are multi volume works which are very common. E.g. you'd catalogue every volume of the Britannica Biographical encyclopedia of artists and not just Encyclopedia Britannica, 4 Volumes A-Z (E.g. http://gso.gbv.de/DB=2.1/PPNSET?PPN=523994168 for the parent, http://gso.gbv.de/DB=2.1/SET=7/TTL=1/FAM?PPN=523994168 for the children). Another very similar thing where it is quite obvious, would be a book series. Surely, you'd catalogue every book and the series would only be used as the bracket.

Still, even if you might not love it (you don't have to), I'd check into the Marc Holdings (852)[http://www.loc.gov/marc/holdings/hd852.html] and (876/878)[http://www.loc.gov/marc/holdings/hd876878.html]. I discussed the issue of cataloging with @katringrosse, @CLSi and also our local man at the front @mahncm. It crystallized that the current procedure of doing bibedit the click through the holdings stuff is not very convenient. For our case I thus implemented a simple one way sync from Marc 852/876 to the internal tables as this is a much more streamlined work flow for the cataloguers. I added some field-templates to ease up things (here it would be nice if a field template could add two fields at once) and currently try to integrate a few simple kbs to keep typing to a minimum. The general comment was: "I'm in bibedit anyway for cataloguing, no need to leave it. Make addition of holdings to happen there and with just adding fields." My current implementation uses (indicator 1 == 7 signifies: source in $2 as usual) uses:

subfield value example
2 Source DESY
a Library DESY Hamburg Library
b collection Permanent Loan
c shelfmark C Loe
h classification C
p barcode 082932
t item number 1
z public note

At DESY NSK is a number similar to an accession number. But the real accession number is the the barcode (in general accession number and barcode differ). I don't like the $h yet as it should actually live on the users role but I fear I can't do that in invenio 1.x:

subfield value example
2 Source DESY
a NSK 47538
d Accession date 20141120000000.0
p barcode 082932
h loan period 4 weeks / 1 week / reference
j availability available/missing
t item number 1

I'll have to extend this to model the book of acquisitions completely (adding prices and seller), that's already ticketized at join2.

lnielsen commented 9 years ago

Have you compared the proposed data model from other library systems, e.g. https://github.com/liblime/LibLime-Koha/tree/4_18/t/data/db_schemas

lnielsen commented 9 years ago

or e.g. http://docs.evergreen-ils.org/2.8/schema/

mvesper commented 9 years ago

As discussed with @jirikuncar and @Kennethhole: Maybe we can agree on a name for this module and start a new repository so we can discuss the different aspects of the design in separate RFCs and host some design documents there. We could then use this RFC to summarize the process.

tiborsimko commented 9 years ago

https://github.com/liblime/LibLime-Koha/tree/4_18/t/data/db_schemas

FWIW I posted nicer URL above :stuck_out_tongue_winking_eye:

tiborsimko commented 9 years ago

Maybe we can agree on a name for this module

I think invenio-circulation would be a good name. This is how the facility is usually called, see for example ILS@Wikipedia:

PXke commented 9 years ago

Some other points :

That's all at the moment.

Kennethhole commented 9 years ago

Regarding message templates: as Invenio support multiple libraries, the signature should reflect the library which lend out the item.

aw-bib commented 9 years ago

@Kennethhole I'd add sublocation (collection in LoC speak) to the list to manage things like:

Dear Kenneth, You have item 823.914: "The book of strange new things" by Michel Faber from the Reference collection of DESY Library, Hamburg (Barcode 01234) on loan. We have a request for this book and would kindly ask...

Reference collection would be such a sublocation. Similar departments local shelfs or the like. (I put the variables of the above in italics.) BTW: perfectly agreed with @PXke that this has to be easily configurable by a non-programmer.

martinkoehler commented 9 years ago

A short comment to other library systems IHMO: Besides KOHA, ALPEH has a lots of use cases as well see http://lib.haifa.ac.il/extprojects/scill/images/pdf/Aleph%2021%20Circ%20guide.pdf

@kaplun With respect to the on-helf: When an item has been requested it is usually put on a request shelf (same can be true if it is returned and still waits for further processing, then its on a return shelf. It might from there be shipped to another sublibrary (e.g. an item from DESY Zeuthen (Berlin) is at DESY Hamburg, it must be shipped back to Zeuthen (Btw1: with the status "in-transit" during shipping :-). BTW2: "in transit" belongs in MARC 876$l (temporary location)) Another shelf is the new item shelf. Items are on-display on that shelf for e.g. one week for users to see them more prominently. Then the item is moved to the "final" loaction (btw. during that stage this item can not be borowed (This is an example for @tiborsimko variable borrowing times)

With respect to the checkout. A self checkout is important for 7/7 opening hours There is a module from KOHA for SIP which might be usefull in this connection.

mvesper commented 9 years ago

Even though there is still a lot of information to process, I split this RFC into 3 RFCs in another repo inveniosoftware/invenio-circulation#2, inveniosoftware/invenio-circulation#3, inveniosoftware/invenio-circulation#4.

This will hopefully lead to a more structured discussion, while this RFC is used for some kind of summary :)

jirikuncar commented 8 years ago

Discussion continues in Invenio-Circulation package.