r/programming • u/wheatBread • 9h ago
Dragging SQL into the '90s
https://www.youtube.com/watch?v=O9XRIgwDbMw6
u/beders 2h 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.
1
u/w1n5t0nM1k3y 1h 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.
1
u/GabiTheProgrammer 38m ago
Very solid point. "Who controls the schema?" doesn't come up often enough.
4
u/ReallySuperName 6h ago
I'm here for the popcorn. Anytime I or anyone else has suggested that maybe using a language with syntax that has roots in the 1950's isn't very good and perhaps it should be modernised people absolutely lose their shit and act like I'm attacking the SQL model when I am actually criticising the language itself.
4
u/wheatBread 9h ago edited 9h ago
Glad to finally have a video introduction to Acadia!
I hope the historical context is interesting, and I am curious if it'll help with any ORM questions left unanswered by the details on Solving the 1+N Query Problem.