How would you skip vulgar words using base 36 against an Id column in sql server 08?
-
18-09-2019 - |
Question
I need the shortest possible Ids so I figure base-36 would work wonderful for this. The thought is I'll just use an auto-incrementing Id field as the primary key and then create a base-36 userid. Unfortunately I'll inevitably run into a lot of vulgar word combinations. I'm having a hard time wrapping my head around the best approach to solve this because the suspect word could be in any combination of strings.
Any thoughts?
Thanks
Solution
You could omit vowels from your selection of digits (either using base 31 or adding some more characters to bring it back up to 32 or 36 or whatever).
If your system can handle being case sensitive, then you can use both upper and lower case letters to extend your range of digits. You indicated that length is important, so this might be a useful approach.