I retired from personal blogging in July 2008.
But you can find me over at http://blog.xero.com.

Data model for Persons and Organisations
Posted by rod@drury.net.nz in Development at 10:29 pm on Friday, 11 April 2008

One of the enduring data modeling scenario’s that seems to come up for me every few years (even going back to the old Glazier days and the PerOrg debates Pat) is modeling the relationship between people and the organisations they belong to.

Seems simple when you start but you end up balancing a series of trade offs.

The most basic model is the vCard one. The organisation is not modeled. In Outlook there is a copy & paste new contact from same organisation feature which saves you retyping common organisation information on each contact - but the organisation is not modeled.

You would think that people and organisations is a simple structure.

But as you start to test the model you run into a few issues.

  1. Are you sending something to a person or the organisation they belong to?
  2. If someone changes organisation do you still want to track the person?
  3. How do you address a role within the organisation where the person is unknown?

 So you quickly get into a complex meta modeled structure like one below.

While you can now store the natural data relationships, the problem with this model is that UI to manage it quickly becomes complex.

I haven’t looked at this problem for a while but interested to hear how other people have modeled people and organisations.

Trackback uri |

Comments(14)

    Comment by Jim Donovan at 10:51 pm on 11 April 2008

    Rod
    As someone who’s transported my contact files across many organisations, it’s the real people with whom you have relationships at the contact/Outlook/VCard level. You interact with organisations at the username/password/account# level. They’re very different. Don’t confuse them. I’ve taken people relationships with me over time despite their employers, but never the other way round.




    Comment by Jim Donovan at 10:59 pm on 11 April 2008

    Sorry but a subsequent thought. I’ve also taken organisational relationships with me despite individual cockups; i.e. don’t throw away a great organisational relationship because of one idiot who’s dropped the ball.




    Comment by Robert O'Brien at 11:47 pm on 11 April 2008

    This is a perennial favourite, a data modelling exercise that often gets stuffed up IHMO. Martin Fowler’s Analysis Patterns of Party/Organisational data models are the best discussion of an approach I’ve used for years. Try this for starters http://martinfowler.com/apsupp/accbyNar.pdf (PDF). The data model is flexible but this doesn’t mean the UI needs to be complex - that is a IxD problem.




    Comment by Rod at 6:37 am on 12 April 2008

    Thanks Robert, that was the sort of thing I was looking for. Very similar to where I got to. Yeah I do agree that the UI is an ID problem. I suspect that you may store the data in this sort of structure but you put constraints in the UI.

    For example you might make a ‘Primary Contact’ relationship mandatory (in ContactRelationship) and mandate there is only one and must be one in the UI design.

    Also agree with Jim’s experience about dealing with real people. I remember now we used to say that in the old days too.

    Interesting that 20 years after the James Martin Information engineering heyday we don’t have vast libraries of debated data models on the Interweb.




    Comment by max at 9:18 am on 12 April 2008

    Looks strangely familiar…
    http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=ciq#download

    The normalised DB model for this type of thing looks dreadfully complex. I use several XML structures + an index for search. Works just fine coz I can plug in or change the structures as I need without too much impact.




    Comment by Pete at 9:24 am on 12 April 2008

    Microformats (like Jim) models the idea that time spent at an organisation with hcalendar + hcard, see hresume. Adding XFN wouldn’t be that much of a stretch.




    Comment by Martin at 10:38 am on 12 April 2008

    A bit of holy grail this one….

    Quite often the core business and legal processes talk about individuals and organizations as different entities, but often in CRM type processes you want to treat them all the same….

    One effective way is to have a skinny strong party entity with name and ID and then a seperate weak entity for organizations and contacts information.

    Addresses are then asscociated to the strong party entity, also any party relationships you want to use probably a generic relationship with a type.

    When building your system, you should then have an object for each type of party plus a generic entity that you can use for business processes that do not need to make the distinction between object types. The party entity should only have the core fields required for this screen, which typically ends up being Party Id, Name, Type….

    Also sometimes even though the same physical party is working at two or more organizations, you may have to two party records because their legal status is different.

    This then means you may need another “special” party relationship.

    There are many other corner cases that you may need to consider.

    The trick is keeping the complexity away from users…

    The hardest thing then is integrating your solution to other solutions that also have Party data.

    Martin Fowlers stuff is very good, and most of the big CRM vendors have volumes on this stuff. I have done quite a bit of handson work in the Customer Master space and I tell you everybody does it slightly differently at the moment which makes it real hard to cookie cut in systems integration.




    Comment by Simon Arnold at 5:08 pm on 12 April 2008

    At the risk of displaying my total ignorance of modern programming, and noting the usual caveats about only developing generic models because they have utility, it seems to me that the critical element in any generic model of the type being discussed is not the entities (people, organisations etc) but what I would term “the relationships of interest”.

    Recognising these as the critical element in the model allows a generic model to be built, because it is the relationships of interest that define the domain of interest.

    The model would need to recognise that some relationships of interest are direct (my mate), and some are indirect, and some indirect relationships (and attributes) are inherited (employee of customer) but others are specific (a friend of a friend). This and the possibility of multiple types of relationships with a single entity solves Jim’s problems.

    It is the structure of indirect relationships of interest that allow the generic modelling of organisations and individuals without too much added complication (and you can incorporate as much granularity as is required to define what goes on in organisations).

    Some complications arise for modelling and design around whether the model is single user-centric i.e. there is a unique person at the centre of the universe around whom all these relationships are defined, or whether the model needs to be rich enough to allow different users (perhaps sharing a special relationship) to have different views of a common database. However at least this approach makes this complication explicit and provides a way to deal with it.

    Anyway interested in any polite reactions, and I’m sure it must be there in the literature. However I suspect that thinking of a set of relationships as a key element in a model could be a bit counter-intuitive since the relationships are typically seen as what links elements (at least from my limited understanding).




    Comment by Falafulu Fisi at 5:56 pm on 12 April 2008

    Take a look at ontology Rod, because your problem looks similar to an ontology relationships, especially from the brief description in the following link:

    Ontologies and Knowledge Base

    I’ve never used ontology before , but I explored its use for a retail online application a few years back with Java Protege Ontology editor open source project. Complex relationships can be achieved via ontology.




    Comment by Falafulu Fisi at 8:09 pm on 13 April 2008

    The following paper might also be useful Rod. Section 3 covers ontology.

    Relating Structure and Dynamics in Organisation Models




    Comment by Graeme Young at 11:56 am on 16 April 2008

    I had to solve this exact problem recently while building http://www.wekaworx.co.nz

    The contacts (people or organisations) share the data model/entities and UI.

    I might actually get it finished soon.

    Cheers

    Graeme




    Comment by Robert Singers at 1:23 pm on 20 April 2008

    Rod,
    perhaps it would be useful if you clarified whether you are really musing about a personal issue with contact management or looking at it from an enterprise CRM level.

    I’ll have a bash at answering your three questions from a personal level

    “1. Are you sending something to a person or the organisation they belong to?”

    This is instance specific. If you’re leveraging a relationship then it is the person. Otherwise it is the organisation.

    “2. If someone changes organisation do you still want to track the person?”

    In Wellington definitely. It’s a small and tight marketplace. I’ll give you a concrete example: I’m having a Archive Manager performance issue and Quest support aren’t helping much. So I flick out a email to a bunch of DBAs around town and ask if anyone has an info might help. I get back a couple of responses pointing to me to a guy who has done lots of AM optimisation. Along with a vCard. I ring the guy and he gives me a few pointers and details of rates and availability if we want to formally engage.

    “3. How do you address a role within the organisation where the person is unknown?”

    Personally I have an entry for the main number and account relationship manager for the organisations I deal with. I can either ring the main number and ask for x, or contact the account manager and ask. Or if you’re talking about physical mail put a generic industry recognised title.

    (I get to stick a whole bunch of that sort of mail in my recycling bin every week.)

    The way I’ve solved the issue that I’m guessing that you and others might be having at the personal level is to use http://www.plaxo.com and http://www.linkedin.com. Linkedin tracks relationships and Plaxo contact details. I make extensive use of categories\tags on all my contacts, so I can do things like sort by DBAs quickly, or find someone you may have worked for a particular company in the past.

    Plaxo links with [my work] Outlook which in turn synchronises to my phone, and Plaxo also syncs with my Windows Live Mail which keeps any Windows Live or Outlook Express address books synced. Which in turn also synchs up my Windows Live Messenger.

    It would be lovely if I could explicitly explore relationships better on my phone, but hey searching the address book sort of works.

    While I do think that it is an Ontologocial problem at some levels, my response to it has been to create a Folksonomy (http://en.wikipedia.org/wiki/Folksonomy. I’ve spent a bit of time looking at things like micro-formats to see how they’d help, as well as technologies like wikis. As yet they’re not mature enough.

    You also run into some interesting challenges when you turn the problem around the other way. When you begin to look at systems such as the Govt. Logon Service, which is pseudo-anonymous and what that means with tracking the relationship from organisation to organisation, organisation to person, and organisation to role.

    PS If you wanted to run a session about it at your offices. I’m a sucker for a big white board and sausage rolls.




    Comment by Rod at 3:01 pm on 20 April 2008

    It’s for Enterprise CRM. What has been interesting to me is that even after all these years there appears to be little knowledge reuse around data models. Almost every application in this space needs to think about this.

    Open source of code and dev frameworks exist all over the place. This is one of the things we predicted would occur 15 years ago but hasn’t.

    Perhaps its because data modeling tools aren’t widely used, so a community has not evolved around them as they do with code.

    I was trying not to reinvent the wheel but we’ll just fall back to the process we are in.

    The best CASE tools I ever used was KnowledgeWares ADW and InfoModeler before it was acquired by Visio.




    Comment by Robert Singers at 9:58 pm on 21 April 2008

    People are inherently selfish. They don’t like sharing.

    The other problem is that the CRM market seems aimed at particular niches. Most of them for large companies. I’ve yet to see something that would work for Government without additional work.

    If you’re interested in modelling tools have a look at http://www.sparxsystems.com.au/ or talk to the guys at Catch http://www.catch.net.nz/