Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 Database Design and Application Architecture
 Subtype PK Name

Author  Topic 

Dbar
Starting Member

12 Posts

Posted - 2009-01-21 : 17:43:37
I have a supertype table "Persons" (PK - "PersonID") and several subtype tables. Is it necessary/mandatory to name the PK of all the subtype tables "PersonID"?

One of the subtype tables is "Employees". I want to use "EmployeeID" as the PK (i.e., PersonID in Persons is related 1-1 to EmployeeID in Employees).

Thanks!

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-01-21 : 17:45:57
It is not mandatory or necessary to use the same column name in each of the tables. You typically do use the same name though as the meaning amongst the tables doesn't change. In your case though, it sounds like the meaning changes, so a different column name would make sense.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -