ErwinKomen / RU-wnd

Dutch language dialect dictionaries, Radboud University Nijmegen
0 stars 0 forks source link

WGD: prevent doubles #50

Open ErwinKomen opened 2 years ago

ErwinKomen commented 2 years ago

Make sure no 'doubles' are read into the db. A double is an entry that is identical to one that has already been read (i.e. the Entry fields are identical to one that has already been read).

ErwinKomen commented 2 years ago

I added the following code to excel_to_fixture():

Check if this contains the same information as the previous one
if iValid == 0:
    iValid = isLineEqual(oLine, oPrevious)

This means that doubles are not read further into the interface. The only problem with skipping entries (doubles) is that information kind of gets lost. This leads us to the larger 'problem' of trackability of entries. Right now it is not possible to find out what happened to a particular entry (dialectopgave), given its reference number from the filled-in card.

Resolution to te above

  1. Add a table Opgave that contains fields: entry (FK) and reference (the reference number)
  2. When entering the information,
    1. every line with a reference number gets a record in Opgave
    2. only those that are part of an entry that fulfills all criteria get a FK to Entry
    3. entries that are equal (same lemma/trefwoord/dialectwoord/dialect) point to the same Entry

I haven't implemented the above (yet). If this is desirable, then turn it into a new point