NL-to-SQL (natural language to SQL) is a system that converts questions written in everyday language into SQL queries that retrieve or analyze data in a relational database. For example, a user might ask for monthly sales, and the system generates a query that selects and aggregates relevant records.
In cyber security and data governance, NL-to-SQL matters because a generated query can expose sensitive information, apply the wrong filters, or return misleading results if the system misunderstands the request or business definitions. Defenses include limiting database permissions, validating generated queries before execution, restricting access to approved tables and columns, and logging queries for audit. Clear metric definitions and reproducible checks help users verify that the result answers the intended question.


