I echo this: Hannah's visits are a linked list of things she's done. Each visit is -[:TO]-> a place. To find Hannah's visit history just means traversing the list.
Jim On 26 Sep 2013, at 12:08, Michael Hunger <[email protected]> wrote: > I meant relationships between the visit event nodes to indicate the order. > > Am 26.09.2013 um 12:54 schrieb Fares Bady <[email protected]>: > >> do u mean that I should make the locations as nodes? I have already done >> this. but visit is a relations that maps roles to locations. >> >> I think I might add a new relationship between locations to show the order >> of the locations. For example, room1-[NEXT]-> room2, room2-[NEXT]->room3 >> >> Is this what you meant? >> >> Fares >> >> >> On Thu, Sep 26, 2013 at 11:39 AM, Michael Hunger >> <[email protected]> wrote: >> If you want to place more importance on the visits, make them nodes then you >> can also connect them "in order" of their appearance. >> >> See this datastructure for representing time and ordering: >> http://docs.neo4j.org/chunked/milestone/cypher-cookbook-path-tree.html >> >> Michael >> >> Am 26.09.2013 um 12:19 schrieb Fares Bady <[email protected]>: >> >>> I want to say that a user Hanna has been to room1 first then to room2 after >>> that she has been to room three >>> >>> CREATE (location1 { name:"room1" }),(location2 { name:"room2" }),(location3 >>> { name:"room3" }),(user1 { firstname:"Hanne",lastname:" Smith",userid:"123" >>> }), user1-[:VISITS { role: 'visitor' , cardreaderID:"R1",time:"0900 AM" >>> }]->location1, user1-[:VISITS { role: 'visitor' , >>> cardreaderID:"R2",time:"1000 AM" }]->location2, user1-[:VISITS { role: >>> 'visitor' , cardreaderID:"R3",time:"1100 AM" }]->location3 >>> >>> with the the above statement is just shows that the user Hanna has been to >>> room1, room2 and room three but not in sequence >>> >>> any idea how I can have this right? as you can see the time is different >>> when Hanna visited every room. >>> >>> Your help is highly appreciated >>> >>> Fares >>> >>> >>> On Thu, Sep 26, 2013 at 9:49 AM, Fares Bady <[email protected]> wrote: >>> Hi >>> >>> I just came across this issue when I was trying to write different cypher >>> queries. It seems that the relations are repeated twice. For example, the >>> relation has and the relation visits will appear twice in the table while >>> we have only one relation called has and another one called visits. >>> the example is here >>> >>> http://console.neo4j.org/r/oui03o >>> >>> >>> Regards >>> Farse >>> >>> >>> On Thu, Sep 26, 2013 at 9:13 AM, Michael Hunger >>> <[email protected]> wrote: >>> The properties on relationships are not shown in the visualizations right >>> now. >>> >>> This will probably change in the future. >>> >>> But you should be able to see the properties if you do cypher queries. >>> >>> Michael >>> >>> Am 26.09.2013 um 09:24 schrieb Fares Bady <[email protected]>: >>> >>>> hi >>>> >>>> Just a quick question >>>> when I tried to write the following query I face one issue: >>>> >>>> CREATE (user {userid: "123", firstname:"Hanne", lastname:" >>>> Smith"})-[:HAS]->(role {rolename: "visitor" }) -[:VISITS {cardreaderID: >>>> "R1", time: "0900 AM"}]->(location {name:"readingRoom"}) >>>> >>>> I can see the graph what I want three nodes which user hanna, the role >>>> visitior and the location reading room. I also see the two relationships >>>> has and visits, but I wonder why I can't see the property with the >>>> relation visits such as time and cardreaderID. >>>> >>>> Regards >>>> Farse >>>> >>>> >>>> On Wed, Sep 25, 2013 at 9:41 AM, Michael Hunger >>>> <[email protected]> wrote: >>>> Just make sure to create a graph-model-document (aka. graph gist out of >>>> that and put it up for the competition) :) >>>> Perhaps you can even win. >>>> >>>> http://neo4j.org/learn/graphgist_challenge >>>> Samples: >>>> https://github.com/neo4j-contrib/graphgist/wiki >>>> >>>> Michael >>>> >>>> Am 25.09.2013 um 10:39 schrieb Fares Bady <[email protected]>: >>>> >>>>> Dear Michael, >>>>> >>>>> Many thanks for your replies which really helped me. >>>>> >>>>> I will try to follow your comments and I am going to define the >>>>> relationship generally :VISITED with the properties: role, time, readerid. >>>>> >>>>> Once I have everything done I will make sure that I let you know about >>>>> the outcome the I get. and I will also come back to you if I face any >>>>> issue. >>>>> >>>>> Your help is highly appreciated >>>>> >>>>> Best regards >>>>> Fares >>>>> >>>>> >>>>> On Wed, Sep 25, 2013 at 8:43 AM, Michael Hunger >>>>> <[email protected]> wrote: >>>>> In general your users and locations (rooms) can be nodes. >>>>> >>>>> The relationship could be either generally :VISITED with the properties: >>>>> role, time, readerid. >>>>> >>>>> Or you have individual relationship-types for the different types of >>>>> visits. >>>>> >>>>> (user {id: 123, firstname:"Hanne",lastname:"Smith"})-[:VISITED >>>>> {role:"visitor", time: "0900 AM", readerid: "room1" })->(location >>>>> {name:"readingRoom"}) >>>>> >>>>> In 2.0 you can use a combination of MERGE and CREATE with Labels >>>>> >>>>> MERGE (user:USER {id: 123, firstname:"Hanne",lastname:"Smith"}), >>>>> (location:Location {name:"readingRoom"}) >>>>> CREATE (user)-[:VISITED {role:"visitor", time: "0900 AM", readerid: >>>>> "room1" })->(location) >>>>> >>>>> If your visit is a more important entity you can create a node for the >>>>> visit itself and link more information to it. Then you can also represent >>>>> the time, e.g. as time-tree: >>>>> http://docs.neo4j.org/chunked/stable/cypher-cookbook-path-tree.html >>>>> >>>>> In general for modeling check out this webinar: >>>>> http://watch.neo4j.org/video/73485354 >>>>> And the free graph databases ebook: http://graphdatabases.com >>>>> >>>>> HTH >>>>> >>>>> Michael >>>>> >>>>> Am 24.09.2013 um 13:23 schrieb Fares Bady <[email protected]>: >>>>> >>>>>> Hi, >>>>>> >>>>>> >>>>>> >>>>>> I am writing this email to ask you whether there is a good tutorial that >>>>>> I could follow in order to import data that represent log file for >>>>>> access control into neo4j. >>>>>> >>>>>> an example of the log file is attached to this email. >>>>>> >>>>>> the idea the have is UserID, Role and ReaderID should be represented as >>>>>> noods but I dont know how the time should be represented. Should I >>>>>> represent as a part of the relationship between users and roles and >>>>>> having the permission to access the rooms? >>>>>> >>>>>> Your help is highly appreciated. >>>>>> >>>>>> regards >>>>>> Fares >>>>>> >>>>>> -- >>>>>> You received this message because you are subscribed to the Google >>>>>> Groups "Neo4j" group. >>>>>> To unsubscribe from this group and stop receiving emails from it, send >>>>>> an email to [email protected]. >>>>>> >>>>>> For more options, visit https://groups.google.com/groups/opt_out. >>>>>> <log file.xls> >>>>> >>>>> >>>>> -- >>>>> You received this message because you are subscribed to a topic in the >>>>> Google Groups "Neo4j" group. >>>>> To unsubscribe from this topic, visit >>>>> https://groups.google.com/d/topic/neo4j/3-HzCIi2rO8/unsubscribe. >>>>> To unsubscribe from this group and all its topics, send an email to >>>>> [email protected]. >>>>> For more options, visit https://groups.google.com/groups/opt_out. >>>>> >>>>> >>>>> -- >>>>> You received this message because you are subscribed to the Google Groups >>>>> "Neo4j" group. >>>>> To unsubscribe from this group and stop receiving emails from it, send an >>>>> email to [email protected]. >>>>> For more options, visit https://groups.google.com/groups/opt_out. >>>> >>>> >>>> -- >>>> You received this message because you are subscribed to a topic in the >>>> Google Groups "Neo4j" group. >>>> To unsubscribe from this topic, visit >>>> https://groups.google.com/d/topic/neo4j/3-HzCIi2rO8/unsubscribe. >>>> To unsubscribe from this group and all its topics, send an email to >>>> [email protected]. >>>> For more options, visit https://groups.google.com/groups/opt_out. >>>> >>>> >>>> -- >>>> You received this message because you are subscribed to the Google Groups >>>> "Neo4j" group. >>>> To unsubscribe from this group and stop receiving emails from it, send an >>>> email to [email protected]. >>>> For more options, visit https://groups.google.com/groups/opt_out. >>> >>> >>> -- >>> You received this message because you are subscribed to a topic in the >>> Google Groups "Neo4j" group. >>> To unsubscribe from this topic, visit >>> https://groups.google.com/d/topic/neo4j/3-HzCIi2rO8/unsubscribe. >>> To unsubscribe from this group and all its topics, send an email to >>> [email protected]. >>> For more options, visit https://groups.google.com/groups/opt_out. >>> >>> >>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "Neo4j" group. >>> To unsubscribe from this group and stop receiving emails from it, send an >>> email to [email protected]. >>> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> -- >> You received this message because you are subscribed to a topic in the >> Google Groups "Neo4j" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/neo4j/3-HzCIi2rO8/unsubscribe. >> To unsubscribe from this group and all its topics, send an email to >> [email protected]. >> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Neo4j" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> For more options, visit https://groups.google.com/groups/opt_out. > > > -- > You received this message because you are subscribed to the Google Groups > "Neo4j" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups "Neo4j" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
