Re: Domain Definition

From: Jan Hidders <hidders_at_hcoss.uia.ac.be>
Date: 15 Jan 2003 12:05:24 +0100
Message-ID: <3e254074$1_at_news.uia.ac.be>


In article <H8F4oq.KEE_at_news.boeing.com>, D Guntermann <guntermann_at_hotmail.com> wrote:
>Should a domain or collection of values be defined solely based on a default
>system representation of values independent of associated meaning, or should
>semantics of the values also play a part in determining and partitioning
>domains?

Let me try to give an answer from a theoretical point of view. First it is important that you realize that when we talk about domains we have to distinguish between the values themselves (e.g the number 1) and how they are represented in the different domains (e.g. "1", "1.0", "1E0"). The relationship may in fact be a many-to-many relationship because the same represention may denote a different value in different domains (e.g. "1-1-2003" could be a date, but also some article code). So it is certainly not always correct to conclude that if two values have the same representation they are one and the same value.

Now, your question boils down to the observation that sometimes we have two domains with very similar representation and we would like to compare them.

>Example1
>-------------------
>DomA={'Y','N'}
>DomB={'Y','N'}

However, if it makes sense to compare the representations then apparently values in the two domains are the same if they they have the same represention. But if that is true then you can define a common super-domain (or super-class if you will) that describes the intersection of the two original domains and for this domain the equality operator will be defined.

It could be that such a super-domain is not defined and you still would like to compare the representations. For that purpose every domain should have a 'represention' function defined that maps a value in the domain to the string that represents the value. Note that this gives you a clear distinction between X = Y and repr(X) = repr(Y) as there should be.

  • Jan Hidders
Received on Wed Jan 15 2003 - 12:05:24 CET

Original text of this message