Thanks for those answers, it's pretty clear :)

Michael

On Thursday, January 23, 2014 11:27:58 PM UTC+1, Michael Hunger wrote:
>
> Just do the calc, its not that many nodes: only 525k and you can create 
> them on demand, so only for minutes / hours that actually have events.
>
>
> On Thu, Jan 23, 2014 at 8:31 PM, Javad Karabi <[email protected]<javascript:>
> > wrote:
>
>> define "heavy".
>> heavy sounds like you are worried that there would be alot of nodes in 
>> the graph. there would be, i imagine, but with neo4j being a graph 
>> database, the number of nodes increasing does not degrade performance.
>>
>> MERGE (y:Year {year: {year} })
>> CREATE UNIQUE y-[:month]>(m:Month {month: {month}})-[:day]->(d:Day {day: 
>> {day}})
>>
>> now, if you want to keep going into the specific hour/minute/sec, you 
>> could drill furhter with:
>>
>> -[:hour]->(h:Hour {hour: {hour}})... etc
>>
>> or, if you dont want to keep adding nodes for the times, you could simply:
>> (:Day)<-[:day {time: "1330"}]-(:Event)
>>
>>
>> On Wednesday, January 22, 2014 8:06:54 PM UTC-6, Michael Azerhad wrote:
>>>
>>> Hi,
>>>
>>> I would like to know what would be a good practice to deal with range 
>>> dates in a graph database.
>>>
>>> So, here my use case:
>>>
>>> I have a lot of events in my graph, I want to return all events that 
>>> occurred between two dates (format YYYY/MM/DD HH:MM).
>>>
>>> Currently, I structured each Event node with a "startAt" indexed 
>>> property and an "endDate" indexed property.
>>>
>>> Then, I came across this 
>>> article<http://blog.neo4j.org/2012/02/modeling-multilevel-index-in-neoj4.html>,
>>>  
>>> conjuring up that indexes would be too costly for this use case.
>>>
>>> If I follow this practice and then remove startAt and endDate from my 
>>> Event nodes, wouldn't it too heavy to add nodes representing each hour and 
>>> each minute, as the example does for year, month and day? Indeed, all 
>>> events would then be attached to a "minute" node.
>>>
>>> Thanks a lot,
>>>
>>> Michael 
>>>
>>>  -- 
>> 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] <javascript:>.
>> 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.

Reply via email to