Back

AskDB

A crewing database that was already structured and already trusted, with questions about it that queued behind whoever could write SQL. AskDB takes the question as a sentence and answers it with rows, showing the query it ran.

Role
Product Designer (sole)
Year
2025
Domain
Maritime crewing · natural language to SQL
Status
In production, default path for routine questions

The screen below comes from a showcase build. Every name and date in it is a placeholder.

01Context

This one started in a conversation with a client. They had a crewing database they already trusted, and questions about it they could not get answers to without going through the person who writes SQL.

It is the mirror of the other product I was building at the time. Marine Form Automation takes unstructured documents, CVs, passports and certificates, and turns them into structured records you can search. AskDB starts where that ends: the data is already structured and the schema is known, and what is missing is a way to ask it anything.

02The problem

A crewing officer wants the third engineers who can join before March. That is one line of SQL and one person who can write it, and the person who can write it has a queue. So the question either waits or never gets asked, and a database that could have answered it sits there being correct and unread.

Every question in that queue was one a crewing officer had already decided was worth answering.

03How it works

Pick a tableAskRead the SQLGet rowsExport

You choose the table you are asking about, type the question as a sentence, and the system writes the SQL, runs it, and returns the rows. The query it ran sits on screen beside them.

Turning language into SQL is the model's job. Making the answer something an operator can act on and an auditor can check was mine, and that is where the design time went.

One question, the SQL it produced, and the rows it returned.
A screen from the product, dark throughout, with a narrow icon rail down the left edge. At the top, the question as it was typed: 3rd engineers available before 3 March. Under it a panel headed Generating SQL, marked Valid Query and offering a Copy control, printing the query in full: select name, rank, available_from and status from applicants, where rank equals 3rd Engineer and available_from is before the 3rd of March 2026, ordered by available_from. Below that a Results panel giving the time taken as 2.3 seconds, a count of 50 of 100 rows and a Download CSV control, over a table with four columns, name, rank, availability date and status. Twelve rows are visible, every one a 3rd Engineer available on a date between December 2025 and January 2026, with a Load More control under them. At the foot of the screen the composer, carrying the table selector set to Applicants Master and a Query control, so the table is chosen in the same place the question is typed. The query on screen is the query that produced the rows.

04What I decided, and why

You choose the table before you ask. A sentence only resolves if the system knows which schema it is resolving against, and availability means a different column in three different tables. Choosing first turns an open-ended guess into a narrow one, and it tells the operator what the answer will be about before they read it.

Rejected Searching every table and inferring which one was meant.

The SQL is printed, not hidden behind a disclosure. Operators do not read it and nothing in the layout suggests they should. Engineers and auditors do. It costs a few lines of screen, and it is the difference between a tool people trust and a tool people spot-check.

Rejected A view-SQL toggle, for a cleaner surface.

The generated query, printed in full above the rows it returned.
A detail from the product, enlarged, dark throughout. A label reads GENERATING SQL, and under it the query in monospace: select name, rank, available_from and status from applicants, where rank equals 3rd Engineer and available_from is before the 3rd of March 2026, ordered by available_from.

AskDB reads; it never writes. No updates, no deletes, no side effects of any kind. Drawing the boundary there removed a whole category of objection from every approval conversation, and none of the questions people were queueing for needed a write.

The answer says how much of itself it is. A table on its own leaves the operator wondering whether they got everything. So the result carries how long it took, how many rows of how many matched, and a way out to CSV, because the list is usually going on to somebody else.

The three things the result says about itself.
A detail from the product, enlarged, dark throughout. Three chips sit in a row: a clock icon beside 2.3s, then 50 of 100 rows, then a download icon beside Download CSV.
Anatomy of an answer. The table is chosen first and the query is printed, not disclosed.
A wireframe of the query screen with four annotated regions. One: the table selector, showing the applicants master table, chosen before the question is typed, because picking the schema first is what lets a plain sentence resolve to a column. Two: the question, kept on screen and editable, so the operator can always see what was asked. Three: the SQL the system generated and ran, printed in full rather than hidden behind a disclosure, since this is the part an auditor asks for. Four: the results table, with columns for name, rank and availability date, as a working surface under a meta line giving how long the query took, how many rows of how many matched, and a CSV download.

05A question worth keeping

Questions are saved as questions, not as SQL. The history keeps the sentence the operator typed and the table it ran against, titled by what it was for. An officer hiring third engineers in Mumbai this month will be hiring them again next month, and the reusable thing is the request. Nobody recognises their own generated query a week later.

Rejected A saved-queries list holding the generated SQL.

06Outcome

AskDB is in production and is the default path for routine questions of the database. The manual queue keeps shrinking as coverage grows. I designed it end to end as the sole designer, working with the engineering team through to release.

  • Default path for routine questions
  • Every answer prints the SQL that produced it
  • Read-only by design: no writes, ever

The query screen is the product, with placeholder records. The anatomy figure is a drawing: it annotates an order the real layout expresses through workflow rather than position.

Other case studies

Back to work