944,054 Members | Top Members by Rank

Ad:
May 31st, 2007
0

Implementing 1:1

Expand Post »
What is the proper way to implement a 1:0,1 relationship between tables? I have two cases where I would like to use this.

First, I need to track members of a school. Since students require more info than faculty I created two tables, Person and Student. The Student table contains a PersonID field which is unique and a foreign key to the primary key in Person. I then created a View on Person called Faculty which lists everyone that doesn't join with an entity in Student.

This is basically an inheritence problem. My solution works so far but is klunky.

The other scenario is that of managing students accounts with an third-party service. In this case, I am considering Person and Account tables and again using a LEFT JOIN to determine who has accounts.

Is there a better way to go about this? It doesn't feel right and seems like if I scale this out, I'm going to run into problems. I am using MS SQL 2005.

Any advice? Thanks!
bob
Similar Threads
Reputation Points: 10
Solved Threads: 1
Newbie Poster
BobWeiner is offline Offline
2 posts
since May 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Database Design Forum Timeline: need excel help
Next Thread in Database Design Forum Timeline: Total noob question





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC