rules repository

G-1220 – Avoid composite primary keys.

Composite primary keys can make data modeling and querying more complicated because relationships become harder to manage and maintain. They often involve multiple columns in join operations, leading to verbose queries and increased chance of errors or performance issues. Opting for a single-column surrogate key helps ensure a simpler, more consistent design that is easier to change or extend in the future.

Tags: Modeling.

Quality area: Maintainability. Severity: Major. Fixing time: Other.

No rule selected