Re: domains aren't subtypes, right?

From: Mikito Harakiri <mikharakiri_at_ywho.com>
Date: Mon, 2 Jun 2003 12:16:15 -0700
Message-ID: <JuNCa.8$YX6.89_at_news.oracle.com>


"Leandro Guimarães Faria Corsetti Dutra" <lgcdutra_at_terra.com.br> wrote in message news:pan.2003.06.01.03.36.33.535933_at_terra.com.br...
> What's the problem with ANSI SQL's time-related types?
>
> And how Oracle's date is better?

Time is one-dimensional scalar entity. Humans made goofy time units -- years, months, days, hours, minutes, seconds -- where numbering system is not even decimal. Timestamp (as oracle "Date" datatype) is just one scalar. If you need to timestamp you record in the table, here you go, just one literal SYSDATE:

insert into Payments (User, Amount, When) values ('John Doe',1000, SYSDATE)

How do you write this with Date and Time? Splitting it into separate Date (days based) and Time (seconds based) is endorsing those goofy human time units.

Similarly to the Timestamps, would you suggest storing a number in a multiple columns like this:

NumberInOnes
NumberInTens
NumberInHundreds
...

In short, Day and Time are the functions that accept Timestamp as an input argument. They certainly are not primary datatypes. Received on Mon Jun 02 2003 - 21:16:15 CEST

Original text of this message