Synopsis: ID Required

Let’s learn about an antipattern that specifies the importance of using specific keys in a database.

Recently, a software developer asked me a question about preventing duplicate rows. It’s a question I get asked frequently and the first response that comes to mind is to ask the developer to check if she lacks a primary key. But in this case, this wasn’t the problem.

The developer in this case had stored articles for publishing on a website in his content management database. He had used an intersection table for a many-to-many association between a table of articles and a table of tags.

Get hands-on with 1200+ tech skills courses.