apache / age

Graph database optimized for fast analysis and real-time data processing. It is provided as an extension to PostgreSQL.
https://age.apache.org
Apache License 2.0
3.01k stars 405 forks source link

main advantage of using AGE #29

Closed gorgonzola-oh closed 3 years ago

gorgonzola-oh commented 3 years ago

I've currently implemented graphs (sans vertex properties) in Postgres using Recursive CTEs, without any real issue or restriction.

Is the main advantage of using AGE the query language being specialty focused on graph querying?

In looking at the docs, it seems like the extension is primarily focused on providing functions for interacting with the data. Under the covers, are the data stored as blobs? How is typing enforced if it's not using the native Postgres type system?

Sorry I'm making assumptions based on examples, and I could be totally wrong. I'm asking out of curiosity, not being critical.


Original Post in r/postgreSQL https://www.reddit.com/r/PostgreSQL/comments/lv9u7s/postgresql_with_graph_database_features/

xgenvn commented 3 years ago

I also want to ask about the compliance between bitnine-oss AgenGraph and AGE, are they using the same core components or somewhat different? And is there any good reason not using bitnine-oss at the start?

jrgemignani commented 3 years ago

AGE is based on openCypher implemented in PostgreSQL (version 11 atm) as an extension. This makes it more flexible to use, for example, in a current PostgreSQL environment/shop. However, due to it being an extension, it has some limitations (due to limitations common to all extensions) as to how well it can integrate into PostgreSQL. An example of this is the lack of hooks for modifying the grammar, you can see this in the form of the openCypher commands.

AgensGraph is based on Cypher (it wasn't openCypher at the time of implementation) implemented in PostgreSQL (version 9) as a fork. This anchors it in a very specific version of PostgreSQL and makes it difficult to migrate both the code and the data. However, due to being more integrated, it has the advantages of modifying whatever needs to be modified. An example of this is the grammar, which is nicely integrated along the side of SQL.

Which is better depends on what you value more. Both are implementations of Cypher in PostgreSQL. AGE is still in the alpha stage so, not all functionality has been implemented as of yet. As implementations of Cypher, they are both focused specifically on representing and querying graphs.

As for the AGE (agtype) data type, it is based off of a PostgreSQL data type and is built into the PostgreSQL system. You can look at the code to see how, if you like.

I'm not going to comment much on the "debate" or "merit" of a using SQL commands to create a "similar" functionality. Sure, you can contort many other tools to work for a particular purpose that they may not have been intended for. However, I have always found it best (less cumbersome, less confusing) to use the most appropriate tool for the job. Cypher is a language for representing and querying a graph.

I hope this is helpful.

John

On Tue, Mar 16, 2021 at 8:49 AM Anh Tu Nguyen @.***> wrote:

I'm also want to ask about the compliance between bitnine-oss AgenGraph and AGE, are they using the same core components or somewhat different? And is there any good reason not using bitnine-oss at the start?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/apache/incubator-age/issues/29#issuecomment-800380067, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALPO4G6VVNXPITSB35TGGLTD54ZBANCNFSM4YN7BKZA .