Subject | Re: [ib-support] Error:Object is in use |
---|---|
Author | Jörg Schiemann |
Post date | 2001-02-22T13:56:58Z |
Helen Borrie wrote:
I sometimes do create master-details the same way.
I.e. I wrote an application for a mechanical engineering firm.
The master table 'Order' has the field 'OrderNo' as primary key
and the detail table 'Material' has a composite primary key
composed of 'OrderNo' and 'Position' and the foreign key is 'OrderNo'.
If I should use a primary key for the detail table like ie 'MaterialId'
it would mean one extra field, because I can't relinquish the field
'Position'.
Does it matter for performance reason?
Regards,
Jörg Schiemann
>Why is that bizarre?
> At 12:12 PM 22-02-01 +0200, you wrote:
> >I have also tried to completely rename the tables and fields by adding
> >a 1 to each name that still does not work. This leads me to
> >conclude that somewhere there is a serious error in my database.
> >
> >For the time being I am going to recreate my database and pump
> >the data over while it still works. I would still appreciate
> >comments suggestions as to how to prevent/fix this.
> >
> >Thanks
> >Gerhardus
>
> I think it is very bizarre to make a composite primary key on the detail table AND to make one of the columns of that key your foreign key. What is your reasoning for that? What does WONO add that BMNO doesn't do on its own?
>
> Helen
>
I sometimes do create master-details the same way.
I.e. I wrote an application for a mechanical engineering firm.
The master table 'Order' has the field 'OrderNo' as primary key
and the detail table 'Material' has a composite primary key
composed of 'OrderNo' and 'Position' and the foreign key is 'OrderNo'.
If I should use a primary key for the detail table like ie 'MaterialId'
it would mean one extra field, because I can't relinquish the field
'Position'.
Does it matter for performance reason?
Regards,
Jörg Schiemann