I have an opinion based question about software development and I'm wondering where to ask it.

For reference draft of the question is as follows:

Title: How to handle constraints on user input data when no constraints are given?

Based on this post I'm lead to believe that using varchar(max) in a SQL Server DB isn't the best practice. At the beginning of the project I was unable to derive constraints for any of my text fields and I decided to play it safe and use varchar(max). Having worked on previous projects I have seen multiple instances where a user base started using fields to store data other than what it was intended for (worst instance was CC data in a comment section).

Normally I would identify and converse with the user base to better determine the meta information on the data that will be stored, but this project is meant to replace different solutions adopted by multiple different user groups (each with a potential unique set of definitions for each field) and a key metric for this project is user adoption (aka make the users happy to use the new system).

Currently I now have a bottle neck in my application because I can't easily index a varchar(max) field and I was wondering what solution would have been able to mitigate this and when should I have done during the life cycle of the project development?



Browse other questions tagged .