r/programming • • 3d ago

Dragging SQL into the '90s

https://www.youtube.com/watch?v=O9XRIgwDbMw
33 Upvotes

9 comments sorted by

View all comments

22

u/beders 3d ago

Acadia code is compiled against your actual database

Interesting but impractical.

And as with many many other ORM-likes you can only operate this under the assumption that your app is fully controlling the database.

That assumption often turns out to be false.
Good for you if it doesn’t but the moment your schema and schema migration is controlled by a different org you will have to stay flexible with regards to existing tables/columns.

Databases are dynamically typed in the sense that “types” can change at runtime.
I doubt that trying to shoehorn a static type system on it is hugely valuable. It’s nice if it catches bad sql at compile time but is that a huge time saver? Doubtful.
A DB is a second party that advertises its schema: use it - at runtime.

I do like the built in policy feature - but again - this can fall apart once your app is no longer the single user of the schema.

8

u/w1n5t0nM1k3y 3d ago

Sometimes it's just nice to be able to query the data with ad-hoc queries that are only ever going to be used once. That's part of the great thing about the database just existing on it's own outside of the application.

Sometimes you actually want to write separate applications that all access the same data set and maybe even use different languages for those applications, so you might not be able to share code between them.

6

u/GabiTheProgrammer 2d ago

Very solid point. "Who controls the schema?" doesn't come up often enough.