Is it better to check for allowed domain values on the frond end or let the database engine handle the domain integrity. For example If you have a data entry form for employee, is it better to check for allowed values on the data entry form before submitting the data to the database assuming network IO is not a big issue. What if there are lots of checks to be performed, would the engine be faster or would checking the value on the front end take the load of the dB engine?
Domain integrity check in application
entity;sql domain
It is best to have checks in both places.Have checks on the client side in order to give direct feedback to the client without having to roundtrip to the server.Have checks on the server side because you can't trust the client (you never know if data has been spoofed, someone hacked your UI or whatever).