Re: Foreign Keys & Primary Keys
Posted in 1997
When you define a foreign key, it becomes an index also. Any way, you can define a composite index (or primary key) using that column as a part of it. Byte byte! Mario R. Canto mcanto@intec.unl.edu.ar On Mon, 24 Nov 1997, Barry Stubbs wrote: } I know this is a simple question, but I just can't find a simple answer. I } have two entities as follows with only their primary keys listed: } } TEA_REF CLASS_TEA } ------------ ------------------ } TEA_CD UNIT_NUM } CLASS_NUM } TEA_CD } } The relationship is TEA_REF(one) to CLASS_TEA(many) with the foreign key as } TEA_CD in CLASS_TEA. Should I also have a separate index for } CLASS_TEA.TEA_CD for that relationship? Or will it being a part of the } primary key suffice for the relationship? } } Barry Stubbs } Windham School District } } } Barry Stubbs } Windham School District } bgs@alpha1.net }