
Originally Posted by
ArviLaanemets
Let's assume you have a table where you store the permanent info about persons:
tblPersons: PersonID, ForName, LastName, DOB, DOD, ...,
(You can of-course use a name as ID, i.e. a PrimaryKey for this table, but this is really bad idea, as you easily may get a bunch of different people all with names like John Smith! So having an unique ID for every person is a way to go!)
Now to store any relationships between those persons, you need another table, like:
tblRelationships: RelationshipID, PersonID, RelatedPersonID, RelationshipTyp
(PersonID and RelatedPersonID in this table are a foreign keys which links those fields with table tblPersons. Any person can have any number of relationships with any number of other persons. You have to define an unique index for this table, which doesn't allow to enter the same type of relationship to same other person.)
And probably it will be wise to have a table, where you define all those relationship types too - like:
tblRelationshipTypes: RelationshipTyp, RelationshipText
(where RelationshipTyp is primary key)
This is the simplest design, which assumes, all those relationships are permanent. When this is not the case (e.g. people marry, and then get divorce), the design must have also the start [and End] dates of given relationship (when the end date is empty, then the relationship is currently valid). And the unique ID in tblRelationships must allow to enter the same relationship several times, but only for non-overlapping periods.
So when a person has married, you enter for both of them a record into relationships table, with marriage date as start date, and relationship type as marriage;
When those spouses have later divorce, you update their relation records with divorce date as end date.