4 ms·
Graph database aficionados, I have a question: What's the deal with most graph databases having a very limited number of types? It would be nice if we had more
by spamizbad 8y ago
Graph database aficionados, I have a question: What's the deal with most graph databases having a very limited number of types? It would be nice if we had more robust numeric types (integers and decimals rather than just doubles) and timestamps for example.
- janemanos 8y agoThis is on the list of more than one teammate here at ArangoDB. But also not trivial to implement.
- nh2 8y agoCan you elaborate why that is? Of all types I could come up with (beyond bool), integers and unsigned integers seem the most basic.
- janemanos 8y agoThe simplest explanation is that ArangoDB uses JSON as dataformat to the outside world. JSON doesn't support these types like arbitrary exact decimal, or timestamps. Despite ArangoDB using VelocyPack internally, which is capabable of much more than JSON, a user will import JSON and get JSON back. You can of course use datetime https://docs.arangodb.com/3.3/AQL/Functions/Date.html https://docs.arangodb.com/3.3/AQL/Functions/Date.html and decimals with a precision of 10E38 in ArangoDB but it is not as precise as in a relational database. If we want to be as precise as a relational DB, then we would have to say goodbye to JSON
- fulafel 8y agoMongoDB uses this to express decimals as JSON: { "$numberDecimal": "<number>" }
- e12e 8y agoI suspect creating a specification based on what mongodb does/did might be the better approach - but a quick search for "typed json" turned up: https://www.tjson.org/ https://www.tjson.org/ Not sure if I'm a fan of the syntax - but some kind of open, sane, standard would be nice.
- tyingq 8y agoMaybe Agensgraph would work for you? Based on postgresql, so you can use any of the postgresql types. Fairly new though. https://www.postgresql.org/about/news/1848/ https://www.postgresql.org/about/news/1848/
- johnymontana 8y agoNeo4j has datetime types, spatial point type, int, float, etc. See https://neo4j.com/docs/developer-manual/current/drivers/cypher-values/#driver-neo4j-type-system https://neo4j.com/docs/developer-manual/current/drivers/cyph...
- lbhnact 8y agoI can't speak for all graph stores, but in addition to ADB being json-native as described below, many graph users describe the types of any value, not just floats or ints, as a relation or property to the value itself. So you'd never have any value; object, key, value of a string, int, float, or reference, without associated meta-data typing it elsewhere in the graph, and would be unlikely to operate on that data without making reference to those properties.