baueran at in.tum.de
Mon Feb 11 20:48:10 EST 2002
> What I do need now is an embedded language, but one
> with a twist. Because I'm writting relationalish
> database product, it needs to know about NULLs. That
> substr(NULL,0,1) is not "" but NULL.
> "Hello"+NULL is NULL not "Hello".
> (a<b) may return NULL not just 'true' or 'false'
NULLs in RDBMS are an implementation hack. What you outlined here is
merely the functionality/behaviour of NULL according to the SQL standard.
It is up to you as a RDBMS vendor to implement this
functionality/behaviour in any language you like, be it C, C++ or
> Lua (http://www.lua.org) is close. It's small. Easy to
> compile anywhere (ie the mainframe). But it doesn not
> handle NaN and NULL properly.
Your decision about the right programming language should not depend on
this feature. I'm not really a database engineer myself, but I would say
it's very unlikely that any of the big RDBMS is written in a language
that already handles NULL values the way it is outlined in SQL standards.
Most RDBMS are written in C or similar imperative languages. And you
should not confuse C NULL-pointers and the like with an "SQL-NULL".
> Anyone know where I can find information about
> creating my own litte embedded, typesafe, functional,
> ternary logic scripting language?
"Functional" as in Haskell, ML or Gofer? I'm surprised...
My humble recommendation is to stick with the programming language you
are comfortable with and to try and find out how these fancy pancy SQL
features (or a subset of them) can be implemented using this particular
language. Also, a lot of universites are offering RDBMS implenetation
courses and I think a lot of them use Java in the examples. But I know
you wanted to compile the language into native code, right?
Oh well, my 0.02 Euro anyway.
Andreas Bauer, baueran at in.tum.de, http://home.in.tum.de/baueran/
"Very funny Scotty, now beam down my pants."
More information about the linux