Ask HN: RFS: Modern SQL/db editor
11 points| jkcorrea | 1 year ago
-- The problem/rant
I've grown increasingly frustrated with how archaic the modern story for basic database adminning has become. So many aspects of the developer experience have improved dramatically in recent years, but it feels like database tooling is one massive vertical hasn't received much the same TLC.
Do people just not use SQL editors that often? I find myself constantly cmd-tabbing to Postico to check/modify some rows either during development or to resolve prod issues. But the second I need a more advanced/relational filter it's either a lot of painful clicks away or just impossible to do through the table UI and now I have to write a query from scratch.
If it's a commonly recurring task you can save the query, but now I have hundreds of these saved queries all with slightly different names to the point where it's less taxing to just write a new query then hunt down & slightly modify an old one.
Collaboration is non-existant. I'm forced to share these queries via slack or committing to a `misc/*.sql` folder in our repo which feels awkward.
Tools I've tried include Postico, DBeaver, TablePlus, Beekeeper Studio, PopSQL, and various VSCode extensions. I don't need features around DB Ops, I use Neon/Supabase/etc and just hope I never have to think about DB ops. I almost don't care about SDL tasks either, I mainly do that through my ORM (s/o Drizzle)
-- My request
Here's a braindump of features I frequently desire. I would pay for a tool that did even ONE of these, but I think all are very possible and would 100x the value of an editor to me:
- Intuitive filtering UI. You know my `id` column is a text, why is the default filter operation `>`. I almost never want that for string cols. Let me type "yesterday at 3pm" in a timestamp filter. Let me fuzzy search my entire DB (obv this is hard for large dbs)
- Relational filters. I should be able to filter by properties on relations. I'm often only given a username when solving a prod issue, and now finding their records in other tables becomes a 2-step process of finding the user's ID then using that in a filter on the table I care about
- Embedding & formatted columns. I have various reports as custom queries/views that I export as CSVs weekly to give to teammates. I wish I could just embed this view as an iframe in our internal dashboard. If you're feeling generous, allow me to format the columns like Airtable or even make charts based on the view. This could easily become a massive business in its own right.
- SQL language server/intellisense (h/t https://github.com/supabase-community/postgres_lsp). Need I say more?
- AI autocompletion & generation (a la Cursor). My current workflow is to cmd+tab to my ORM definition file, ask cursor to come up with a PSQL query for X table for Y problem, then cmd+tab back to Postico to run it.
- Notebooks. I want to create playbooks to share with my team. Post-mortems, "here's how I debug XYZ production issue", etc.
- Omnisearch. Let me CMD+K and fuzzy/semantic search across my saved queries, tables, etc.
I'll be honest, been sitting on this idea for over a year and have tried and failed multiple times to build it myself (skill issue). Throwing this out there in hopes that a more cracked engineer is interested in taking a stab at it. I would immediately pay upwards of $20/mo for even a partial solution and probably more for some of the team related features.Email in bio if you're interested in taking this up and want to chat more
yen223|1 year ago
I am currently working on a mobile-first Postgres client. I am convinced that you are right about (desktop) database clients not being as powerful as they should be. Postgres in particular makes a lot of schema information available, but very few database clients make full use of it.
jkcorrea|1 year ago
This category of tools definitely scratches a big part of the itch here. But you still end up needing a db client for a long tail of other tasks. So now your db knowledge is spread across 3+ tools: shared queries/charts in Metabase, personal queries in Postico, schema defs and SQL files in your code repo, Notion, etc.
I think you've got an opportunity to consolidate all that into 1 tool in the same way Postman did for APIs
> Postgres in particular makes a lot of schema information available, but very few database clients make full use of it. Completely agree. Also just the industry consolidation around the pg ecosystem in general will lend itself to better tooling potential (e.g. Supabase's LSP project).
> I am currently working on a mobile-first Postgres client. Great that you're working on something new here! If I may ask - why mobile-first? That's not something I've particularly needed tbh (sample size of 1 of course)
saltcod|1 year ago
Couple of quick questions:
— "AI autocompletion & generation...." sort of like what https://postgres.new/ does, but built into the Dashboard? - "Notebooks..." — like a Jupyter notebook kind of thing? We already have SQL Snippets you can share with team members, but you're probably talking about the combination of text and SQL? — cmdk — we've just released a big revision of our menu last week, we should definitely add snippets and tables/views etc. Great idea.
Love to hear anything else you've got in Supabase feedback!
jkcorrea|1 year ago
1) pg.new is neat, but honestly I don't see why I'd use it when I can do the same thing directly inside my drizzle schema dir using Cursor's Composer UI, which has full context on my project. I know not many are using Cursor right now, but it's hard to fathom these kind of features don't become part-and-parcel of code editors soon..
2) I actually find it painful to have to login to Supabase on the web to manage the database. I never use the table editor, snippets, etc. I want a native app I can CMD+Tab to.
Don't mean to be rude, just objective so you can feel my pain as a user.
In terms of the Notebooks, yeah I meant like Jupyter Notebooks. I've experimented with having a shared Notion or markdown files committed to repos in order to
A) save & search for snippets of SQL for the team/future me
B) document the "why" along with each step in a playbook.
The issues with this are
1) its detached from our normal workflow and quickly becomes outdated relative to our schema/business needs
2) to run the queries you have to copypaste back into a SQL tool
3) queries are hardcoded for certain values. If I have a report I run daily, every day I have to go in and manually update the `row.timestamp BETWEEN 'YYYY-MM-DD' AND 'YYYY-MM-DD'`, or if its a customer support workflow I have to replace the customer's ID everywhere. I'd rather have variables at the top I can reference throughout the queries, either as a code block like in Jupyter NB, or maybe some variable UI a la Insomnia/Postman
petilon|1 year ago
It has sophisticated filters and you can share reports with your team (as opposed to exporting CSVs).
twoquestions|1 year ago
https://www.jetbrains.com/dataspell/
aswerty|1 year ago
Happy to be schooled though.
jkcorrea|1 year ago
kiwicopple|1 year ago
jkcorrea|1 year ago
slipwalker|1 year ago