DEV Community

Discussion on: Database constraints are (often) harmful

Collapse
 
jonlauridsen profile image
Jon Lauridsen • Edited

I see your angle. What I find necessary is to challenge the dogma I sense of always creating constraints. I want to trust the code to handle business requirements and I see no issue joining manually.

I do see where you’re coming from with your financial comment and it could be true: The data storage constraints can act as a kind of extra bookkeeping check, further enhancing correctness on top of test-automation. It's sound logic. But I suspect I’d still want to see how far we can guarantee correctness in the code, with appropriate layers of test automation.