News for hackers. Stuff that matters.
Re:Show HN: PRQL 0.2 – a better SQL by maximilianroos on Monday June 27, 2022 @03:06PM (#31899246)
Great point, we'll add that.

I don't think we do joins that much better than SQL does. We're thinking whether there's potential there, maybe through understanding foreign keys — but we're being conservative about introducing change without value.

Re:Show HN: PRQL 0.2 – a better SQL by igorkraw on Monday June 27, 2022 @03:47PM (#31899808)
I looked at the book after this and have to say, I'd heavily recommend spending the next dew months just improving joins (and complex joins especially). Like GP says, relational modelling is the interesting bit about SQL and I don't feel exaggerative in saying the only reason I use SQL are joins, and so the only reason I'd introduce the complexity of your project into my stack would be if it makes handling joins, views and other aspects of relational modeling and slicing nicer - one example could be many to many relationships, or the gradient between graph/document based and normalised table based modeling
Re:Show HN: PRQL 0.2 – a better SQL by switchbak on Tuesday June 28, 2022 @01:59AM (#31904572)
I second this. However, it's important that we don't make it so easy that we hide the cost of the join itself.
Re:Show HN: PRQL 0.2 – a better SQL by Sankozi on Tuesday June 28, 2022 @03:02AM (#31904964)
The biggest failure of SQL joins is not using declared foreign keys. For example it should be something like "JOIN USING fk_invoice_customer c" instead of repeating each time the relationship between invoice and customer entries already defined in foreign key
Re:Show HN: PRQL 0.2 – a better SQL by neamar on Tuesday June 28, 2022 @03:35AM (#31905155)
Most engines support NATURAL JOIN, which isn't perfect and has drawbacks, but allows for shorter joins.
Re:Show HN: PRQL 0.2 – a better SQL by riezebos on Tuesday June 28, 2022 @04:09AM (#31905357)
I always found it surprising that joining on foreign key is not possible in SQL. I'm no expert, but looking at PRQL this feels like it should fit in quite well with the philosophy.
Re:Show HN: PRQL 0.2 – a better SQL by maximilianroos on Monday June 27, 2022 @03:13PM (#31899348)