Re: supertype to 2 subtypes junctioned then im stuck!
On Wed, 19 Nov 2003 14:31:00 -0800, "Mike Krous"
<m.krous@nospam _comcast.net> wrote:
[color=blue]
>Ok, as ive said, yes Parties is technically more correct, I agree.[/color]
"Customers" , as a supertype of "individual s" and "organizations" , is
not merely less correct than "Parties"--it is wrong. At the risk of
repeating myself, "Individual s" is a subtype of "Customers" if and
only if every individual is a customer. Not "every individual I'm
interested in"; not "every individual in this database". _Every_
individual.
[color=blue]
>I am
>building an order entry system and for what we are doing "customer" seemed
>just fine.[/color]
"It seemed just fine" isn't a sound basis for designing databases, is
it?
[color=blue]
>(that's how I learned
>super/sub typing)[/color]
Uh huh.
[color=blue]
>...That however, does nothing for my original question, and
>as a result changed nothing more than my table name from tbl_Customers to
>tbl_Parties... .ok, now what?[/color]
Let's think for a minute, shall we?
Conceptually, a minimal "company contact" consists of an organization,
an individual, and (I presume) a phone number. You probably need more
columns than the minimum. A minimal candidate key would include
candiate keys (for you, probably primary keys) from both
[Organizations] and [Individuals], and the column having the phone
number.
Conceptually, a minimal "contact" for an individual consists of an
individual and (again, I presume) a phone number. A minimal candidate
key would include the primary key from [Individuals] and the column
having the phone number. I'm sure you wouldn't even consider storing
these in the same table as the company contacts, because they're
different things.
[snip][color=blue]
>For
>example Allen Browne, he did an excellent job of giving me a suggestion and
>he was focused on my problem, it was much appreciated.[/color]
He focused on your question, not on your problem.
[color=blue]
>As far as I could
>gather Mike was essentially telling me that I had it "backwards" to change
>my table name to "Parties".[/color]
You're mistaken. I didn't tell you to change a table's name. I said
you need a different table. "Parties" and "Customers" are both useful
things, but hardly interchangable.
You need a supertype. The supertype you need is "Parties". You might
need a table of customers, too. The customers PK, of course, would be
a foreign key reference to [Parties].
[color=blue]
>As best as I could read from his post that was
>supposed to make my problem magically disappear.[/color]
See if your local library can find a copy of Adler and van Doren's
book _How to Read a Book_. In spite of its title, which many find
initially offensive, it's a real eye-opener.
--
Mike Sherrill
Information Management Systems
On Wed, 19 Nov 2003 14:31:00 -0800, "Mike Krous"
<m.krous@nospam _comcast.net> wrote:
[color=blue]
>Ok, as ive said, yes Parties is technically more correct, I agree.[/color]
"Customers" , as a supertype of "individual s" and "organizations" , is
not merely less correct than "Parties"--it is wrong. At the risk of
repeating myself, "Individual s" is a subtype of "Customers" if and
only if every individual is a customer. Not "every individual I'm
interested in"; not "every individual in this database". _Every_
individual.
[color=blue]
>I am
>building an order entry system and for what we are doing "customer" seemed
>just fine.[/color]
"It seemed just fine" isn't a sound basis for designing databases, is
it?
[color=blue]
>(that's how I learned
>super/sub typing)[/color]
Uh huh.
[color=blue]
>...That however, does nothing for my original question, and
>as a result changed nothing more than my table name from tbl_Customers to
>tbl_Parties... .ok, now what?[/color]
Let's think for a minute, shall we?
Conceptually, a minimal "company contact" consists of an organization,
an individual, and (I presume) a phone number. You probably need more
columns than the minimum. A minimal candidate key would include
candiate keys (for you, probably primary keys) from both
[Organizations] and [Individuals], and the column having the phone
number.
Conceptually, a minimal "contact" for an individual consists of an
individual and (again, I presume) a phone number. A minimal candidate
key would include the primary key from [Individuals] and the column
having the phone number. I'm sure you wouldn't even consider storing
these in the same table as the company contacts, because they're
different things.
[snip][color=blue]
>For
>example Allen Browne, he did an excellent job of giving me a suggestion and
>he was focused on my problem, it was much appreciated.[/color]
He focused on your question, not on your problem.
[color=blue]
>As far as I could
>gather Mike was essentially telling me that I had it "backwards" to change
>my table name to "Parties".[/color]
You're mistaken. I didn't tell you to change a table's name. I said
you need a different table. "Parties" and "Customers" are both useful
things, but hardly interchangable.
You need a supertype. The supertype you need is "Parties". You might
need a table of customers, too. The customers PK, of course, would be
a foreign key reference to [Parties].
[color=blue]
>As best as I could read from his post that was
>supposed to make my problem magically disappear.[/color]
See if your local library can find a copy of Adler and van Doren's
book _How to Read a Book_. In spite of its title, which many find
initially offensive, it's a real eye-opener.
--
Mike Sherrill
Information Management Systems
Comment