macbre/index-digest

Report primary keys with a generic "id" name

macbre opened this issue · 0 comments

Inspired by sqlcheck - #73

generic_primary_key

Skip using a generic primary key (id) - Adding an id column to every table causes several effects that make its use seem arbitrary. You might end up creating a redundant key or allow duplicate rows if you add this column in a compound key. The name id is so generic that it holds no meaning. This is especially important when you join two tables and they have the same primary key column name.

https://github.com/jarulraj/sqlcheck/blob/master/docs/logical/1004.md