Dataphor SQL RAC (Relational Application Companion)


A site of hope for those looking for a true relational database system

Friday, August 18, 2006

Dataphor - Sql: Table This!

Recently a learned user of MS Sql Server pointed out to me
that MS supports something they call a 'table variable' which
is of type table.

It is defined here.

Now MS does indeed say:
'variables can be declared to be of type table'
'To declare variables of type table, use DECLARE @local_variable.'

Then they go on to add a real zinger:
'Assignment operation between table variables is not supported.'

Talk about having your cake and wanting to eat it!
This is nothing but bs:) A variable can only be of type table
IF it supports assignment operations. If you can't put two
tables around an equality (=) and have the compiler understand
that is a comparison between two tables, you don't have a
table type. D4 (as I will be referring to the dataphor relational
language from now on) makes explicit comparisons between tables
as shown here.

Also note that there is no such thing in Sql Server as a table 
type. Permanent tables, temporary tables and table valued functions
are subject to the same argument as table variables. In fact
Sql Server would have to require every thing they call a table
to at least have a key, let alone support assignment operations,
before they could even think of saying they support a table type.

This is just another example of D4 vs. sql or TITS vs. FITS :)

No comments:

About Me

My photo
Phoenix, Arizona, United States