Andreas Kollegger wrote:
> Oh, and here's the graph...
>
>
>
> On Tue, Sep 7, 2010 at 10:59 AM, Andreas Kollegger <
> [email protected]> wrote:
>
>   
>> Hey Stephane,
>>
>> It occurs to me that a general strategy for improving traversal speeds is
>> to add indexing nodes that help reduce the number of possible paths to
>> check. For instance, you could add "week of the year" nodes which group bank
>> receipts and statements into a time-oriented groups. In the attached graph,
>> I've taken your last example and added a "date reference" sub-reference
>> node, and then wk1 and wk2 "week of the year" nodes to group the occurrences
>> of receipts and statements.
>>
>> This approach can be elaborated to greatly reduce the number of edges to
>> iterate over and nodes to check. Think of your trees as tries (
>> http://en.wikipedia.org/wiki/Trie).
>>
>> Best,
>> Andreas
>>
>> On Mon, Sep 6, 2010 at 8:45 PM, Stephane Urdy <
>> [email protected]> wrote:
>>
>>     
>>> Peter Neubauer wrote:
>>>       
>>>> Stephane,
>>>> what kind of property or pattern are you matching on to establish the
>>>> relationship between BR and BS?
>>>>
>>>> Cheers,
>>>>
>>>> /peter neubauer
>>>>
>>>> COO and Sales, Neo Technology
>>>>
>>>> GTalk:      neubauer.peter
>>>> Skype       peter.neubauer
>>>> Phone       +46 704 106975
>>>> LinkedIn   http://www.linkedin.com/in/neubauer
>>>> Twitter      http://twitter.com/peterneubauer
>>>>
>>>> http://www.neo4j.org               - Your high performance graph
>>>>         
>>> database.
>>>       
>>>> http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.
>>>>
>>>>
>>>>
>>>> On Wed, Sep 1, 2010 at 8:19 PM, Stephane Urdy
>>>> <[email protected]> wrote:
>>>>
>>>>         
>>>>> Hi,
>>>>>
>>>>> I was searching on forums how to match nodes with other nodes when I
>>>>>           
>>> saw
>>>       
>>>>> a message where you mentioned patterns.
>>>>>
>>>>> I am very new to the world of graph databases and if you have a little
>>>>> time I would be glad if you could answer this question.
>>>>>
>>>>> I would like to match receits nodes with bank accounts statement entry
>>>>> nodes.
>>>>> in the 2 examples, br2 [bank receit number2] matches bs1 [bank
>>>>>           
>>> statement
>>>       
>>>>> entry number1]
>>>>>
>>>>> What would be the most efficient model to match the nodes ?
>>>>> example1.png shows 2 trees with one level
>>>>> example2.png shows 2 lists where each entry has a next entry [here my
>>>>> undestanding that we exploit the tranversal speed]
>>>>>
>>>>> The basic idea is to take the first receit node and compare it to each
>>>>> bank receit entry node, then add the relationship between the 2
>>>>>           
>>> matching
>>>       
>>>>> nodes [br--matches-->bs]
>>>>>
>>>>> I could possibly add an index in the equation to speed things up, but
>>>>> basically my goal is to find the most efficient ways to doing it.
>>>>>
>>>>> Any pointers would be appreciated, patterns included  :) .
>>>>>
>>>>> Kind regards,
>>>>>
>>>>> Stephane
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>           
>>> ------------------------------------------------------------------------
>>>       
>>>>>
>>>>>           
>>> ------------------------------------------------------------------------
>>>       
>>>>> _______________________________________________
>>>>> Neo4j mailing list
>>>>> [email protected]
>>>>> https://lists.neo4j.org/mailman/listinfo/user
>>>>>
>>>>>
>>>>>
>>>>>           
>>>> _______________________________________________
>>>> Neo4j mailing list
>>>> [email protected]
>>>> https://lists.neo4j.org/mailman/listinfo/user
>>>> file:///home/stef/Desktop/example3.png
>>>>
>>>>
>>>>         
>>> Hi Peter,
>>>
>>> I will probably match br and bs entries with a few attributes common to
>>> both bs entries nodes and receits entries nodes:
>>>
>>> - the account name
>>> - the amount
>>> - Whether it is a debit or a credit
>>> - the date more or less n days
>>> - the type ex: direct debit,transfer,cash machine withdrawal,standing
>>> order, swift payment, bank credit ...
>>>
>>> I finally started to model using a tree structure with 3 reference nodes
>>> : one for the accounts, one for the bs entries and one for the receits
>>> entries.
>>>
>>> not so sure it is the most appropriate way to go for fast matching my
>>> entries.
>>> I added a visual in the attached file example3.png so you can have an
>>> idea once the model is populated with a small amount of entries/nodes.
>>>
>>> Any better idea are welcomed.
>>>
>>> Thank you for your support and expertise,
>>>
>>> Cheers,
>>>
>>> Stephane
>>>
>>> _______________________________________________
>>> Neo4j mailing list
>>> [email protected]
>>> https://lists.neo4j.org/mailman/listinfo/user
>>>
>>>
>>>       
>>
>> ------------------------------------------------------------------------
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Neo4j mailing list
>> [email protected]
>> https://lists.neo4j.org/mailman/listinfo/user
>>     
Hi Andreas,

It seems like a good approach, I will try this.
Many thanks for your input.

Kind regards,

Stephane
_______________________________________________
Neo4j mailing list
[email protected]
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to