My application - based on a relational database - has to deal with two kinds of customer entities, (natural) persons and organizations. They have different attributes and therefore each group lives in its own table.
Now I have other data objects like addresses or tags or memos. Each record belongs to exactly either a person or an organization.
I wonder how to represent that connection. When linking to a person or an organization I don't want to have another field with the target table.
I was thinking about creating a kind of super-entity on top of persons and organizations. I've seen this in CRM apps like Highrise or Capsule CRM - they have called it "parties". Every person and every organization has a corresponding entry in the party table. Other tables now link to the party table instead of directly to persons or organizations.
Party:
id | person_id | org_id
1 | 1 |
2 | | 1
In the above example the party record #1 links to person #1 and party #2 links to organization #1.
Is this really a feasible way or am I just a bit to blind for a simpler solution?