Live data from Hacker News

Show HN: EdgeDB 1.0

edgedb.com

151–160 of 332 posts

Re: Show HN: EdgeDB 1.0

#151
post #62

Can someone from EdgeDB explain why the SQL isn't as simple as what I have below? What am I missing? Why is that cross join lateral necessary: SELECT title, ARRAY_SLICE(ARRAY_AGG(movie_actors.name WITHIN GROUP (order by movie_actors.credits_order asc)),0,5) avg(movie_reviews.score) FROM movie JOIN movie_actors on (movie.id = movie_actors.movie_id) JOIN person on (movie_Actors.person_id = person.id) JOIN movie_reviews…

[deleted]

Re: Show HN: EdgeDB 1.0

#152
post #142
post #138

Earlier quoted context omitted.

Am I right in reading this as the parent comment envisioning a “post” table and a “tag” table, and you’re suggest the “post” table just have a “tag” column?

I see just one table > Every post is tagged with a given category. There could be 100+ categories in the blog system and a blog post could be tagged with any number of these system categories. My point is, I don’t see SQL query as expensive for this kind of use case. There are easy and native ways to do it. In case you would like a top notch performance, Redis might be a way to do it. Even a reverse-index would achie…

That's a standard many-to-many relationship that would normally be implemented by three tables:

    +---------+-------+---------+-------+-----------+
    | post_id | title | content | other | fields... |

    +--------+------+
    | tag_id | name |

    +------------+---------+--------+
    | tagging_id | post_id | tag_id |

But it seems like the core of the request is still something like:

    SELECT post_id, count(1) AS count
    FROM taggings
    WHERE tag_id IN (3, 8, 255)
    GROUP BY post_id
    ORDER BY count DESC
(off the top of my head; I haven't checked this for any kind of correctness)

And I don't see why that query suffers as you add tags...?

------------

EDIT responding to below [HN believes I am a problem user who should only be allowed to make so many comments per day]:

Well, assuming you're doing this because a user is interacting with your site via some kind of web interface, you can set the interface up to deliver you tag_id values directly, but you'll still need to do a join with the posts table so you can present a list of posts back to the user instead of a list of internal post_id values.

So I guess

    SELECT t.post_id, count(1) AS count, p.title, p.url
    FROM taggings t JOIN posts p ON t.post_id = p.post_id
    ...

Re: Show HN: EdgeDB 1.0

#153

I feel like a graph database is a solution to an issue I've faced (and, continue to face) and it may just be because that I haven't spun one up and tried or that the documentation/examples don't stick out. But could someone confirm my feeling? If my feeling is correct, I'd enjoy verifying it with EdgeDB or the like. My example/requirement: I have a user wanting to find best-matching blog posts. Every post is tagged w…

select posts.name as post, count(post_tags.id) as matches from posts,post_tags where post_tags.post=posts.id and post_tags.tag in ("angular","nestjs","cypress","nx") group by post_tags.post order by matches desc; Test data @ http://pratyeka.org/hn.sqlite3

Re: Show HN: EdgeDB 1.0

#154

I don't understand the benefit. It's just a query language on top of Postgres? It doesn't seem to have the performance characteristics of a graph database, while acting like it does. JOINS will still be expensive. You guys shouldn't use the word graph, misleading.

my thoughts exactly...

a graph database is not useful because of its query language, it's useful because of its performance characteristics when bringing linked data — it could never be performant on a Postgres backend.

Re: Show HN: EdgeDB 1.0

#155
post #142

Earlier quoted context omitted.

I see just one table > Every post is tagged with a given category. There could be 100+ categories in the blog system and a blog post could be tagged with any number of these system categories. My point is, I don’t see SQL query as expensive for this kind of use case. There are easy and native ways to do it. In case you would like a top notch performance, Redis might be a way to do it. Even a reverse-index would achie…

That's a standard many-to-many relationship that would normally be implemented by three tables: +---------+-------+---------+-------+-----------+ | post_id | title | content | other | fields... | +--------+------+ | tag_id | name | +------------+---------+--------+ | tagging_id | post_id | tag_id | But it seems like the core of the request is still something like: SELECT post_id, count(1) AS count FROM taggings WHERE…

Confusing but that is pretty much what I meant by “I see just one table” as you don’t need any joins (atleast with the same design you outline)

Re: Show HN: EdgeDB 1.0

#156
post #150

EdgeQL seems like a custom graphQL. Any reasons you did not follow dgraph's DQL or graphQL-compatible language? https://dgraph.io/docs/get-started/

GraphQL doesn't have any syntax for expressions, like 1+1 is inexpressible with GraphQL. Once you add support for arbitrary expressions, functions, etc you start departing from GraphQL to something that looks surprisingly similar to EdgeQL :)

Re: Show HN: EdgeDB 1.0

#158
post #83

> We should not continue wasting our productivity with a database API architecture from the last century. Sorry, but dissing proven technology like this just makes me vomit. Show me _how_ you can beat SQL in performance and features on the frontpage, or I'm just happy to go along with what I already have.

What a terrible attitude to have, that's truly the worst possible interpretation. How's that dissing anything? They are saying they have a good abstraction that will make you more productive. While it might not be, this is literally what makes software the amazing tool it is, building layers of abstraction that make you more productive. You seem to have gotten it all wrong, how could building something on top of SQL…

It's very frustrating that whenever a team is showing something new they've built to HN, so many of the top comments are focused some incredibly nitpicky, personal issue that somehow negates everything else about the project.

It's an amazingly lazy and inconsiderate way to respond to people who've put a bunch of effort into building something.

Re: Show HN: EdgeDB 1.0

#159
post #113
post #5

EdgeDB co-founder Yury here. Ask me anything :) Live launch stream: https://www.youtube.com/watch?v=WRZ3o-NsU_4

do you have plans to integrate with prisma? it's almost a DIRECT translation of how the query is expressed in Prisma compared to edgedb. Googling quickly, it seems there is a ticket already. I wonder if this could be a low hanging fruit and a great growth channel since prisma is very popular. https://github.com/prisma/prisma/issues/10210

Not really, there's no point in using prisma with EdgeDB as our own query builder is more idiomatic for our product, faster, and we gape more capable.

See also this reply by Colin: https://news.ycombinator.com/item?id=30293544

Re: Show HN: EdgeDB 1.0

#160
post #5

EdgeDB co-founder Yury here. Ask me anything :) Live launch stream: https://www.youtube.com/watch?v=WRZ3o-NsU_4

Do you support columnar storage? i.e. to make analytics queries fast.

Not yet, but theoretically we might support something like Timescale in the future.
Post reply on HN