Hello,Oracle has a great date datatype composed of (I believe) 7 bytes.The range is from January 1, 4712 BCE through December 31, 9999 CE,which includes EVERY second in that range.They also have a number of built in date functions such asmonths_between, add_months, last_day, next_day.Does NEO4J have a Date datatype, or object?Thanks a lot!Rodger--
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 neo4j+un...@googlegroups.com.
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 neo4j+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Axel Morgner
CEO Structr (c/o Morgner UG) · Hanauer Landstr. 291a · 60314
Frankfurt · Germany
Twitter: @amorgner
Phone: +49 151 40522060
Skype: axel.morgner
Structr - Award-Winning Open
Source CMS and Web Framework based on Neo4j
Structr
Mailing List and Forum
Graph
Database Usergroup "graphdb-frankfurt"
Hello all,I've been looking at this thread, the example, and the manual for over an hour now.
Looking at this link, http://docs.neo4j.org/chunked/milestone/cypher-cookbook-path-tree.html ,
it's just to show how to work with tree structures, not dates, correct?
It has three fields to store year, month, day. No time of day component.
In Oracle SQL, using Date datatype, querying a similar date range is only 2 lines:
WHERE event.event_date >= to_date ( 'yyyy-mm-dd', '2010-12-31' )
and event.event_date <= to_date ( 'yyyy-mm-dd', '2011-01-03' )
I've been searching the NEO4J manual for "date".
Unless you are using a java program, I can't see how to do something similar to this SQL example in Cypher.
In Cypher, it seems you would have to know the Long or string representation of the date first.
And in Cypher, there are no memory variables to store these values, correct?
More processing steps, and/or lines of code.
One of my RDBMS tuning secrets was to do all the processing in the database.
Not in external programs (read data into program, process in program, write back).
http://rodgersnotes.wordpress.com/2010/09/14/oracle-performance-tuning/
Dates and calendars are always more difficult to work with in any language.
They are not linear like integers or real numbers.
The number of days changes each month.
And every four years, the number of days in the year changes.
A Date object will never allow any incorrect dates to be input into it.
Unlike storing numbers as strings, where you can input "@", not "2".
The insert will work, but a query will fail.
http://rodgersnotes.wordpress.com/2010/09/21/muck-massively-unified-code-key-generic-three-table-data-model/
Oracle has some fabulous SQL functions to work with dates.
Most common: Sysdate, To_date, To_char, Trunc
Also: Last_day (of the month), Next_day, Add_months, Months_between
Number of days between is simply: Select trunc(sysdate) - trunc(date1)
I've found this functionality to be incredibly useful.
I can't imagine how much work it would have been to build RDBMS systems without the Date datatype and the associated functions.
When you think of it, Graph databases are useful, because it stores and represents objects similar to a graph, as a graph.
In those cases, it's better than using tables or other datatypes, objects, structures.
Applying the same concept, why not store and represent dates, as Dates?
I think adding Date objects and functions so that Cypher can query / manipulate dates in nodes and relationships directly, is very important.
Critical even.
Hope it's useful.
Best,
Rodger