Skip to main content

Practice · 2 of 3

Junction Integrity

CHALLENGE
Difficulty: intermediate+25 XP

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" }.

Back to lesson: Practice: Schema Design — Practice