Giraphne / sqlvis

Python package to visualise SQL queries as graphs
MIT License
38 stars 7 forks source link

One HAVE TO connect to a database to parse the SQL? #3

Closed rotcx closed 1 year ago

rotcx commented 1 year ago

One need not to connect to a database to parse the SQL?

Giraphne commented 1 year ago

Yes, this is true. If you just want to parse, there are lots of libraries that allow you to do so without connecting. However, for SQLVis we need to know the database schema. If you have any other suggestions to include the schema without extracting it from the database, feel free to post below.

rotcx commented 1 year ago

but all the schema info needed for the user is included in the SQL code!!

rotcx commented 1 year ago

If you just want to parse, there are lots of libraries that allow you to do so without connecting

for instance ?^_^

Giraphne commented 1 year ago

All the schema needed for parsing is indeed included in the query, but for the visualization we also use parts of the original schema that are not present in the query. For example, even if you only query SELECT pID FROM product we expand the view to allow you to see all columns of the product table, even the ones not in your query.

See the visualization examples in the README for more info.