Post has many Comment. Post contain issue_id field and Comment contains comment_id field. The request to create a comment with (issue_id, comment_id) which already exists in the DB should be ignored. Is it worth to add a copy of post_id into Comment (in order to use UNIQUE index to prevent duplicates)? Or should I use transactions?
That is, is denormalization worth the possibility to easily create composite UNIQUE?
That is, is denormalization worth the possibility to easily create composite UNIQUE?