1- If your relationship is simple (meaning, the relationship itself doesn't require additional attributes), I would chose one direction to define properties inside pages and generate the reverse properties using queries inside the page template (assuming you are using forms).

For example: A philosopher's page would have a list of :

[[Has influenced::.....]]

and a single query to build the reverse [[Was influenced by:: .... ]]

(you can find an explanation about how to build reverse properties in the SMW documentation).

2- If your relationship is complex (meaning, if you want to track also how the influence happened (books, direct teachings, mentorship, etc) ), I would create a special category for that purpose, Influences, where pages have a property : From, To, How, When, etc

Then in your template about philosophers, you would have two queries :

One to build a list of who influenced this guy, and one about who he influenced.

This is similar to having a cross reference table in a relational model.

In both cases, the type of properties is Page, so that you can easily browse the network of influences with queries.

I hope this is not too short. I can elaborate if it is.

- Laurent

On Sep 20, 2009, at 8:14 PM, Eric T. Blue wrote:

Hi,

I'm been using SMW as a knowledge management tool for a number of things, and have recently started looking into using it as a research aid for historical figures, philosophers, writers, etc. Up until now, I've been storing fairly simple properties for most types of people (e.g. Philosopher has a BirthDate, BirthPlace, SchoolorTradition, etc.). However, I want to take it a step further and model relationships between people. In particular, I want to model who influenced that person and in turn who they influenced. This type of modeling seems pretty common at DBPedia and Freebase. Ultimately, I want to browse this data in a faceted viewer like Exhibit or create some visualation engine to navigate (for example, Genaology of Influence - http://goosebumps4all.net/goi/).

Are there any best practices for modeling this type of directional/many-many relationship? I was considering taking the following approach, but am not sure if it's practical or technically feasible:

1) Create an infobox template for type the type of person/category (say Philosopher) and create a property of Influences

![[Property:Influences |Influences]]|[[Influences::{{{Influences}}}]]Questions: Should this Property type be a String? And, how do you define multiple values?

2) Create a property for who the Philosopher influenced

If I add a new person, I obviously don't want to have to be creating static property values all over the place. So, I thought this could be dynamically set.

Questions: This does not appear to work at all.. in fact, it is causing segfaults :) Should I be able to dynamically set a property with an inline query?

Assuming my serious problem is solved by syntax changes, does this overall approach seem viable? Or, am I going about this the hard way?

------------------------------------------------------------------------------Come build with us! The BlackBerry&reg; Developer Conference in SF, CAis the only developer event you need to attend this year. Jumpstart yourdeveloping skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;http://p.sf.net/sfu/devconf_______________________________________________Semediawiki-user mailing listSemediawiki-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/semediawiki-user