# tag_instance

0 rows

### Description

tag_instance table holds the information of associations between tags and other items

### Columns

Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments
--- | --- | --- | --- | --- | --- | --- | --- | ---
id | BIGINT | 19 |  | √ | null |  |  |
tagid | BIGINT | 19 |  |  | null |  |
tag.id | taginst_tag2_fkR
component | VARCHAR | 100 |  |  |  |  |  | Defines the Moodle component which the tag was added to
itemtype | VARCHAR | 100 |  |  |  |  |  |
itemid | BIGINT | 19 |  |  | null |  |  |
contextid | BIGINT | 19 | √ |  | null |  |
context.id | taginst_con2_fkR
| The context id of the item that was tagged
tiuserid | BIGINT | 19 |  |  | 0 |  |  |
ordering | BIGINT | 19 | √ |  | null |  |  | Maintains the order of the tag instances of an item
timecreated | BIGINT | 19 |  |  | 0 |  |  |
timemodified | BIGINT | 19 |  |  | 0 |  |  | timemodified

### Indexes

Constraint Name | Type | Sort | Column(s)
--- | --- | --- | ---
PRIMARY | Primary key | Asc | id
taginst_comiteitecontiutag_uix | Must be unique | Asc/Asc/Asc/Asc/Asc/Asc | component + itemtype + itemid + contextid + tiuserid + tagid
taginst_con_ix | Performance | Asc | contextid
taginst_itecomtagcon_ix | Performance | Asc/Asc/Asc/Asc | itemtype + component + tagid + contextid
taginst_tag_ix | Performance | Asc | tagid

### Relationships