Re: types/domains are redundant?
Date: Fri, 31 Oct 2003 18:50:23 -0800
Message-ID: <blFob.27$T3.24_at_news.oracle.com>
Mikito Harakiri wrote:
> "Mike" <Star.Point_at_mcsci.net> wrote in message
> news:a90c0da6.0304110155.1aacad7d_at_posting.google.com...
>
>>tblLabor (Example) >> >>Amount StatisticTypeID >>---------------------------------- - >>25 Alpha-Microbes (count) >>.00048 Beta-Microbes (weight) >>2 Alpha-Microbes (count) >>8.5 Alpha-Microbes (count) >>500,010 Gama-Micorbes (measurement) >>3 People (count) >>1 Charts (count) >>5 Phone calls (count) >>...
>
>
> Let's organize all types into a separate relation:
>
> Type Value
> -------- -----
> count 1
> weight c*g/(s^2)
> measmt 1
>
> Lets add some more types:
>
> Type Value Comment
> -------- ----- ----------------------------------------
> degrees pi/90 for measuring angles; not temperature
> float 1
> string null
> c null centimeter
> g null gramm
> s null second
>
> The idea is that every symbolic type occurrence can be substituted with the
> expression in the value column.
>
> Now, back to relational theory. What is the predicate
>
> <distance = 20 meters, time = 3 hours>
That is unusual way to write a predicate. The standard notation is
distance = 20 meters & time = 3 hours
> is really telling us? Is it really different from
>
> <distance = 20*100 centimeters, time = 3*3600 seconds>
>
> ? Do we really have to code User-Defined Types in order to handle such
> trivial conversions? Let's extend the types relation a little bit more:
>
> Type Value Comment
> -------- ----- ----------------------------------------
> meter 100*c
> hour 3600*s
>
> Then, substityting those constants into
>
> <distance = 20*meter, time = 3*hour>
>
> could be reduced to
>
> <distance = 20*100*c, time = 3*3600*s>
>
> This is trivial symbolic manipulation that the system should be able to do.
>
> Next, notice null values left for some types. This reflects our incomplete
> understanding of those types. For example, if I were not aware of the
> identity
>
> 360 degrees = 2*pi
I assume you meant
360*degree = 2*pi
> I might have chosen to enter null for the degree type as well.
>
> Likewise, for a string datatype, I don't know how to reduce it to some more
> fundamental types. Maybe, I should consider a semigroup of all character
> strings, and try to find some nice identities, but I have decided not to,
> and just entered null.
>
> Putting this idea to extreme, using fundamental physics equations it is
> possible to reduce physical CGS units to just some constants. Any quantity
> in those undimensional units is just some number.
>
> The end user demands, however, query result to be presented in some units.
> Suppose, he queried the total weight of population of a city and got the
> answer:
>
> 34477.985
Why it's a number, but not some expression in the first place?
> What units? The answer is not as meaningles, as it looks, however. If he
> wants the answer in pounds, then the system should solve the equation
>
> 34477.985 = x*lb
>
> where the pound type must be defined in our types relation, and the
> definition must be free of nulls, of course.
Therefore, the idea is multiplying types to values like in the following expression
90*degree
right?
Then, what about composite types? Could you give some examples involving complex numbers? Received on Sat Nov 01 2003 - 03:50:23 CET
