Results 1 to 7 of 7
  1. #1
    Join Date
    Nov 2013
    Location
    Switzerland
    Posts
    6

    Unanswered: Is Oracle able to manage interval data (6NF) ?

    Hi,

    I would like to know, if Oracle (12c) is able to manage the data type interval.

    Intervals management was published in end 2002 (Temporal data and the relational model), so now I've red this excellent book, I am impatient to know if such a RDBMS can manage them ?

    Thank you for your answer.

  2. #2
    Join Date
    Nov 2003
    Posts
    2,934
    Provided Answers: 12
    If in doubt read the manual: Data Types
    I will not read nor answer questions where the SQL code is messy and not formatted properly using [code] tags: http://www.dbforums.com/misc.php?do=bbcode#code

    Tips for good questions:

    http://tkyte.blogspot.de/2005/06/how...questions.html
    http://wiki.postgresql.org/wiki/SlowQueryQuestions
    http://catb.org/esr/faqs/smart-questions.html

  3. #3
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    Quote Originally Posted by Oppenheimer View Post
    Hi,

    I would like to know, if Oracle (12c) is able to manage the data type interval.

    When all else fails Read The Fine Manual
    Oracle Database Search Results: INTERVAL
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  4. #4
    Join Date
    Nov 2013
    Location
    Switzerland
    Posts
    6

    "To" would be for the granularity ?

    Well,

    Thank you Shammat and Anacedent for your answers! (you really found these documentations alone ?)

    Well... I am french speaking, precising it to reassure myself against my fail in mastering Oracle web site, which I find very complicated.

    Two more related questions:
    -Do you know since which version of Oracle is it supported ?
    -Something that I don't really understand, reading the docs:
    INTERVAL YEAR [(year_precision)] TO MONTH, what does it mean, exactly ? I guess that "to month" means the granularity of time. But for me, if I say "to", is as in "from... to", so it doesn't make any sense in this interval example.
    In his book, Temporal data and the relational model, Date recommend to write as:
    [begin:end], so if I translate:
    [2013-11-18 21H10M00s : 2013-11-18 21H15M00s] (the exact writing is from me).

    According that.. the granularity of time is implicit in the dates precision!

    Did I make a mistake ?

  5. #5
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  6. #6
    Join Date
    Nov 2013
    Location
    Switzerland
    Posts
    6

    Thumbs up I'll see this week-end - (not up to read all this now).

    Thank you Anacedent,

    I realize that this reading demand to me more time and concentration than expected...
    I'll read this when I'll be less tired. We're 21H50 in Switzerland, and I'm not really up to read all this now.

    I will see this during the next week-end with attention in place of making multiple posts. I think this will be preferable.

    If I definitively don't understand this, I'l argument on saturday or sunday.

    Thank you one more time for your cooperation.

  7. #7
    Join Date
    Nov 2003
    Posts
    2,934
    Provided Answers: 12
    Quote Originally Posted by Oppenheimer View Post
    (you really found these documentations alone ?)
    Sure. It's easy. Go to: Oracle Documentation select the approriate database version, select "SQL Reference", then go to "Data Types".

    -Do you know since which version of Oracle is it supported ?
    The first manual where it's mentioned is the 9.0 manual: http://docs.oracle.com/cd/A91202_01/...nts2.htm#54201

    INTERVAL YEAR [(year_precision)] TO MONTH, what does it mean, exactly ? I guess that "to month" means the granularity of time. But for me, if I say "to", is as in "from... to", so it doesn't make any sense in this interval example.
    Well, this is how the interval data type is defined in the SQL standard. It is confusing I agree.

    In his book, Date recommend to write as: [...] [2013-11-18 21H10M00s : 2013-11-18 21H15M00s]
    That's not what the interval data type stores. An interval in standard SQL and Oracle stores a duration, rather than a "from - to" definition. The interval data types stores things like "6 weeks, 4 days, 20 minutes" and that's where the "from - to" in the data type definition comes into play.

    So the interval datatype is not what you are looking for and Oracle (unlike e.g. Postgres) does not have a native datatype to express the "from / to" definition that you are looking for. You will need to do this in two timestamp columns.
    I will not read nor answer questions where the SQL code is messy and not formatted properly using [code] tags: http://www.dbforums.com/misc.php?do=bbcode#code

    Tips for good questions:

    http://tkyte.blogspot.de/2005/06/how...questions.html
    http://wiki.postgresql.org/wiki/SlowQueryQuestions
    http://catb.org/esr/faqs/smart-questions.html

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •