Remix.run Logo
philipwhiuk 5 hours ago

ORMs are a caching layer for dev time.

They store up conserved programming time and then spend it all at once when you hit the edge case.

If you never hit the case, it's great. As soon as you do, it's all returned with interest :)

xigoi 4 hours ago | parent [-]

The question is why we don’t have database management systems that integrate tightly with the progmming language. Instead we have to communicate between two different paradigms using a textual language, which is itself inefficient.

runroader 4 hours ago | parent | next [-]

We tried that in 90’s RAD environments like Foxpro and others. If it fits the problem, they were great! If not, it’s even worse than with an ORM. They rarely fit today since they were all (or mostly) local-first or even local-only. Scaling was either not possible or pretty difficult.

Shorel 4 hours ago | parent | prev | next [-]

Because every single database vendor will try to lock down their users to their DBMS.

Oracle is a prime example of this. Stored procedures are the place to put all business logic according to Oracle documentation.

This caused backslash from escaping developers who then declared business logic should never be inside the database. To avoid vendor lock-in.

There's no ideal solution, just tradeoffs.

cogman10 4 hours ago | parent [-]

> Because every single database vendor will try to lock down their users to their DBMS.

I mean, that already happens. It's quite rare to see someone migrate from one database to another. Even if they stuck to pure SQL for everything, it's still a pretty daunting process as Postgres SQL and MSSQL won't be the same thing.

ghurtado 39 minutes ago | parent [-]

> It's quite rare to see someone migrate from one database to another.

I'm not discounting the level of effort involved, but I think the reason you don't see this often is because it is rare that simply changing DBMS systems is beneficial in and of itself.

And even if it was frictionless (ie: if we had discovered ORM Samarkanda), the real choices are so limited that even if you did it regularly, you would soon run out of DBMSs to try.

ivan_gammel 4 hours ago | parent | prev [-]

The answer is simple: model optimized for storage and model designed for processing are two different things. The languages used to describe and query them have to be different.

ghurtado 38 minutes ago | parent [-]

> The languages used to describe and query them have to be different.

Absolutely not.

That which is asserted without evidence can be dismissed without evidence.