Re: matrix transpose in SQL?

From: Aakash Bordia <a_bordia_at_hotmail.com>
Date: Wed, 2 May 2001 10:06:43 -0700
Message-ID: <9cpekc$flk$1_at_stlnews.stl.ibm.com>


Agreed! But do you have any SQL solution to my root problem? If yes, please guide me!
Thanks
Aakash
"Vadim Tropashko" <nospam_at_newsranger.com> wrote in message news:ulhG6.959$SZ5.77667_at_www.newsranger.com...
> In article <u766fqu11o.fsf_at_sol6.ebi.ac.uk>, Philip Lijnzaad says...
> >
> >
> >> Why are you insisting that matrix must be modeled in RDBMS that way?
 There

> >> is a symmetry between rows and columns in matrix, and you loose it in
 your
> >> representation.
> >
> >Yes, I agree: this table:
> >
> >> 1 2 3
> >> 4 5 6
> >> 7 8 9
> >
> >is _not_ a matrix. It is an _unordered_ set of rows of numbers. This:
> >
> >> 1 2 3
> >> 7 8 9
> >> 4 5 6
> >
> >is exactly the same table, and in fact the SQL standard does not
 guarantee
> >that the order of rows you get from a query is always the same, not even
 when
> >when no updates to the table happened (although in practice it usually
 does).
> >
> >The cleanest way to represent matrices is of course:
> >
> >I J VALUE
> >1 1 1
> >1 2 2
> >1 3 3
> >2 1 4
> >2 2 5
> >2 3 6
> >3 1 7
> >3 2 8
> >3 3 9
> >
>
> Aakash,
>
> If those ideas were not convincing enough, think of matrix as just a
 tensor of
> the second rank. Would you ever represent a tensor of rank 3 like this
>
> dim | a11 | a12 | a21 | a22
> ---------------------------
> 1 | 111 | 112 | 121 | 122
> 2 | 211 | 212 | 221 | 222
>
> ?
>
>
Received on Wed May 02 2001 - 19:06:43 CEST

Original text of this message