First stab at data structures for a Drupal 7 based Genealogy site

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
lhridley's picture

After coming up for air from a grueling client project, I turned attention back to Drupal genealogy. Attached is a PDF document outlining some proposed data structures for creating a Drupal based genealogy site. These structures are assuming Drupal 7 as the base site.

The content type most likely to change would be the Source and Source Citation content types, as I'm still studying the best layout and information to capture for accurate source citations across the various source types.

These data types are based on my thoughts and personal visions for the eventual site as I see it. However, I'm sure there are things I have overlooked in my definitions, so take a look, feedback would be most appreciated.

AttachmentSize
GenealogyDataStructure.pdf328.66 KB

Comments

My 2 cents

old_dog's picture

My preference would be to define custom entities with required properties and foreign keys, rather than variations of nodes with fields and reliance on additional modules to link them together.

However, that aside, the structure looks promising. It fits fairly well with the way information would be saved in a gedcom file. But, since (going by your previous posts) you intend to enter data manually, I wonder what the input form(s) would look like. Entering a new individual would require creating instances of Person, Family, and Events at a minimum. Would it be a multi-step form? How does one know what to put in all the entity reference fields?

I think the Event entity should have a "type" field/property, which would probably obviate the need for separate birth, death, and burial references in the Person entity and separate marriage, divorce, etc. references in the Family entity.

Should there be references in the Person entity to the Family entity? Once as child and possibly several as spouse?

I think it's a waste of effort separating middle name from given names. Many people have 3 or 4 given names, some only 1. Might be more useful to record the name the person was called by (often not the first).

Nick names

k_and_j's picture

What is the typical way to handle nicknames? (As I posted (below) I'm the webmaster, not the genealogist.)

In my husband's family, the Italian brothers all had given first names that are on the Ellis Island register, but none of them used those names after they settled in America. They all had an Americanized name, that, for all intents and purposes was their given name, except it wasn't their legal name (and, so, not on all records).

Using the given name only would lead to confusion among family members in an online, collaborative genealogy project. Using the nick name only would cause the more serious amateur genealogists to not be able to track down documentation. That is, both names should be linked to the person in some way. I assume that other software takes this into account somehow (I know that old-fashioned paper genealogy does).

I haven't built in a way to

lhridley's picture

I haven't built in a way to handle nicknames.

Suggestions on how to program that would be appreciated. My thoughts are to create a taxonomy term reference field, and use that to hold one or more nicknames for a person, but that would not be searchable through the name index.

Nickname could be added onto the custom name field as an additional data entry point.

If you need to handle more than one nickname per person, and entity reference might work better.

I'm open for suggestions on this one.

Thanks for your comments. I

lhridley's picture

Thanks for your comments.

I started out with the intention of defining custom entities for the content types, then realized that it would take a tremendous effort to make those entities available to the standard Drupal search, not to mention the fact that defining fieldable, exportable custom entities is alot of work and ongoing maintenance. So, I opted to utilize node based content types for some of the entities. I'm not sure what you mean by "reliance on additional modules to link them together" refers to.

For the input forms -- patience. Gotta have data structures in place before you can write custom forms, as the forms have to have somewhere to put their data, and the easiest way to create custom forms in Drupal is to leverage the Forms and Fields APIs and start with the canned Drupal node based edit forms. The entity references will wind up getting populated through some custom programming, so users won't necessarily have to make decisions on what they need to put in those entity reference fields.

I agree that the Event entity should have a "type" field, which I've got outlined as a taxonomy term reference where users can add event types as they see fit. I would like to use the date of birth and date of death of a person in creating the "title" field programmatically for each "Person" content instance to aid in identifying the correct person entity when you're using search, and having that as a separate event type tied to a unique entity reference field on the "Person" content type simply makes that process easier from a programmatic standpoint.

I'm not against GEDcom importing, but I personally don't use it, and like the forms before you can successfully write a GEDcom parsing routine you have to have somewhere to put the GEDcom data when you get it parsed, so the data structures have to be there first.

You don't need dual references between Person and Family in order to retrieve the "Family" tied to a person. A "Person" record belongs to one or more "Family" records, and while a "Family" record can't really exist without a "Person' record, a "Person" record can exist without a "Family" record. Views can work perfectly well to build any relationships using an entity reference on one content type to pull records from another content type, and from a programmatic standpoint having circular dependencies between content types is not considered a best practice.

On the "middle" name, I'm on the fence about separating given and middle names, and understand that, although it is an exception rather than the rule" people may have three or four given names. Again, this was more to make building name indices easier. I have no problem combining the "given" and "middle" name fields to just have one field that holds all names except the surname.

On importing...

k_and_j's picture

I understand that this is putting the cart before the horse with respect to the data structures, but I just want to chime in that GEDcom importing will be key for my family. Exporting would be fantastic. I am the underqualified webmaster, my uncle is the current amateur genealogist. He has a GEDcom file, which will be our starting point. The family is spread out geographically, so I think we are hoping that he can get the GEDcom file online, people can make additions/corrections, and he can periodically download it to update his local copy. Maybe this is not forward-thinking enough, but as we are both amateurs, it's the best path for us at this time.

(Still working my way through the thread...and also will try to go over the proposed data structures with said uncle so we can try to give more constructive feedback. This is awesome that you are doing this!)

Hurdles and Hoops

old_dog's picture

Thanks for the reminder...
The difficulty in getting entities included in searches was one of several serious 'gotchas' that have left me discouraged and looking elsewhere.
There are so many hurdles to get over and hoops to jump through in order to accomplish anything with Drupal -- and generally requires a plethora of additional modules, which need to be constantly monitored for compatibility - take a gander at the issue queue for jQuery Update module. Of course the need for such a module is an issue in itself.

"I'm not sure what you mean by "reliance on additional modules to link them together" refers to." Referring to the Entity Reference module or, as others suggest, the Relation module.

But, don't let me put you off -- I'm a rank amateur at this interwebby thing.

Am I the only person interrested in your proposal??

I'm also interested

mike_san's picture

I'm taking great interest in this thread. I have little to add and have resisted adding any comments until now!

One suggestion perhaps is not to try and reinvent the wheel. There are dozens of php-based genealogy web applications, many of them free. Perhaps someone with more expertise than I should install a couple of them to see how they handle the data fields and relationships.

Person name

With regard to name: I have used the "title" node element and used it for the full name, all known elements and appended year of birth and death to make identification of it easier. Many families are fond of using the same 1st and 2nd names repeatedly and this leads to duplicates.

James Charles Smith (1945 - 2003)
James C Smith (1945 - 2003)
Unknown Smith ( - 2003)
James Charles Smith (2003 - *)

Possible identical url aliases

Where the dates of birth and death are both unknown in identically named individuals, the titles and hence url aliases could be identical. In instances like this the Pathauto module will automatically append "-0" to the url. To prevent this happening Pathauto can be configured to include "[node:nid]" somewhere in the url alias.

http://myfamilyhistorysite.com/person/1123/james-charles-smith-1945-2003

Updating the name (as in, for example, discovering the year of birth) will of course change the url alias, whilst not a problem for internal links, external links will break. For external links I avoid the alias altogether

"http://myfamilyhistorysite.com/node/1123"

SEO implications of the node title

Whilst SEO is probably not uppermost in the mind of family historians, there may be some importance to optimising SEO. I'm definitely not an expert in this.

Pedigree Charts

This to me is a major shortcoming of my site and I am very interested in how the charts are built. Sneaking a peek at the code in other php-based genealogy applications may reveal a clue or two.

Anyway that's my tu'ppence worth.

Mike Sandes

MikeThanks for chiming in.

lhridley's picture

Mike

Thanks for chiming in. Glad to see your participation.

My primary reason for posting the data chart was to solicit feedback on the data, looking for holes in my data structures -- am I missing or overlooking key pieces of information needed to compile accurate information on a family tree. Without good data, everything else is impossible to construct effectively. I don't want to get 6 months into this project only to find I have to go back to square one because critical data points were overlooked or omitted.

Eventually, I plan to put up a dev site that has data structures, modules, forms, views, etc. when enough information has been assimilated and constructed that can be used by this group to review and provide input, as well as contribute to the development of this module(s) / package / distribution.

Other software

I have looked at (installed, played with or actually used at some point) several genealogy based website software applications and websites, the way they structure data, and the way they collect data through the user interface, including but not limited to:

WeRelate
phpgedview
TNG
WikiTree

as well as some desktop applications like:

Legacy Family Tree
MacFamilyTree

Some of the databases could be examined, and some could not so review was limited to what was available through the UI.

Data Structures

Drupal database layout is fairly unique, and incorporating data from a third party software into a Drupal site is fairly labor intensive, both to write and maintain, so I fairly quickly ruled out merging a third party application with a drupal website. My goal is to have a website where family members can not only visit and view the family tree information that has been assimilated, but can also participate in researching and adding information to the family tree.

The data chart I created and attached to this thread is an amalgamation of data structures I gleaned from all of the sources I reviewed, pulling what I thought was the best of all worlds into this data chart. The one area I pretty much built from scratch, which based on other websites I've seen is of little or no interest to some, but is of great interest to me is the sources and source citations. None of the software did a good job providing the ability to accurately document your sources and attach them to facts in your family tree, so I used Evidence! Citation and Analysis for the Family Historian by Elizabeth Shown Mills for my guide there. The challenge is coming up with a data structure that is flexible enough to accurately document a wide variety of source data and store those sources in a structured data format.

Person Name

I'm well aware of the issue with duplicate records as far as Person Name goes; I have several names that show repeatedly in my family tree as well. What the data structure chart does not show are some indexing tables that I'm considering building, that will create an index of individuals using name elements, and assign an index number to a persons' record based on some combination of given and surname to provide a level of uniqueness, primarily because I don't have those solidified yet. WeRelate does this with the first name and last name to accomplish a couple of different things:

  1. Unique identifier for a person using their name
  2. Unique URL for each person's page based on their name

(1) addressed minimizing duplicates, while (2) addressed both SEO friendliness and permalink issues. Most other family tree software I looked at uses some sort of indexing number to minimize duplicates as well.

The problem with both of these is: what do you do with the URL for a person's page when you find that their last name was incorrect, and therefore your URL schema generates a different URL for them. This both affects SEO and breaks external links as you mentioned. Drupal standard node URLs (http://www.example.com/node/123) are absolutely the most SEO unfriendly URLs around, which is why most folks use pathauto to generate URLs for drupal sites to begin with. I haven't tackled this issue yet because I'm starting from the ground up -- data first. But, page URLs are on my radar screen.

Pedigree Charts

Again, haven't tackled this one because before you can build a pedigree chart, you have to have data to use to create it. I would like pedigree charts on my site as well, so this is something I've got on my radar screen.

GEDcom files

Once again, not a first step because the data has to go somewhere when you import it so that it can be used, which is ultimately....tables in the database. Eventually I would like to have GEDcom data imports, but want some way to manage merging that information, which is frequently of suspect quality, into existing family tree information without compromising the integrity of what may be carefully researched and documented data.

webtrees and citations

k_and_j's picture

It looks like webtrees does have a way to include citations:
http://wiki.webtrees.net/en/Using_Sources,_Citations,_and_Repositories

It is also open source, so maybe you can see the data structures?

Multimedia linked to citation

k_and_j's picture

Looking at the wiki link above, there is something webtrees allows that looks like it may not be in your data structures:
"Multimedia object: You can for example add a scan of a page in a parish register or some other source. This is not only a good way to make your site varied and interesting; it is also a time saver if you have to revisit the source later, and a safeguard should the web page you've taken your scan from be taken down."

So the Document/files entity should also be accessible to the Source Citation structure. (not sure if I'm using the correct jargon, here).

I split multimedia into

lhridley's picture

I split multimedia into "photos" and "documents", so I think we're covered there.

A source citation can be placed on a document or a photo (both have source citations entity reference fields on them) so a source citation(s) can be created for a document or image.

Webtrees is a fork of

lhridley's picture

Webtrees is a fork of phpGedView, which I used in building the data structures suggested here

Gramps

GhoMo's picture

Hi,

I must admit that I haven't looked into your Data Structure, but I was wondering if it would be possible to bring Gramps (https://gramps-project.org/) on Drupal.

I already have a Gramps database, but my family wishes to have a site with individual logins. On the Gramps mailing list, someone recommended to combine the websites generated from Gramps with a CMS like Drupal.

So, instead of recreating a genealogy site on Drupal from scratch, it could be interesting to build upon Gramps, which is open source?

That's not a task I'm willing

lhridley's picture

That's not a task I'm willing to take on. If someone else on the list wants to take that as a project, please volunteer.

Gramps is written in Python, a language with which I'm not familiar. It is not designed to be "collaborative" software -- it is single user only. I'm not seeing the benefit of building on it -- it would actually be less work, IMO, to build from scratch rather than attempting to integrate the two.

Gramps data model — just as an inspiration

GhoMo's picture

Hi,

Thank you for your quick reply. I completely understand your point of view from a programmer's perspective.

Nevertheless, maybe you want to have a look at their data model at https://www.gramps-project.org/wiki/index.php?title=Using_database_API, just as a source of inspiration. Maybe you want to try the Application too, to see the data model "at work".

For example, I like Gramps' flexibility in representing complex family relationships by adding a type to the relationship instead of having a given list (marriage, unmarried, divorce…), or simply "unknown". That's more flexible than creating a list of foreign keys to specialized event types. There are other aspects where Gramps helps a genealogist to enter limited information in the beginning an to be more precise when he advances in his research.

Gramps allows for more complex name structures and several names per person. For example, you can include Nicknames (very popular in certain cultures). More importantly, you can be more precise about married names: Spouses who keep their maiden names, hyphenated family names, spouses who go back to their maiden name after a divorce etc. can all be represented correctly.

HTH

Clarification on notation

k_and_j's picture

What does the (M) in the attachment mean?

(M) means multiple values can

lhridley's picture

(M) means multiple values can be stored

related drupal modules?

fndtn357's picture

Does Biblio have any value to this project? It is built to be used as a source and citation type of module. Maybe Cite can be updated to Drupal 7 and have some value.

I could be off-base but it seemed related.

Living genealogy

Bokkie's picture

I see no obvious oversights in the data structure, but would like to know:

Is there space in the data structure to link/base an individual to/on a user of the website?
This way the user could keep his/her own genealogical record.

Short Answer: Yes.I have

lhridley's picture

Short Answer: Yes.

I have used the "node" as the base data structure for most of the content types on my chart, and I have assumed that revisions to information will be tracked. While revisions are optional, I am assuming tracking revisions is something that is desirable because:
* it lets you see who changed a data record, when it was changed, and what specifically changed on the underlying record;
* tracking revisions gives you the capability to "roll back" a revision (similar to the way you can "roll back" changes on Wikipedia) to a previous state in the event that someone screws up the data record.

By default, on "node" based content types, Drupal stores both the user id of the user that originally created the content record along with a timestamp of when the record was created, and the user id of the person that made the latest change to the content record along with a timestamp of when the change was made. Drupal also tracks changes by revision, so if you have three people that edit a record in sequence, you can specifically see who created the original record and when, and what change was made each time the record was edited and when. If you are using a custom content type this logic has to be programmed.

Organic Groups could potentially be used to track multiple genealogical records, and allow a person (who would be the "owner" of the group and as such could "invite" others to collaborate with them, or they could simply be a group of one) to set up their own permissions structure to limit access to their data records.

There are a number of challenges that using this approach presents, that would necessitate changes to the data structure that I have proposed. I am not opposed to making those changes, and have in fact been contemplating those as I have studies my proposed data structures and have been pseudocoding the implementation of the business logic to support editing the data through a user interface, including validation rules and forms presentation to the user in a more user friendly manner than the "out of the box" drupal forms.

Great start, here are a few thoughts

mhhelle's picture

I am a historian with a little different goal—I’m looking at building databases of people from my small town. So my use case is more a pile of small twigs than a full family tree. I’m gathering data from cemetery listings, phone books, school yearbooks, obituaries, land plat books, etc.

I have been thinking about building a “historical person” object and related entities for a while but haven’t really built anything yet. I keep getting bogged down in thinking about node versus entity, fields versus custom database tables, relation module versus entity references, and how to keep track of source data. My latest thoughts have been similar to what you propose—using nodes with fields and entity references.

Here are a bunch of little nitpicks from my perspective. And a bunch of problems I have thought about but have failed to come up with a good solution. I’m hoping someone smarter than me can figure them out. But I want to preface them saying that I think it is much more important to get something built than it is to get it perfect from the beginning. Thanks for taking the initiative!

  • In looking at cemetery records, there are always lots of things like “baby girl Smith” or “infant Smith”. I was thinking of adding a field to the Person class, something like “unnamed_text” that would hold this information instead of putting the given name as “baby girl” or “infant”.

  • For the “Place” event I was thinking about having one smaller level of granularity. Instead of just “City, County, State, Country” you could have things like “Cemetery XYZ, City, County, State, Country” or “Jim Smith Home Farm, City, County, State, Country”. I also thought about having GPS coordinates or some non-changing ID for places since boundaries could change.

  • Something about having both “Date from” and “Date to” in the event doesn’t feel quite right to me. But I guess it makes it more flexible for user-defined event types. I think there should be somewhere in the definition of event types if an “date to” is expected or not so you can differentiate between events that have no end date versus events that may have an end date but it is unknown or hasn’t happened yet.

  • I like the “genealogical date” field. Was thinking of doing something similar but not quite as elegant. How are you going to automatically translate the partial dates to indexable dates? For example, will “Abt 1900” index as “Jan 1, 1900”? It would be nice if common translations were automatically converted to indexable dates for consistency. I was thinking about maybe adding a flag to the date to say if it is an exact translation. Not sure how it would be used yet but it seems like valuable information to lose if you don’t track it. So your “Mar 2014” original date would translate to maybe “Mar 1, 2014” with exact_flag = false. Or better yet maybe a code that describes the granularity—“Mar 2014” would have “month” granularity, “early 2014” would have “half year”, “2014” would have “year”, “2010s” would have “multi-year”, etc.

I have a few more thoughts in more detail on names and QA fields, will add those as separate comments when I get a chance to jot them down.

Top Level Requirements

bradp's picture

As I reviewed the pdf, I found myself asking myself whether the proposed methods would meet a few things I am looking for in a genealogy CMS. Maybe it would be better to start with a higher level requirements document and discuss that first. Then, as coding methods are considered, comments can be made relative to a set of top level requirements. It probably should be a new post, perhaps in a table, but I'll start here with the things I think are necessary features.

1) Person based comments.
2) Person based subscriptions. (follow). (Any information or field that changes should trigger a notification on a person basis).
3) Person based information additions - such as links to stories, articles, news clips, biographies, journals. Collaborative editing of new articles, biographies, etc.
4) GEDCOM import (I don't see GEDCOM EXPORT as essential, as long as notifications of changes are complete and reliable, so that an external database could be kept up to date if desired).
5) Citations.
6) Photo additions to persons.
7) Role based editing and permissions ( I realize this is generally built into almost anything we can imagine on drupal, but why not write it down in the list of essentials). Admin, editor, commenter, reviewer.
8) Graphical tree.
9) Date export considerations (PDF Book output would be ideal, but maybe not practical. At least, if a coding action is taken that makes this impractical, we can be aware.)
10) Others?

Top Level Requirements

DowneTown's picture

I agree with bradp's list but would like to add a few thoughts.

I know next to nothing about Drupal, so do not know whether the following would help:

On my own amateurish website(http://www.downetown.org.uk/index/tips#), I have four types of record: people, photos, documents and locations.

Taking 'people' as an example, all people can be listed, filtered and sorted. You can also click on a record to view details of the person. That is just routine stuff. However, every person record also shows links to every document, photo and location associated with that person and a click takes you to the associated record.

If you clicked on a document link, that would show you the detail of the document plus links to all people, photos and locations associated with the document.

The same principle applies to photo links and location links. The only special feature of the person record is that you can also click on parents, children and siblings (not spouses/partners, yet) to go to their records.

These are just my personal preferences but I find they help to get a more inclusive view of the people in the database.

Great first stab!

AldenC's picture

Thanks for all your work to get the ball rolling.

Sorry I haven't been contributing to this in the past three months...had to get a daughter married while keeping this pesky full time job. But I have my life back now.

I have briefly looked at your data definition/structures and would like to comment. Unless I missed something I did not see the definition of the entity "Notes". Also I would like to add "Repository" as an entity reference in "Photos/Images". Thought here is to provide information on where the original is, or if it is a picture of Great-Grandpa's shaving kit...who has it?

My vision is for this site to be used by an extended family to share photos, memorabilia, anecdotes, etc. It would be organized as a typical family tree site, but would be more community (family in this case) oriented than most genealogy sites that are out there. For this reason I really agree with Bokkie that there should be a user orientation with the "Person" and a very transparent display of the contributor (user) of every record creation and revision.

Perhaps then "Person" needs a user field? And perhaps a picture field?

Only other comment is in the "Family" definition. I am not sure if you were going to be more flexible in the Male and Female Partner definitions. My living extended family is getting a bit more complicated than traditional forms.

Thanks again for getting this rolling and taking the time to answer so many posts. I look forward to when you can open a sandbox on this and we can start playing to see what happens. Count me in to help, just let me know where you want me to focus.

Overall Goal(s)?

robertrackl's picture

Reviewing the document GenealogyDataStructure.pdf I find that it contains places for all the data I am interested in in a genealogy web site. What is the overall plan or goal? A genealogy module perhaps? I do have some software experience (mostly scientific since 1965, only little in terms of website building) and would be willing to learn more and contribute. I see that the last post was September 2014; now it's May 2015 - I hope interest has not waned??

r4

Curious where this left off.

Spechal's picture

Curious where this left off. I recently started doing Drupal module development and have 13 years of PHP development experience. I would be interested in seeing a Genealogy module in Drupal 8.

There is still interest, but not much action

k_and_j's picture

I hate to leave a comment like this hanging without a reply. What you see on this thread is what you get. A lot of interest and a little bit of groundwork and user surveying.

I am not qualified to code anything to make this happen, but I am interested in seeing this module get developed. I have dabbled in programming (no PHP) and am a Drupal admin for a personal/family website. I would be willing to work on this in some sort of facilitator role, if that would be helpful.

I've built a site,

JakeRogers's picture

I've built a site, smithancestry.org with drupal 7 and have imported (individuals only) from my external gedcom format. It was a bit of trial and error, but I finally got it, thanks to the "Feeds" module. Learnings were that the Individuals import went fairly smooth. I STRONGLY suggest anyone to study closely the gedcom format first, especially if they plan on exports later from their site. e.g. I initially set mine up with First, Middle and Last names but with gedcom, what you get is Given Name and Last name. Thus I later had to create a "Join" field to combine my first and mid names for export.
Families format was nearly indecipherable (gedcom format) and I decided it was easier to create my "Families" manually. Since I'd imported all individuals, it was just a matter of selecting husband, wife and children; then manually entering date and place of marriage.
It remains a work in progress, but if interested, register as a guest and look around. You can PM me if you have any questions or suggestions.

waiting...

old_dog's picture

I will take a look once you approve my registration.
In the meantime, take a look at my sandbox module: http://drupal.org/sandbox/old_dog/1830800.
It will import individuals and families (ignores the rest) from a gedcom file. The module creates its own schema and uses entities rather than nodes. Some basic views are included plus a pedigree chart.

My thoughts on the proposed structures

skybow's picture

Not sure, if this topic is still of interest, but I'm in the process of creating a family website whose main objective is to provide an intra family community sort of thing. Since one family member does lots of genealogy research, there is already a database containing some 1300-1400 people that exists as a GEDCOM file. So it was obvious to (1st) include this data and (2nd) having some means to import the GEDCOM file.
Actually I started 2 year ago with setting up a D7 based site using custom node types adding fields using views and so on. The project stalled due to time constraints amongst other reasons so a few weeks ago I started over again, this time using D8.
I want to note, that integrating the GEDCOM data is only part of what I want to achieve on this site. I am neither a genealogy researcher of any kind nor can I afford to spend the time to develop a full blown genealogy research kind of module. In short: I'm willing to cut out some of the data that a GEDCOM file may transport.
I started with some coding (finally digging into Drupal module dev after only using it for a couple of years now) and was about to set up a Drupal sandbox project as a repository for sharing what I've come up with so far, when I revisited this group and found this proposal for data structures using Drupal.

This data structure proposal looks as if it is modelled closely on what is specified in the GEDCOM 5.5.1 file format, which I think is rather good since GEDCOM is the de-facto standard of exchange. This would also mean that exporting data from such a structure to a GEDCOM file would be rather easy.

However what puzzles me is the fact that major "events" as 'birth', 'death' and so on are modelled as entity references to some common event entity/node type structure. I'm not sure if I really like this idea for various reasons: Birth, death, baptism, burial are events that may not exist, but if they do, exist only once. One might as well add the corresponding fields to the Person record and just leave them empty if the data does not exist.
Ok, all events share common structures so one motivation of putting them into an event entity is to not have to repeat similar definitions. I can even think of sharing visuals for all these events.

Although this looks tempting it comes at the cost of having to deal with lots of references which I find adds unnecessary complexity. Also these events can't live without their parent (= person) records at all. Next: Events as entities / node types would come with some infrastructure fields of their own like ID, Author, Title, UUID and so on. But these fields are not needed at all. It just doesn't make sense for me feels like overkill.
An approach for reusing the common structures of all these events is adding some kind of "Event" field compound, similar to what is done in the address module, however...

...in the code I'm about to place in a sandbox project I do provide custom entities for 'person' and 'familiy' (so far) by code. To add common event structures for the 1:1 events like birth and so on, is like calling some function with some key like 'birt' and let the function add all the fields.

There is still room for some event entity type especially when there is need for multiple events (1:n) with rather unspecified type but for 1:1 events I prefer inline.

Keep unique events at entities

ebrittwebb's picture

I suggest you keep unique events, such as birth, death, burial, etc., as entities in the events table, because beyond just a date, there are many other relevant attributes, such as who authored the event, who has edited it, where it took place, comments about the event and so on. Also, this allows you to represent a list of events related to the individual's life which includes those "unique" events.

I've gotten very interested in https://www.webtrees.net as a genealogy database system. It's a fork off of http://phpgedview.sourceforge.net which seems to be the most functional and actively maintained. You might want to explore the WebTrees database structure for one of the most contemporary designs and insights.

Erik Britt-Webb
drupal@ebrittwebb.com

GEDCOM sandbox module for D8

skybow's picture

As promised, I've put the code that I've written so far in a sandbox module called gedcom for everybody who's interested.

Note that at the time of writing this is merely a proof of concept type of thing -- which of course satisfies some of my personal goals -- and should not be used in a real project (yet) as I may change some of the underlying architecture.
Also note: since I'm german based, the field names are mostly german. I'll fix that at some point...

GEDCOM sandbox module for D8: Update #1

skybow's picture

I pushed the latest changes to my project, so anybody interested may take a look.
Contrary to my first post in this thread, I realised after all that using an event entity type of some sort is the only way to manage the huge number of different event types. Due to the similarity of GEDCOM Events and GEDCOM Facts/Attributes, I store both as an entity of type GCAttr using bundles to distinguish between the types. The bundle names correspond the the Event/Fact type. Of course there are also generic EVEN and FACT records.
See gedcom sandbox module for more info...

GEDCOM Sandbox Module code missing

ebrittwebb's picture

Hi Skybow,

The source code for your GEDCOM Sandbox Module is missing. I get a 404 error when I click on the link to browse the code. Can you restore the source code?

Thanks
Erik

Erik Britt-Webb
drupal@ebrittwebb.com

The Git links got messed up...

skybow's picture

...however, the source code is still available. Use the link below:

https://git.drupalcode.org/sandbox/skybow-2873900

best regards,
Tilman

Status

pagemaker's picture

Lisa,
What is the progression on your genealogy project?

We need to add support for more media types

asiby's picture

I propose that we add support for storing audio and video clips and also URLs... which ever is available.

Genealogy

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week