Hacker News new | ask | show | jobs
by lupusreal 804 days ago
It virtually never works. ORMs letting you change databases is something ORM proponents like to suggest but very rarely does it work without a ton of work (nullifying the point.)
1 comments

I have been DB-agnostic for 20 years, and it has never been a problem, except when I meet ORMs or "SQL-based solutions" (usually procedures and/or views) that are specific to one database.

Luckily, I'm in a position where I can choose for our clients, so... :)

Oh I see MySQL added functional indexing in 8.0.13, that’s the main thing I would miss from Postgres. Partial indexes are also nice to have, but I suppose a sophisticated enough ORM could map them to functional ones, at least in so far as testing is concerned. The memory use would likely be much higher than a proper partial index.
> Oh I see MySQL added functional indexing in 8.0.13, [...]

We're talking about agonostic ORMs, not specific benefits for each of the databases.

I wish there were an SQL standard. But, the best part of standards is that there are so many of them. :(

Oh I was thinking of ORMs like Prisma, where the single ORM System is responsible for both runtime mapping of objects to relations, and development/deployment time provisioning of schemas, migrations, indexes, etc.