Re: Help: creating view with different columns?

From: Nils Myklebust <Nils.Myklebust_at_idg.no>
Date: 1997/04/17
Message-ID: <3355def2.4201591_at_gate.idg.no>#1/1


weberj_at_t-online.de (Juergen Weber) wrote:

:Nils Myklebust wrote:
:>
:> A possible table structure may be:
:>
:> anr datatype data
:> j1 length 100
:> j1 material wood
:> j1 weight 50
:> j2 length 33
:>
:Thanks for the hint,
:but if I have 10000 articles that have a length the
:table contains 10000 times the string "length"?

Yes, of course. But is there a problem with that? Diskspace is real cheap these days, so that can't be a real problem. You may of course change the datatype to a smallint/integer and have another table with the type strings. I would probably not do that just to make the table easier to use, but it is an option - particularly if you want longer descriptions. As you said you would want to create a matrix with these datatypes as headings you would probably want to keep them very short anyway.

You obviously have to be carefull that the words you use for datatype allways actually represent the same thing and use the same measure. The length of a hammer may be in cm, while the length of a rope may be in meters possibly requiring some special handling. Other attributes you might normally name with exactly the same word while the meaning, and therefore the measure in the data column, might be quite different requiring you to create different words for them in the datatype column.

Good luck.

:Greetings, Juergen
:--
:Juergen Weber
:Computer Scientist in the Prepress Business
:email: weberj_at_schwend.de www: http://www.schwend.de

Nils.Myklebust_at_idg.no
NM Data AS, P.O.Box 9090 Gronland, N-0133 Oslo, Norway My opinions are those of my company
The Informix FAQ is at http://www.iiug.org Received on Thu Apr 17 1997 - 00:00:00 CEST

Original text of this message