I currently have a database with a students table like so:
Students
_________
StudentID PK
FirstName
LastName
BirthDate
AddressL1
AddressL2
City
State
Zip
etc.....
My client has asked me to add a feature so she can identify siblings in the system. If Jimmy is a student and Billy is a student and Jimmy and Billy are brothers, she wants a way to know that.
How would you implement this?
I'm thinking adding a Family Table with a FamilyID FK is overkill for this problem. Do you agree?
My instinct is to add a nullable column Called Family. Set it to null if the student has no siblings. If the student has siblings, each students get the same GUID stored in the Family column.
If you want to list the siblings of a given student you'd execute: Select Siblings.* From Students Inner Join Students as Siblings On Students.Family = Siblings.Family Where Students.StudentID = ?
What are the downsides of this approach? Is there an alternate strategy I should consider?