Re: OO and relation "impedance mismatch"

From: Kenneth Downs <firstinit.lastname_at_lastnameplusfam.net>
Date: Wed, 06 Oct 2004 21:05:18 -0400
Message-ID: <eo42kc.t0d.ln_at_mercury.downsfam.net>


mAsterdam wrote:

> Kenneth Downs wrote:
> 

>> mAsterdam wrote:
>>
>>>Kenneth Downs wrote:
>>>...
>>>
>>>>3.  Enforce the arbitrary convention that a foreign key definition
>>>>    causes columns to be placed into the child table that correspond
>>>>    in name and type/precision/scale to the primary key of the
>>>>    parent.
>>>
>>><delurk>
>>>Not the name.
>>>It would exclude mutliple foreign keys between
>>>two tables (ordinary? yes, very). You might want to use the role
>>>name for each of them.
>>></delurk>

>>
>> The current arbitrary feature for this case, which did not seem worth
>> mentioning in that post, is that you can specify a suffix to affix to the
>> columns in the child table. So for two foreign keys to the same table
>> one
>> is suffixed "_parent" and one suffixed "_child". This makes me really
>> uneasy though, I keep thinking "salesperson1", "salesperson2", etc...
> 
> While I was thinking account_from, account_to,
> account_provision, account_costs, etc.

Yes, yours is appropriate, if I understand your use of account_from and account_to. I don't understand account_provision and account_costs, are all four columns in one table? If so, what are they?

But salesperson1..n is not usually appropriate. Haven't figured out if I can protect against one while allowing another, but also haven't thought about it that hard. At the moment the loophole is open.

-- 
Kenneth Downs
Use first initial plus last name at last name plus literal "fam.net" to
email me
Received on Thu Oct 07 2004 - 03:05:18 CEST

Original text of this message