With this new database "Query Language" you don't store the compiled final SQL, which has been output according to the requirements and laid out during the lengthy discussion with you.
Instead of Select distinct Salary from Employee e1 where 2=Select count(distinct Salary) from Employee e2 where
e1.salary<=e2.salary;
You have:
AIQL.do("Get the 2nd highest salary in the company.")
Two separate equivalent things can be stored:
1. The long discussion, with you telling it first what you want, it asking you questions and together slowly refining the definition ("debugging" it) until you get exactly what you meant in the first place.
AI QL: What do you want from the database?
Me: Get the 2nd highest salary in the company.
AI QL: You mean a single number, with the salary of one employee, after checking each one of all the employees?
Me: Exactly.
AI QL: Will you need it for a certain time, or whatever happens to be stored there right now?
Me: just what's there now.
AI QL: Will you want to know the employee number and the datetime this was changed?
Me: Nope.
AI QL: OK. Do you want to see the SQL, a description of how it worked, or just the result?
Me: Later I will.
AI QL: OK this is stored as "Project:Interview. Query: Get the 2nd highest salary in the company. (Only a single number. Negative 1 if something goes wrong)"
2. The summary in natural, clear, concise, and unambiguous English which gives the exact and correct query when compiled into SQL.
Example: Project: Interview. Query: Get 2nd highest salary. Does: Gets nth highest salary by fastest method shown in this StackOverflow link.
Of course the next step will be AI CompuReq for programming computers via requirements and debugging the program by refining the requirements with nitty gritty. But that's for the next idea.
Both these ideas are different from Cody AI now available for Visual Studio VS, because you won't be looking at the code anymore at all, and maybe not even having to understand it!
You'll be looking at a generalized description of what is happening, and if that's not good enough you'll be getting a more and more detailed description. Only in tricky places you'll need an expert to take a look at the actual code (or SQL, in the case of this early implementation of the idea)