News for hackers. Stuff that matters.
Re:A terrible schema from a clueless programmer by AdrianB1 on Sunday November 07, 2021 @09:10PM (#29145537)
That sounds like newbie developers wrote that and no DBAs were involved in checking the code, not a database design problem, you are throwing blame without knowing enough about the matter. If your string fit in a varchar, it makes absolutely no sense to change it to nvarchar because your query has unicode as input.
Re:A terrible schema from a clueless programmer by eyelidlessness on Sunday November 07, 2021 @11:24PM (#29146116)
I reread the parent quote several times and cannot detect a hint of throwing blame at all.
Re:A terrible schema from a clueless programmer by superjan on Monday November 08, 2021 @01:53AM (#29146659)
Most, but not all of the team were young, and the DB schema was designed by themselves. I did not intend to throw blame. It is more the kind of situation where a sensible decision (at first glance) creates a footgun down the road.
Re:A terrible schema from a clueless programmer by xupybd on Sunday November 07, 2021 @11:29PM (#29146137)
What? The database made the call to compare the strings as Unicode. Are you accusing the DB developers of not doing their job?
Re:A terrible schema from a clueless programmer by AdrianB1 on Monday November 08, 2021 @08:27AM (#29149004)
Yes, databases don't decide, developers do.