SQLTeam.com | Weblogs | Forums

Primary Key and Foreign Key


#1

Hi,

can we create primary key and foreign key in same column ? off course we can create, but is it make any performance related issues ? Can you please any help ?

Advance Thanks,
Vignesh R


#2

Do you mean a primary key column that is a foreign key into another table? If your business logic calls for it, there is nothing wrong with doing that. In and of itself, that should not cause any performance problems.

When you want to represent a base class and derived classes (from object oriented programming languages) in a database on often resorts to this type of tables.


#3

Hi JameshK,

Thank you very much for your kind replay.