Re: c.d.theory glossary (repost)

From: Paul <paul_at_test.com>
Date: Fri, 14 May 2004 14:56:11 +0100
Message-ID: <Ud4pc.4185$NK4.362964_at_stones.force9.net>


Dawn M. Wolthuis wrote:

>>>[Domain]
>>>Given a relation R, a domain is a set Sn such that for each tuple (A1,
>>>A2, ...An, ...Am) in R, An is an element of Sn.

>
> That's a mathematical def of domain, which is where Codd started. Again, a
> "b" definition might be in order -- what do you like as a def?

Surely domain is a lower-level concept than relation. So it doesn't make sense to refer to relations in the initial definition of what a domain is. I think having a few examples is also very helpful.

I'd say something like:

A "domain" is a set of values: for example "integers between 0 and 255", "character strings less than 10 characters long", "dates". Sometimes used synonymously with "type".

In a relational database context, each column of a table is constrained to only allow values from a specific domain. For example, this helps to ensure that a "name" won't get accidently stored in a "birthdate" column.

---
Sometimes a "domain" is taken to include operators on the set, as well 
as the set of values itself. For example an integer domain might include 
addition and multiplication operators, and greater than / less than 
operators.

I'm not sure about this last bit though because what about operators 
that take arguments from more than one domain? Or operators that return 
a value that isn't in the domain of the arguments? Where do they fit in?

Paul.
Received on Fri May 14 2004 - 15:56:11 CEST

Original text of this message