Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-11016

Improvements to the tag, tag_instance and tag_correlation tables...

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 1.9
    • Fix Version/s: 1.9
    • Component/s: General
    • Labels:
      None
    • Environment:
      Any, Moodle 1.9
    • Database:
      Any
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE

      Description

      After a review of the cool new tag system.... I would propose to:

      1) tag table:

      • the userid field should be unsigned.
      • the descriptionformat should be unsigned too.
      • the userid field should be a FK to the user->id (table->column) field. This will, automatically, create one index.
      • potentially one new UNIQUE index on tagtype, name could be created if there are queries using both fields in the WHERE part

      2) tag_instance table:

      • the current tagid, itemtype, itemid index should be dropped.
      • the tagid field should be unsigned.
      • the tagid field should be a FK to the tag->id (table->column) field. This will, automatically, create one index.
      • the itemid and the ordering should be unsigned (not sure about the ordering one, review).
      • one new index on (itemtype, itemid) should be created (potentially it can have the tagid field in 3rd position and make it unique)

      3) tag_correlation table:

      • the tagid field should be unsigned.
      • the tagid index should be dropped.
      • the tagid should be a FK to the tag->id (table->column) field. This will, automatically, create one index. You can define it as UNIQUE FOEIGN KEY to make the index unique if there is an 1:1 relation.

      That's all, I think. Ciao

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  3/Mar/08