Re: [Newby] How many tables here ?

From: me <XDXaXrXcXyX_at_XSXiXtXeXwXaXrXeX.XcXoXmX>
Date: Wed, 20 Aug 2003 22:07:28 GMT
Message-ID: <AiS0b.210461$4UE.11227_at_news01.bloor.is.net.cable.rogers.com>


What abou this?

table: matrix
  X
  Y
  Value

So you could read your stuff in and then put it in the above table:

X Y Value
1 1 400
1 2 450
1 3 600

That way, no matter how many rows and columns your matrix has, you just need one table to store.

"Gio" <gmlrNOTHINGHERE_at_libero.itDELME> wrote in message news:8SP0b.254077$lK4.7847395_at_twister1.libero.it...
> Hello All,
>
> I have some code (an old sci application) reading an ASCII table (sic!)
> with something like (the line is the record)
>
> Height\Temperature 10 20 30 ...
> 0 430 420 4
> 1000 400 340
> 2000
> etc
>
> As you can see the first line and column are really the "coordinates" (say
> X,Y) while the values of
> interest (Z) are in the matrix starting from element (2,2).
> Now as you might guess, somebody had the idea to move the data inside a
> relational DB :(
> Supposing you don't know how many X and Y you might have, how many tables
> would you
> use and with what structure ?
>
> I can't really think of a good and universal solution.
> I don't like the idea of having a table with the X values, another one
with
> the Y and then
> still another one with the Z values for these points. Also I would avoid
> overdimensioning the tables.
> Any suggestion/link most appreciated.
>
> Thank you
> - Gio
>
>
>
Received on Thu Aug 21 2003 - 00:07:28 CEST

Original text of this message