Hi
I'm designing a database to hold my domain objects. I have various validation rules on the objects such as string length and if it must be filled. These things are checked in the C# code. Does it make sense to duplicate this rules in the database, such as setting nvarchar(150) instead of nvarchar(max) and setting nullable to false for fields I know must be entered?
I don't think so, because the data should already be validated when storing them in the database and changes to the requirements must be maintained two places instead of just one.
Please share your thoughts.