Re: Help! I can't support normalization
From: Lauri Pietarinen <lauri.pietarinen_at_atbusiness.com>
Date: Wed, 20 Nov 2002 23:22:17 +0200
Message-ID: <3DDBFD09.7030903_at_atbusiness.com>
is 'select N from TableNum where N <> 13'
My opinion is that relations and domains are basically different things. Both are needed but
they suffice.
The "real world" is like a piece of soap: when you try to completely model it, it just slips from your
hands. So what is a relation and what is a domain really depends on what angle
of the "real world" you are taking.
The concept of 'color' could be a domain in one application (say a product catalog), but
in a paint-factory it would probably consist of several relations (anybody know,
by the way?)
I quote from Date: Introduction to Databases (7ed) pages 66-67:
-Types [=domains] are (sets of) things we can talk about
- Relations are (sets of) things we say about the things we can talk about
[...]
Types [=domains] are to relations as nouns are to sentences
regards,
Lauri Pietarinen
Received on Wed Nov 20 2002 - 22:22:17 CET
Date: Wed, 20 Nov 2002 23:22:17 +0200
Message-ID: <3DDBFD09.7030903_at_atbusiness.com>
I wouldn't call it a "domain relation", just a relation like any other one.It proposes a table called TableNum with just one column containing integers from 1 to .... It also has some proposed applications. Now, would such a table be a virtual or a real one??Well, it depends what you man by "real". In a sense all tables are virtual because they are purely logical constructs. But what would it mean say to delete a row from such a "domain relation"? Really it shouldn't be allowed.
Well, I think that TableNum is a special case. As for excluding '13' all you have to doI guess what you're meaning is that we would have two categories of table: ones where the rows are listed explicitly and ones where the rows are defined in some kind of induction process. These second sort of tables you could only SELECT from, as INSERT, UPDATE, DELETE might not make sense. Or maybe they would? Say I wanted to change my integer domain to be all integers (within a certain range) excluding "13"? Should I be allowed to do this or should the "built-in" domains remain as they are and I should define a new domain based on, but separate to, the integer domain (type inheritance?)?
is 'select N from TableNum where N <> 13'
My opinion is that relations and domains are basically different things. Both are needed but
they suffice.
The "real world" is like a piece of soap: when you try to completely model it, it just slips from your
hands. So what is a relation and what is a domain really depends on what angle
of the "real world" you are taking.
The concept of 'color' could be a domain in one application (say a product catalog), but
in a paint-factory it would probably consist of several relations (anybody know,
by the way?)
I quote from Date: Introduction to Databases (7ed) pages 66-67:
-Types [=domains] are (sets of) things we can talk about
- Relations are (sets of) things we say about the things we can talk about
[...]
Types [=domains] are to relations as nouns are to sentences
I wouldn't think so. Why would it?I've only briefly read about them but is this moving towards things like constraint databases? Does this violate Codd's principles? Should all relations be able in theory to be manipulated by any SQL DML statement?
regards,
Lauri Pietarinen
Received on Wed Nov 20 2002 - 22:22:17 CET