I've been in SQL hell the last couple of weeks, so I'm definitely not making jokes about it. The brilliant non-engineers where I work basically put all of the non- UI-related business logic in the fucking data layer, so the powerful and modern language C#, with its extensive .NET library at its disposal, is used merely for marshalling data from the UI to SQL Server, and all of the business logic has to be written in a fucking scripting language (T-SQL).
I like T-SQL, but not for doing 90% of the application's logic in!!! So I've gotten the chance to learn about MERGE and its OUTPUT clause. And PIVOT. And this week I get to learn about recursive queries and STUFF. God I want a job where they use an OR/M.
p.s. And our database schema, and who dictated how we would use it, is from a 30-year-old junior DBA, who my brilliant fucking PHB hired into a Database Manager V level position. (At most companies a level 5 position requires 20+ years of experience to be eligible for; i.e. not exactly meant for a sysadmin (and he's really good at that, incidently) who just recently added DBA stuff and who apparently has never worked on a development project before.
So data for an entity is scattered across multiple tables, entities' ID's aren't stable (because no updates are allowed, everything has to be an archive and insert), so integer PK's mean nothing as an additional GUID column is what remains stable across "updates", and no updates are allowed that aren't strictly changes, so everything has to be checked on a save to see what parts of a conceptual record aren't changed in the tables they're located in!
Mapping tables out the wazoo, for relationships that aren't 1:M or M:N, in a big mess of inconsistently named columns across tables. The data layer is wagging the application, and an infant is in charge because the big boss is an apathetic asshole. Thankfully, I think I have only one more week left of this, where my save sproc calls seven others, because there's so much logic to perform for a save of a simple form, and then it'll be done. Until the next project, which I hope and pray I'm not around for.
p.p.s. And he doesn't care about isolation levels. So if any of the views in our web application are ever edited concurrently by two or more users, data corruption. God I miss working with software engineers.