TicketTags Table
Description: Associative table to establish a many-to-many relationship between tickets and tags.
Table Definition:
CREATE TABLE TicketTags (
ticketId INT NOT NULL,
tagId INT NOT NULL,
PRIMARY KEY (ticketId, tagId),
FOREIGN KEY (ticketId) REFERENCES Ticket(id),
FOREIGN KEY (tagId) REFERENCES Tags(id)
);
Fields:
| Field Name | Data Type | Nullability | Constraints | Description |
|---|---|---|---|---|
| ticketId | INT | NOT NULL | PRIMARY KEY, FOREIGN KEY | References Ticket(id). |
| tagId | INT | NOT NULL | PRIMARY KEY, FOREIGN KEY | References Tags(id). |