On 16 Jun 2015, at 7:44pm, James K. Lowden <jklowden at schemamania.org> wrote:

> <david at andl.org> wrote:
> 
>> What would make a database programming better, or best?
> 
> Two things I've often pointed to are namespaces and regular
> expressions.  Another is compound datatypes.  

I don't have your problem with namespaces since, to me, they really are just 
prefixes.  I do agree that regular expressions are a problem.  They don't 
really belong in the language but they are very convenient when they are there.

SQLite has JOINs (or sub-selects, which amount to the same thing at a low 
level) for INSERT and for SELECT but not for UPDATE.  A few times when working 
with SQLite I've found myself writing UPDATE ... JOIN.  And then having to do 
the job in my own code instead.  And if you add JOIN to UPDATE you should 
probably add it to DELETE FROM too.

The other problem with SQLite is the lack of ALTER TABLE ... DROP COLUMN.  But 
to support it you need SQLite to have a proper internal model of which columns 
are used for what, rather than to just store and reparse the CREATE TABLE 
commands.

The thing I always found interesting about SQL was that it picks three English 
words, INSERT, DELETE, UPDATE, and says that that's all you need to do.  And 
it's right !  Is there something special about the 'three-ness' of database 
operations ?  Or are you meant to think of it as two writing operations 
(INSERT, DELETE) and a convenience operation which combines them (UPDATE) ?  If 
there was another word, what would it be ?  REPLACE ?  DUPLICATE ?

Also, why is there only one English word needed for reading operations ?  What 
would a database language look like if it has more than one word ?  Would there 
be a difference between FIND and SCAN ?

Simon.

Reply via email to