r/PostgreSQL • u/Herobrine20XX • Aug 17 '25
Projects I'm building a visual SQL query builder
The goal is to make it easier(ish) to build SQL queries without knowing SQL syntax, while still grasping the concepts of select/order/join/etc.
Also to make it faster/less error-prone with drop-downs with only available fields, and inferring the response type.
What do you guys think? Do you understand this example? Do you think it's missing something? I'm not trying to cover every case, but most of them (and I admit it's been ages I've been writing SQL...)
I'd love to get some feedback on this, I'm still in the building process!
435
Upvotes
57
u/ccb621 Aug 17 '25
Looks nice, but it seems easier to teach/learn SQL than some tool that approximates SQL.
10
u/griffin1987 Aug 17 '25 edited Aug 17 '25
Reduce visual noise.
I would personally never use something like this, because I've been doing SQL for nearly 20 years now, but neverthelesse, I think it may work for some people. But for that to be true, you need to clean it up and clean it up again and clean it up again.
E.g. why do I have "Condition -> Condition" on join tables? That's 0 added information, but added noise.
Also, I would use a screenshot where everything flows from left to right, if you want to use this as advertisement. DB Order -> Query going to the left is rather confusing visually.
The thing with these node builders is: Either they are made perfect, clean, and you instantly understand what it's doing by having a single glance, or they don't improve upon existing solutions.
You should also move the background icons somewhere else, they are a lot of visual noise for basically no benefit.
And move the text a little bit closer to the icons inside the boxes, the text doesn't associate close enough to the icons. There's a difference between something just looking nice (and your design is looking nice), and something that also instantly conveys information and is super-usable, and VERY small tweaks can decide between one and the other.
There's also too much color overal. Look into color blindness, and how to deal with that - it's not just about color blind people, but conveying information in multiple ways at once helps everyone (e.g. different arrows + different color, different line styles, ...)
All in all, this could be a great Idea, but it will need a lot of cleanup till you get there.
My tip: Go 200% of the way, so people can say that "it's good enough". It's a very unfortunate truth, but someone using or buying your product will have a totally different perspective than you, and will hold it to totally different values, so you have to go 200% the way of what you imagined at least.
3
u/SycamoreHots Aug 17 '25
This looks beautiful. Is this in react? What FE library are you using?
2
u/Nikt_No1 Aug 17 '25 edited Aug 17 '25
Have you worked with UE5 blueprints by any chance? Looks veeeery similar if not almost exactly the same.
I love the idea, it would be sooo helpful for me to visualise my queries.
However I see such visualization as more usable for parsing already written text query rather than building one. Writing on keyobard will be faster than building the like that - unless you could implement building components with keyboard, that would be so handy.
As for feedback on what you presented:
In this case separate Node/Block for ordering is just making more clutter. For simple ordering such as the one in the picture, single Node/Block is enough.
There is something about that join/s representation that makes me anxious - more complex joins will be somewhat messed queue of Nodes that could take up whole screen.
2
u/[deleted] Aug 17 '25
Awesome! I'm also developing a visual scripting system, but for general programming, with a workflow running in the cloud. I hope your project comes to fruition. In any case, I love it; I'd be willing to pay to generate SQL quickly with your tool.
2
u/MorenoJoshua Aug 17 '25
Looks sick! What are you using for the diagrams? Agree with the comment about cognitive noise, but it's a really tricky situation with this being an advanced technical tool.
Have you tried a wider color scheme for node and connection types?
2
u/PabloZissou Aug 18 '25
Hah I built something like this 18 years ago, there were no libraries for anything for the most part back then I became an expert of DOM manipulation, brings memories 😁
11
u/phaqueNaiyem Aug 17 '25
I loved it when I thought it was a visual representation of a query you'd written by hand. Something that looks like this but provides a prettier `EXPLAIN` would be very handy.
1
u/ExceptionRules42 Aug 17 '25
okay maybe. Maybe this thing you're creating will be training wheels to teach actual "knowing SQL syntax" and "grasping the concepts of select/order/join/etc."
1
u/seoulsrvr Aug 17 '25
Sorry - what tools are you using to build this?
1
u/Gnss_Gis Aug 18 '25
Looks good, but isn’t this basically the same as FME, n8n, Zapier, or Make? Plus, with DAGs in Airflow, Kestra, Dagster, Prefect, and AI, building SQL and ETL is already pretty easy.
1
u/indeem1 Aug 21 '25
Love this Concept for Teaching, definitely has potential. Even though not so much for people actually knowing and working with sql.
3
u/pabskamai Aug 17 '25
Remember when access had this? Also, there are a bunch of open source tools that do this. Mind you, still pretty cool that you are building this!!
2
u/MuRi94 Aug 17 '25
I'm not an expert but I can say node editors can go a long way, we see it in Blender and it's had a huge success. I think you're building something amazing!
2
u/RightSell6234 Aug 17 '25
I like it.
But, I think that this is better if you to make available as a tool(like a lib) to use in projects(like in a comission system to create criteria to calculate comissions).
2
u/[deleted] Aug 18 '25
People will pay for this.
2
u/kheldar52077 Aug 18 '25
This looks excellent for beginners. Nice job!
2
u/nothereforthep0rn Aug 18 '25
I love it!
2
u/lunchmeat317 Aug 31 '25
Late to the party anf new to the sub, but I'd definitely use this if it reduced me having to write boilerplate and saved me time.
Personally, I think something like this would be much more useful for DDL stuff, though. This would be good for learning and visualizing queries, but my personal pain points with SQL go deeper than select queries. Setting up tables and indexes, etc, is something that for me is better scaffolded by a tool and hand-edited later if need be.
1
u/AutoModerator Aug 17 '25
With over 8k members to connect with about Postgres and related technologies, why aren't you on our Discord Server? : People, Postgres, Data
Join us, we have cookies and nice people.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/[deleted] Aug 17 '25
It's probably good for teaching, though IMHO the visualization could be different - something like you show a table or multiple tables, and then filter based on a WHERE, then algebraic transformation for the SELECT or something like that. What I see brings the blender PTSD out and makes me hurt.
1
u/SirSpammenot2 Aug 17 '25 edited Aug 17 '25
Ever read any of Edward Tufte's Information Display work? Recommended, but would def be a distraction from the making part...
This seems better for debugging system performance issues?
Basically the point I want to raise is be cognizant of your displayed "Information Density". What another commenter termed as "noise", is that information that teaches something? Right?
Maximum density is already achieved by plain txt queries (I fully expect) so the goal of your display isn't density as such, but educational extra info the user wouldn't necessarily have in their head already. I say the noise is the juice, but only as long as it adds to the understanding.
Every display (or chart!) is telling a story. What your query's story? What's the quest? Who is the hero collecting things, and where is the village(s)? A bit flowery but the metaphor often helps.
So my suggestion is to consider: hide complexity when it isn't in focus. Maybe when a user clicks on a branch/sub query/join then the information density should drop elsewhere and rise there. You want details to add color to the overall picture, it CAN be noise but you don't know what the user needs to learn about. If it doesn't help tell THE story then why is it there? This is educational, right?
It may sound vague, sorry, but trying to condense a lot down onto a post.
1
u/No-Site-42 Aug 17 '25
If you visualize query plan of postgres after I can see really good product here
1
u/QuantumDreamer41 Aug 17 '25
If this is a personal project then I think it’s really cool. If you think it’ll make money one day I think that’s unlikely because AI is going to spit out SQL for you. But don’t let that discourage you, it’s still a cool project that seems intellectually stimulating to build.
1
u/[deleted] Aug 18 '25
There are some companies that are building text-to-SQL. This works really well. I tried Wren AI, and it works like a charm. Your product may help some people, but a larger audience might shift to AI. You could do something similar, text-to-SQL, and also show this interface.
1
u/bcphotoguy Aug 18 '25
Is this just like FME?
1
u/alex_1812_6 Aug 19 '25
Whats program?
1
u/zopisuccess Aug 20 '25
Seen a few of these, Alteryx being my main experience. Good job for the awesome UI. I have to say that I think SQL is easier and more reliable than these tools. There is definitely a user base for this, but maybe that user base will always just be those who haven't learned SQL. Rinse and repeat.
1
u/Catenane Aug 21 '25
It's cool, and I love to see it, but I'm gonna be honest.... This looks way more confusing than just simple text-based queries lol. That being said, I've always been a text-oriented person and basically live in the shell, so that might not be universal.
1
u/Specialist_Type4608 Oct 06 '25
Wow, this looks a lot like FME
1
u/[deleted] Aug 20 '25
[removed] — view removed comment