Hacker News new | ask | show | jobs
by mattmanser 4620 days ago
Why?

I think pretending that there aren't massive and very specific differences between SQL implementations is pointless. I would far prefer a tight, concise DB specific object than an over-verbose generic one.

So in reality, what does it gain you?

I haven't heard anyone talking about DB agnosticism in web dev for years, it was an odd idea that popped up in the mid-2000s and died the pointless death it deserved. Not only that, you should invariably wrap any such driver in another object to cut the verbosity down, so what was the point? There are specific types of code base that need to be DB agnostic, and web apps is definitely not one of them.

I've migrated a non-trivial app (10,000-100,000 LOC) from MySQL to SQL Server in C#, the only SQL queries I didn't have to change were the basic SELECT statements. Took me about a week and it was actually super useful having DB specific objects as when I finally ripped out the MySQL library reference, I could be confident that I had migrated every path (although that obviously only worked because it was a statically typed language).

1 comments

> I haven't heard anyone talking about DB agnosticism in web dev for years, it was an odd idea that popped up in the mid-2000s and died the pointless death it deserved.

ODBC and JDBC are both older than that, and still alive and well and popular today.