in

The ORM Foundation

Get the facts!

Why are dates modeled as Objects and not Values?

Last post 05-06-2009 7:29 by Roger Cass. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 05-04-2009 9:36

    Why are dates modeled as Objects and not Values?

    I am still coming up to speed with ORM and using it to convert a logical ER diagram into something more easily understood by our business partners. It did not take me long to run into a temporal concept, which led me to deal with dates. I note that the examples and papers show modeling dates as Objects and not Values. This has me a little confused. Perhaps I am still thinking too much about a date being a fundamental type in other modeling and development systems. On the other hand, there appears to be no built-in reference mode for dates. What would be the recommended reference mode? Number?
  • 05-04-2009 15:17 In reply to

    Re: Why are dates modeled as Objects and not Values?

    Hi Roger,

    Welcome to ORM!
    Yes - I understand that the terminology can be confusing so I hope that the following explanation helps. 
    Ken

    Objects: ORM uses the concept of an "Object Type" which is not the same as an object in OO.
    An ORM Object Type can be either an "entity type" or a "value type".

    The "date" data type:  If you are using NORMA, then you will find a data type called "CE". This stands for "Christian Era".
    The following example uses the object type "Date(.CE)"
    As you can see, there is only one ORM "date" object but the relational mapper has mapped the single "date domain" to two completely different concepts in two different tables (viz. date of birth and company formation date).


    Filed under:
  • 05-06-2009 7:29 In reply to

    Re: Why are dates modeled as Objects and not Values?

    Excellent explanation and example--just what I needed to know. Thank you.
Page 1 of 1 (3 items)
© 2008-2014 The ORM Foundation: A UK not-for-profit organisation -------------- Terms of Service