While doing some research into mapping one-to-one relationships I've come across some statements that have made me question some of my database design decisions.
Basically I have some entities similar to the following:
Person, Contact, Parent
Both a contact and a parent are people. A person may be a contact, parent, both, or neither.
The database design I came up with has a table for each of these three entities, and all three tables share a primary ID (PersonID). From a database design perspective, this seems to be a well-normalized and reasonably performant way to represent the database and its relationships (at least to me).
At this point, I begin coding C# classes and NHibnerate mappings to represent these entities. The most natural mapping approach I can find is to use a mapping. The other options (one-to-one, one-to-many, etc...) seem to require that I add one or more unnecessary FK's to the tables. Upon browsing through the NHibernate documentation I stumble upon the following statement:
This feature is often only useful for legacy data models, we recommend fewer tables than classes and a fine-grained domain model. However, it is useful for switching between inheritance mapping strategies in a single hierarchy, as explained later.
My question is:
A) Am I violating this principal? B) If so, how would I better design this system?
Is this statement suggesting that I should lump all of the Person/Contact/Parent fields into a single table (with many nullable fields)? Or am I somehow missing the point?
Since this is a rare occasion where I can design the tables/classes from scratch I would like to get it right. Thanks in advance for the help!
Edit: More info about how I intend the above database design to work:
The basic idea is that every person gets a record in the person table. The presence/absence of records in the related tables determines whether the person is a parent, contact, etc... This would seem to enforce the one->one relationships and allow for fast queries/joins (the shared primary ID would be a clustered PK in each table).
Edit: Thanks for the help guys. I didn't really consider queryability well enough when I designed this system so I'm going to move toward something similar to the solutions suggested by Jamie Ide & hlgem. I found all answers helpful. All in all it looks like shared primary keys result in some problems with the object model on the c# side.