this post was submitted on 26 Jul 2023
23 points (100.0% liked)

Technology

37353 readers
245 users here now

Rumors, happenings, and innovations in the technology sphere. If it's technological news or discussion of technology, it probably belongs here.

Subcommunities on Beehaw:


This community's icon was made by Aaron Schneider, under the CC-BY-NC-SA 4.0 license.

founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 20 points 11 months ago* (last edited 11 months ago) (3 children)

I really wish people would learn SQL instead of learning all the languages/tools that write SQL for them. Why are we abstracting this from ourselves? Is it really that hard to write some set based operations?

[–] [email protected] 6 points 11 months ago (1 children)

As a developer of the compiler from prql to sql, I can say that I'm working on a new language because I know SQL quite in-depth.

It seems ok on surface, but there are many inconsistenties that you either learn to live with or don't even know are there until they trip you.

[–] [email protected] 4 points 11 months ago (2 children)

Yo - my message probably seems like a downer then, and I apologize for that. I've just seen so many ORMs and query builders and other things come and go. And it frustrates me when people want to learn the new hotness rather than learning how to do the thing. Especially when the thing in this case is SQL, the most widely used language for database interaction.

[–] [email protected] 1 points 11 months ago

The way I perceive PRQL is somewhat like SQLAlchemy-Core (the SQL expression layer, not the ORM). Almost a 1:1 mapping to SQL but softening the rough edges in SQL when constructing more complex queries dynamically, in particular: no function calls, no real variables, only string concatenation. While SQLAlchemy-Core lets you even extract sub-queries into variables, I don't know about how powerful PRQL is in this regard.

From what I see from the docs I'm rather hopeful though.

[–] [email protected] 1 points 11 months ago

No biggie, it a nice entry barrier to have, because nowadays, there just too much new frameworks and languages and crypto currencies.

[–] [email protected] 6 points 11 months ago

I don't get it either, I don't feel it's difficult to learn. Personally I very much enjoy writing SQL. It's satisfying.

[–] [email protected] 3 points 11 months ago

@dark_stang @seasonone as someone who uses both: abstraction is mostly about (a) cross-compatibility (making one command work across multiple different database backends) and (b) interfacing more naturally with code to reduce the work needed to make changes