Subject | Re: [firebird-support] Primary Key, Foreign Key |
---|---|
Author | Martijn Tonies |
Post date | 2003-11-20T10:35:23Z |
> > I have the following case:the
> >
> > 1. TBL_PARTY, primary key PARTY_ID
> > 2. TBL_PERSON references TBL_PARTY on PARTY_ID
> >
> > So, PARTY_ID is a FK in TL_PERSON which means I have an index created,
> > but PARTY_ID is a PK also. I don't like tables without PK defined, but
> > in that case I will get 2 indexes on one and the same field which is
> > not good also.
> >
> > What is your opinion about that? Can I avoid one of the indexes?
>
> If TBL_PERSON and TBL_PARTY share the same PK - why don't you just have
> fields in TBL_PARTY to the TBL_PERSON table.That might be entirely dependent on how the rest of his database design
looks and what the application actually does.
With regards,
Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com