Comment

Comment by metalspot

the concern i would have here is that if you don't know SQL then you have no way of knowing whether or not the results are correct and if the results are wrong you have no way to debug the query.

to construct an SQL query you need to know the database schema, you need to be able to specify the relationships between tables, and you need to specify what data you are trying to retrieve.

the only way using plain written language can work is if you can infer the correct table names and relationships from the input text, which can only work if the database follows very strict naming conventions and/or proper foreign key usage and is small enough that none of the table or column names are ambiguous.

plain written language is much more ambiguous than a formal language like SQL.

how do you resolve ambiguities in the naming of tables and columns in the schema and in the input text for queries? if the output is wrong, is there an iterative process that can help the user refine the query?

parent metalspot 3 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton