Skip to content

User model vs. Indexer model

Jacob deGroot-Maggetti edited this page Aug 12, 2022 · 1 revision

CantusDB has two models that refer to individual human beings, User and Indexer. Users and Indexers are stored differently in OldCantus, and for the time being, we are preserving this difference in NewCantus, though these two models may eventually be combined. The differences between and the purposes of the two models are outlined below:

  • Indexers are outward-facing, each with a page that can be navigated to and viewed. Indexers are also manually created - someone needs to go in and spell out their name and institution. Users, on the other hand, are user accounts, and are for internal use only - each User is an individual who can log in with their username and password, and we keep a record of which User added/edited what in order to keep track of the internal operation of the database.
  • Some users are not indexers (e.g. an undergraduate student who proofreads just a few chants as part of a course, or Jan the developer, who has a couple of user accounts for testing purposes but is not doing research) and some indexers are not users (e.g. in years/decades past, researchers prepared inventories which were distributed via hard drive, and which were later incorporated into the database. But the people who originally did the inventorying do not have accounts for CantusDB). This explains the discrepancies between the list of Users and the list of Indexers.
  • For Sources: There are some fields in Source objects that we want to be publicly visible: proofreaders, inventoried_by, full_text_entered_by, melodies_entered_by, indexed_by, and perhaps other_editors, so these fields are associated with Indexers. For internal use, we also have one or two fields that point to Users (e.g. current_editors) to control which users have access to edit the chants in that source.
  • For individual Chants, however, the public doesn't need to see such fine-grained detail, so there are no fields for Chants that point to Indexers (we still keep track of whether individual chants have been proofread and by whom, so we keep a proofread_by field that points to a User)

A few observations in summary:

  • Indexers are only ever associated with Sources, and never with Chants. Some users are associated with Sources, but only to control edit access to the chants within those sources.
  • Fields that point to Indexers are always manually specified, while some fields (specifically, Chant fields) that point to Users are automatically generated (for example, when a user presses save on the proofreading form, they are automatically added to the relevant chant as a proofread_by)