I'm not that experienced in sql modeling, but i´m thinking of an intricate problem (or/and a silly one).
I have a project table(table 1) with many projectassignments(table 2), which is a join table. This join table have one person(table 3) with many projectassignments. I also have two tables(table 4 and 5) representing two different tests that can have many projectassignments.
But normally when you create a project you do it to assign people to one test, so the other testtable for this assignment would be null. Is it possible that the foreign keys on the join table for these tests could be nullable ints? what would be the implications for doing this?
Project table
int ID
ICollection<ProjectAssignment> ProjectAssignments { get; set; }
ProjectAssignments table
int ID
int ProjectID
int PersonID
int Test1ID
int Test2ID
Person table
int ID
ICollection<ProjectAssignment> ProjectAssignments { get; set; }
Test1 table
int ID
ICollection<ProjectAssignment> ProjectAssignments { get; set; }
Test2 table
int ID
ICollection<ProjectAssignment> ProjectAssignments { get; set; }
Any feedback much appreciated!