On 2015-06-05 12:11 AM, Darko Volaric wrote: >I now regret using JSON as an example since everyone wants me to >convert SQL to JSON for them now, but my point isn't any particular >notation, I want an API of sorts instead of a notation or syntax. Then
>you can adapt anything you like and make it efficient with the platform >you're using. So for example you send a native, binary JavaScript >object (or record, whatever its called) as your query instead of SQL text. >What is motivating this for me is that I generate many unique >queries in my code for almost any operation. Converting those to SQL >is error prone and uses a lot of memory compared to the operation >involved. The database engine is so fast and efficient yet I'm wasting >resources making SQL! >I just want to skip that SQL bottleneck, because it has no >technical justification other than "standardization" and pass my query >straight through. I think I fail to understand. Programmers write programs composed of code which operates upon an externality (data). Therefore, you have to generate the "program" which operates on the data by storing and retrieving it. Part of that programming task is writing the code to store the data in a file. Sometimes it may be apropos to use simple sequential I/O to text files, and sometimes you might read and write from a database. In either case it is you who are writing the code which performs the operation -- it does not write itself. So, how is it simpler to for you to generate JSON data which is executed as code to manipulate data as compared to writing SQL which operates on the data? You still have to write (program) the data manipulation task, no matter what language you write it in. Of course, it sounds like you may be referring to data which magically knows what to do with itself -- which is rather a bit of crusty old snake oil called Object Oriented Programming with an Object database. However, even in this case the programmer must still write the code which enables the data to "do" what it is asked.

