Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

TL;DR;

* a list of things they don't like in sql

* a list of traits they think a replacement should exhibit by negating the first list

I was kind of hoping for some example of what this much better language should look like



I think the much better language would be the "no language" database. Throw portability to the wind and just have the client ship the query plan directly. The frontend to the database is howerver you want to expose it in your language of choice. I don't think there's any hope of getting disparate db vendors to agree on a compatible frontend language. It seems easier to externalize it.

The closest existing database to this ideal is probably FoundationDB although it also externalizes the query planner, which I don't necessarily consider a downside.


There are some databases you need to write code to interface with. Somehow, one of the first things people need to add to them is a query language which is either SQL or something worse

I don't love SQL, but somehow the alternatives haven't beaten it yet


I like PRQL[0] - fixes stupid warts about SQL.

A few top line items:

  - trailing commas not an error
  - queries can be read/written in linear order, starting with from, and ending on select
  - trivial intermediary keywords (eg you define month_total, and then can re-use month_total in a following calculation, no need to duplicate the calculation logic)
  - no need for a separate `having` keyword when `where` can just be a filter on a group
There is nothing too ground-breaking about it. Just streamlines some logic into a more holistic experience.

[0] https://prql-lang.org/


> trivial intermediary keywords (eg you define month_total, and then can re-use month_total in a following calculation, no need to duplicate the calculation logic)

Postgres already has this.


Maybe I'm holding TFA wrong but to me it seems like they're hinting at wanting a Prolog-as-database that could also become widely used, unlike actual Prolog.

It's not hyper-performant and mega web scale but the object database and Prolog like query language that comes with Picolisp is quite fun and sometimes rather useful, and has helped me think differently about how to model things in the default SQL database engines.


It sounds interesting, although I have learnt both SQL and prolog and one was a lot easier


I'm actually uncertain whether you likely consider SQL or Prolog easier. To me both of them have a kind of late seventies feel that is kind of foreign compared to a lot of software stuff from the last quarter of a century.

Pilog is similar to both, the basics are kind of easy to learn, it's basically a bit of Lisp:ish syntax and keywords for 'give me a subset from these sets'. But it's a graph of objects instead of tables or atoms.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: