3 ms·
Definitely not what I want. I'm perfectly happy getting both fields at the same time in a single query the way I do now. > and moves more of the domain's const
by crazygringo 1y ago
Definitely not what I want. I'm perfectly happy getting both fields at the same time in a single query the way I do now.
> and moves more of the domain's constraints into the database schema where it belongs.
No, I prefer to keep my domain constraints at the application level where they're far more flexible.
The database is for storing information, not for validating my business logic.
I mean, I realize some people want to build some of that logic into the database, especially when many applications interact with it. But it's not a superior design pattern. If you have a single application, it's perfectly valid and desirable to put all business logic in the application, not the database.