Wednesday, June 29, 2011

A complaint about SQL

So I would like to complain about SQL (Structured Query Language) - which is a common way of accessing a database on computers. My complaint stems from efficiency. One thing that has always bugged me is inefficient things, both in computers and in the real-world. I guess it's my fastidious side.

Anyway, you access data in an SQL database via a query string. For example, "select name, phone from Students where major = "business" and enrolled = '1'" The whole idea behind SQL was that non-computer-programmers could look at the code and have some idea about what's going on. But this is a very inefficient way of accessing the data. The data in the database as well as the database engine itself are in binary, and your program is in binary, so why do we have to convert everything into strings to access the data? We should be able to query the data in a binary way and eliminate the conversion.

The best way I can think to demonstrate this is with an example. Suppose I went down to my local restaurant and ordered lunch, but I had to speak to the cashier in Chinese, and the cashier had to speak to me in Chinese. Both of us are native English speakers, and the entire kitchen staff are native English speakers. But we're forced to translate into Chinese for communication. I know, this makes no sense. Well neither does SQL. That's my rant for the day.

No comments:

Post a Comment