Re: Usecase for Property Graphs

If you make friend connections and emails into nodes you can hang properties on them.
But, I think it's simpler to just allow properties on arcs.

The second question is "are such queries commercially important?"
All the best, Ashok
On 10/27/2013 3:34 PM, Andy Seaborne wrote:
> Ashok,
>
> This is an interesting area to to look at for property graphs.
>
> In the "Graph Databases" book, (ch3, page 50 onwards in the PDF version I have), there's a discussion on modelling and the example seems strongly analogous to your description.
>
> The example there is people+emails sent between them.  The first modelling shown has people as nodes, and the act of sending an email as the arcs.  They modify that in the second example to suggest that making the email sent be a a node is better.
>
> This seems analogous to your examples - make the friend relationship a node or the enrollment as a node.  When you want to augment the data, for example, add grade when the exam is done to the enrollment connection, the link structure does not change.
>
> In JSON-LD / generalized RDF, a similar effect is achieved by blank nodes for properties (blank nodes are being used to avoid the need to generate a new URI for every link) then attaching triples to the blank node (attributes; owl datatype properties).
>
> Gregg's example [1] uses this to put give weights to the "created" and "knows" links ("_:created": and "_:knows respectively).
>
> The n-ary predicates work is also related [2]
>
>     Andy
>
> [1]
> http://lists.w3.org/Archives/Public/semantic-web/2013Aug/0026.html
>
> [2]
> http://www.w3.org/TR/swbp-n-aryRelations/
>
> On 25/10/13 14:33, Ashok Malhotra wrote:
>> Property Graphs differ from other data models such as RDF and
>> Entity-Relationship (E-R)
>> in that they support properties on the arcs (relationships). This makes
>> it easy to represent
>> and query some kinds of information.  Here are two examples:
>>
>> EXAMPLE 1:
>> Consider a case where the nodes represent people. Arcs represent
>> "friend" relationships between people. If the arcs have a property
>> such as "started" that indicates when the friend relationship was
>> instantiated, then it is easy to process queries such as: "Show all
>> people that have been friends for more than 2 years".
>>
>> Facebook graph queries have a feature that lets you time-bound queries.
>> I don't know if they use Property Graphs but time properties on arcs would
>> certainly facilitate some of these queries.
>>
>> EXAMPLE 2:
>>
>> Consider a situation where the nodes are students and courses.
>> Students can enroll in many courses and each course can have many
>> students. A student's enrollment in a course would be represented by
>> an arc between the student and the course. The student's grade would
>> then be a property of the arc. (There may be other arc properties
>> such as the student's attendance). Having the grade as a property of
>> the arc makes it simple to ask such queries as "Which students had
>> all A's in all courses?"
>>
>> Does this make sense? Clearly such information can be represented
>> and queried using other data models but, I claim, not so naturally
>> and so efficiently.
>
> On efficency - do you mean from the point of view of implementation or use by the application writer (they often pull in different directions!).
>
>> A claim that has been made is that the data we get from Social Media
>> fits naturally into
>> a Property Graph framework.  I don't know if this is true.
>
>     Andy
>
>

Received on Sunday, 27 October 2013 21:50:10 UTC