Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I'm using SQL Server

and in this case i have the following tables:

  • Restock: Foreign key to an R&D Staff member
  • R&D_Staff: subtype from Staff
  • Sales_Staff: subtype from Staff
  • Shipping_Staff: subtype from Staff
  • Staff: supertype

Should the foreign key be pointing to Staff (Supertype) or to R&D_Staff (Subtype)

Thanks in advance

share|improve this question

migrated from stackoverflow.com Dec 14 '11 at 14:35

This question came from our site for professional and enthusiast programmers.

    
Tweaked formatting with bullets and code delimiter (for future use) –  gbn Dec 14 '11 at 13:42

1 Answer 1

up vote 3 down vote accepted

Re-phrasing, do you mean:

don't allow Sales or Shipping staff values in restock?

Then the foreign key is from Restock to R&D_Staff to allow only values from RnD staff in the Restock table

share|improve this answer
    
Thank you, this is what i meant. –  Toby Dec 14 '11 at 11:24

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.