Practice ยท 2 of 3
Junction Integrity
Write link(tables, taskId, tagId) for the junction table tables.taskTags (array of { taskId, tagId }): both ids must exist (tables.tasks / tables.tags are arrays with .id fields); duplicates (same pair) are rejected. Success => { ok: true, pair } appended; failure => { ok: false, error: "fk-violation" | "duplicate" }.
Difficulty: intermediate
Press Submit to check your solution.
Back to lesson: Practice: Schema Design โ Practice