Re: Database theory and money

From: Chad <cthomas500_at_home.com>
Date: Mon, 11 Sep 2000 11:47:08 GMT
Message-ID: <0D3v5.29946$E_6.11742167_at_news3.rdc1.on.home.com>


Thanks for the feedback. I am familiar with Date's book. This just happens to be the first system where I have had to deal with multiple currencies. I'm looking for a good reference on this topic.

For the record, I would allways store the currency indicator, but never in the same column. This particular system does not need to compare values in this column against other values in this column.

Chad Thomas

"Jan Hidders" <hidders_at_REMOVE.THIS.win.tue.nl> wrote in message news:8pibtr$qf4$1_at_news.tue.nl...
> Chad wrote:
> > I just want some feedback on storing monetary values of different
> > currencies in the same column in a table. I think it violates
 relational
> > principles.
> >
> > Does anyone have a good source on this?
>
> Look at "An Introduction to Database Systems" by C.J. Date. One principle
 is
> that every column contains only values from a certain domain. Such a
 domain
> is a set of (atomic) values with a specific meaning. So the domains
 'weight'
> and 'height' may contain the same values but still are different domains.
 An
> important property of values within a domain is that it must make sense to
> ask if they are equal or not. For example, it usually does not make sense
> to ask if weight X is equal to height Y, so these should be different
> domains and therefore never in the same column.
>
> Whether this is the case in your table depends on what you exactly store
 in
> the column. If it is just a number and the monetary unit is not indicated
> anywhere then you probably have a problem anyway. If the monetary unit is
> indicated somehow in another column then this may or may not violate the
> principle mentioned depending upon whether you think it makes sense to
> compare numbers of liras to numbers of dollars et cetera. (I think it
 does,
> so as far as I am concerned you are not violating the principle.) If the
> monetary unit is indicated in the same column then you are violating the
> principle that values in columns should be atomic, i.e., cannot be split
> into meaningful parts. But this latter principle is usually not considered
> very important anyway (ususally a date is represented in one column
 although
> by this principle it should be split).
>
> --
> Kind regards
>
> Jan Hidders
Received on Mon Sep 11 2000 - 13:47:08 CEST

Original text of this message