Extra metadata

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a number of datasets that contains lots of engineering type data.
Things are in lengths, forces, energies, times, etc etc.

The datasets have two underlying natures:
1. The product dataset has all numeric columns and contains only values of
the lengths, etc. It does not contain the associated units because they are
only column dependent. (All values in a column have same kind of dimension of
course such as length but also the same actual dimension such as feet or
pounds etc.)

2. User input dataset is all string based. Each value here carries along its
associated dimension because some may be in feet and some in inches etc. We
want to carry along the exact user input as a string converting it into
numbers for the crunch but displaying the original input in reports.

SOOOO ... Short of a lot of hand coding - which this project specifically
wants to avoid -
A. In both cases is there a way of creating types say "energy1" and
"energy2" whose underlying representation is double in case 1 and string in
case 2 and using that as the datatype of a column. (I think this is doable
and maybe even trivial, but am not sure how.)

B. Much more difficult, may be impossible, is there any reasonable way to
add additional meta data to a column so that in case 1 I could not only type
the data as energy1 but also have the additional meta data say that the
numbers all have the units of ft / sec / sec (or whatever the units of energy
are. I forget at the moment.)

Basically is it possible to have the dataset and its metadata document the
underlying reality through types and metadata without the expense of have
extra columns in the table to contain the information. (One could imagine
having for each column of real data another one that contains the dimension
family and the actual dimension e.g. "Length:feet" This is what I want to
avoid.
--
Regards,
Al Christoph
Senior Consultant and Proprietor
Three Bears Software, LLC
just right software @ just right prices @3bears.biz
 
Hi Al,

First, we cannot create a column whose type is uncertain. Also, a
DataColumn in .NET framework 1.1 cannot hold other meta data to indicate
the unit of the data. You have to write your own logic to achieve this.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
Thanks for the response. Perhaps I wasn't clear. Can I create a column whose
type is certain (to use your phrase) but whose type was created by me?

If that is the case is it possible to create an "alias" for a type (without
introducing all the overhead of deriving from object) ?? For example is it
possible to declare a type energy as double?

Regards,
Al Christoph
Senior Consultant and Proprietor
Three Bears Software, LLC
just right software @ just right prices @3bears.biz
 
The DataSet pretty much follows the traditional database model so in
that vein you will either need to add addition columns of data to a
table to define your extra data or create relationships to other tables.

This is one thing that really bothered me about their implementation of
a DataSet. It was a great idea but is too closed. It would have been a
lot better if the top level of a DataSet was an Interface that could
have been implemented if person needs to have a different underneath
model for the data than traditional database. The custom DataSet could
still be used as a normal DataSet.

I have had a very hard time trying to figure out how to make a real-time
hierarchical data repository map into a DataSet that could expose data
in real time. The XmlDataDocument was very close to what i needed but
contained only static data and not data changing in real time. I tried
all kinds of stuff from creating custom rows to making custom tables but
nothing fit quite right. I finally gave up and just snapshotted data
occasionally from the repository into the DataSet meaning the data
existed twice. This would have been trivial if the top end of the
DataSet or XmlDataDocument would have been an Interface and i could
implement it. All the table stuff was defined as Interfaces in Java so
it was real easy to do there.

I see no real good reason why Complex items like DataSet were not
implemented from Interfaces. That way custom ones could be made and
still be used in things like grid view. To paraphrase Spock this seemed
like two dimensional thinking

Leon Lambert
 
Hi Al,

As far as I know, we cannot create alias for the type in Dataset. However,
you can try to create your own structure named energy and inherit from the
type you need. It is not an alias but a sub type for the original type.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
Back
Top