I've tried out the family tree module for d6.x and didn't find it to my liking. I am therefore trying to use CCK and views to model what I want to do, and I am interested in some input.
The model will have the following entities (content types)
Individual
Event
EventProperty
EventRelationship
I think those three should be enough.
An Event is tied to a person and is therefore a nodereference. Every event has a date, and every event is of a type. The date is three integers, and the type is a taxonomy.
EventyProperty is attached to an event (duh), and is a nodereference to the event, a taxonomy term and a text field.
EventRelationship is attached to two events via nodereference, and has a taxonom term for defining the relationship.
To model myself I would do the following
Individual 1: Paul K Egell-Johnsen
Event 1: Born, 01.02.1972, Individual 1
EventProperty 1: Place, Porsgrunn, Norway, Event 1
Event 2: Name, 01.02.1972, Individual 1
EventProperty 2: Given name, Paul, Event 2
EventProperty 3: Family name, Egell-Johnsen, Event 2
EventProperty 4: Middle name, Kenneth, Event 2
Event 3: Married, 25.06.2005, Individual 1
Individual 2: Cristina
Event 4: Married, 25.06.2005, Individual 2
EventProperty 5: Place, Oslo, Norway, Event 4
EventRelationship 1: Event 3, Event 4, marriage
You get the picture. Now, this gets a bit complicated, do you think it is feasible using views and CCK, in the long run? I envision quite a large numer of nodes over time.
This system lets me add name changes, changes in relationships (marriage, divorce, cohabitation). But of course the views get pretty complex, to find siblings you have to get all EventRelationships with your father and your mother.
For GEDCOM import/export, it seems feasible as it would probably be easy to serialize. Since RDF is all the rage the proposed structure is based on something which can be easily added to RDF export.
Comments
Totally whacked
It is late at night. The above is not correct. It must be more like this:
Properties can go anywhere, and might have subtypes (different nodes), for date, time, text, url, nodereference/userreference?
Relationships are of two types, reciprocal and one way. Probably a two way relationship should be described by two properties, one at property/event/individual 1 and one at property/event/individual 2.
If templates in Drupal support templates for nodes having a specific taxonomy term, then the _rendering_ of these might be a pretty straight forward thing. I know content types can have their own templates, so regardless, it might be possible to have a content type template delegate to specific taxonomy based templates.
With the above system, it is easy to see how multidimensional relationships can be created in a pretty straight forward manner. It models many types of real life events, like name changes, sex changes, same sex marriages, divorces, polygamy, timelines, and is open for expansion into things like communions, naming cermonies, etc.
It should also be pretty easy to translate, since it is depending on taxonomy for its main components. Only biographies and such needs to be translated manually. An event is named automatically for example "Marriage of Paul K Egell-Johnsen and Cristina B. Taquiqui", with proper replacement tokens the titles can easily be translated into different languages. The same goes for properties.
Drawback is complexity of views, but with views2 it is easier to slice and dice them. A view reference field in Individual could give the list of events for that individual, another a list of property changes, etc.
Paul K Egell-Johnsen
more tables
Why not build a classical table structure:
table 1: person
- firstname
- lastname
- date of birth
-...
Table 2: relations
- person 1
- person 2
- type of relationship
- date from
- date until
Table 3: places
- placedescription (house, cemetary)
- adress
Then two tables to make links between places and persons, or places and relations
You could go on like this with tables for reference material, comments and stories....
Maybe my approach is totally wrong within the drupal context (I am a newbie) but then i am happy to hear that as well
Here's my take
I'm working on a module that will allow other modules to use the methods I have for processing GEDCOM lines (just 5.5, atm). It takes a valid GEDCOM Lineage-Linked Form (LLFM) file (validation is currently up to the user) and stores each record type (except HEAD/TRLR/MEDI) of the LLFM in its own db table, which is referenced by the record's XREF_ID. The data representing the record (all tags/subtags) are stored as serialized arrays. I also provide an XREF_ID to Drupal node ID map table, which can be used by modules to update properly when a node is changed.
In my testing, I have import working pretty well (2K records) with a heavily modified family module. NOTE records don't actually work yet, because the level 0 NOTE tag has more than just an XREF_ID on the line (almost all other record types are like this: 0 @XREF_ID@ TAG, but NOTE goes like this: 0 @XREF_ID@ NOTE The first line of the submitter's text of the note). MEDI will have to wait for much later :D
For my next trick, I'm going to attempt to get the family module's location nodes working. Then, I still have to write generic data extraction methods for other modules to use. Then, I have to write the data create/update methods, and finally modify family to do updates/creates through its node hooks.
Subscribing
I'd like to follow this train of thought. I've not looked at what modules are available as of yet, so this is just research for me for now. I mentioned to my wife's uncle about looking onto Drupal for the family tree type website he put together for their family. He already has lots of data, and at least pretty good security, but I think that Drupal's structure and such would be more than ideal for a family-tree type site.
Keep the thoughts/ideas coming!
Genmod
I've started this project
http://drupal.org/project/genmod
So any developers are welcome.