Re: Downloadable draft of SQL:2008

On 20 Oct 2010, at 15:23, Eric Prud'hommeaux wrote:
> 3.1.1.27 table: An unordered collection of rows having an ordered  
> collection of one or more columns. Each
>         column has a name and a data type. Each row has, for each  
> column, exactly one value in the data
>         type of that column.
>
> I notice this definition elides the uniqueness of the column names,
> which is true of SQL but not of relational algebra.

In 4.3 it says: “No two columns of a base table or a viewed table can  
have the same name. Derived tables, other than viewed tables, may  
contain more than one column with the same name.”

In other words, column names are unique in base tables and views, but  
not necessarily in query results.

Best,
Richard





> Are there any use
> cases which motivate us going beyond the relational data accessible to
> SQL, e.g. the two name attributes in:?
>  ┌────┬──────┬───────┐
>  │ ID │ name │ name  │
>  ├────┼──────┼───────┤
>  │  7 │ Bob  │ Smith │
>  └────┴──────┴───────┘
>
>> Part 2 defines the SQL language.
>>
>> Part 11 defines the Information Schema (the standard way of finding
>> out which tables and columns are available in a database).
>>
>> The other parts are not relevant for SQL Core.
>>
>> Best,
>> Richard
>>
>
> -- 
> -ericP

Received on Wednesday, 20 October 2010 14:58:31 UTC