English borked SQL
2010-Dec-21, Tuesday 01:01 pmI have suggested before that our language influences our thoughts, and that influence determines how we conceive the world, and that conception changes how we act in the world.
I noticed today a totally new way in which the influence of English language affected (negatively) the creation of a computer language. I already knew some Structured Query Language (SQL), but I'm taking a 3-day class this week in Microsoft SQL Server 2008's version of Transact-SQL. I noticed today that SQL syntax was badly influenced by one of the regrettable features of English syntax:
Adjectives precede Nouns.
I noticed the problem because of the Intellisense feature of the SQL Server management interface. As I type a new SQL command, the program determines context and shows me available choices that are appropriate within that point of the SQL command. The problem, unfortunately, is that SQL syntax puts the field names (adjectives) BEFORE the table names (nouns), so context can't yet be determined.
If we had more reasonable English syntax where nouns preceded adjectives (as in Spanish language), the SQL standard would have been created with the appropriate order for Intellisense to work well.
no subject
Date: 2010-Dec-21, Tuesday 08:43 pm (UTC)So you'd want a SQL language more like:
select from person
fields firstname, lastname
or something like that?
That would definitely help. SQLServer's intellisense is pretty awful, it gets in my way as often as it helps. I have actually renamed rarely-used tables to prevent them from being the default intellisense choice.
no subject
Date: 2010-Dec-21, Tuesday 09:00 pm (UTC)I think "NOUN (qualifiers) VERB (qualifiers) OBJECTS (qualifiers)" is a good generic template, but what to use and noun, verb, objects, and qualifiers? Fun! I'm tempted to address the schema itself as the initial NOUN that opens any data access statement and provides the action.
no subject
Date: 2010-Dec-22, Wednesday 04:17 am (UTC)no subject
Date: 2010-Dec-22, Wednesday 02:31 pm (UTC)