OrientDB

OrientDB SQL vs Gremlin

不想你离开。 提交于 2019-12-23 21:02:08
问题 What query language in OrientDB provides the fastest solution: SQL or Gremlin? Gremlin is very attractive because it is universal for other graph libraries, however does this require a big translation in OrientDB or none at all (What is the latency)? 回答1: EDIT As @decebal pointed out this is not a good test case scenario. Please discard the below benchmarks. power of a graph database comes from relationships, those queries are obviously biased towards simple structures which reflects the only

Traverse directed edges recursively with OrientDB

谁说我不能喝 提交于 2019-12-23 18:13:17
问题 I am trying to recursively traverse outbound edges from a given node, but not the inbound ones. I want both out edges and out vertices in the result of my query. In the following graph, starting from (a), I need (a), (b), (c), (d), (e), including the edges, but not the part after (c), which is <-- (x) (a) --> (b) --> (c) <-- (x) ˙--> (d) --> (e) If I try doing the following, then it traverses everything recursively, irrespective of edge direction, thus also returning (x): TRAVERSE * FROM

Orientdb and teleporter issues

冷暖自知 提交于 2019-12-23 16:38:37
问题 I am having difficulty doing a simple use case with Orientdb and teleporter Stack: OS: Windows 10 / Java: v8 / Orientdb: 2.2 beta2 / Teleporter: 1.0.0 / Database: MS SQL Express 2014 Setup: Installed, MS SQL Express 2014 with instance name SQL2014 Created new db Graphdb with two tables, Country w/ PK Country ID and Province w/ PK Province ID and FK Country ID Installed, and start Orient db 2.2 beta 2 Created new oteleporter_graphdb.bat oteleporter.bat -jdriver sqlserver -jurl jdbc:sqlserver:/

Orientdb: Create new Graph database

帅比萌擦擦* 提交于 2019-12-23 12:55:31
问题 I'm trying to create a new instance of OrientGraph database, as follows: OrientGraph graph = new OrientGraph("local:C:/temp/graph/db"); graph.create(); //BUT no create method!! anyhow, while sticking with the manual and do it with ODatabaseDocumentTx like: db = new ODatabaseDocumentTx("plocal:c:/orientdb/db"); db.create(); .... db.shutdown(); then I want to get a session like: OrientGraphFactory factory = new OrientGraphFactory("plocal:c:/orientdb/db", "admin", "admin"); OrientGraphNoTx g =

import edges to OrientDB using etl

 ̄綄美尐妖づ 提交于 2019-12-23 12:19:47
问题 I have 3 tables, one is for vertex A, one is for vertex B, and the third is for edges from B to A. How can I import this graph to OrientDB? For now, the tutorial just says how to import two csv files, one is for vertex A, and the other one is for vertex B and connected vertices from A. Load vertex A, then load vertex B and creating edges from A to B in the mean time. This works for simple graphs. But for complicated graphs, for example, I have three types of vertices, A, B and C, three types

How do I query orientdb for documents without a certain property

亡梦爱人 提交于 2019-12-23 01:12:18
问题 I would like to query for documents that have a certain property. I tried the following: select * from Foo where not bar is null But this returns me the documents even though they do not have that property. Even though it would work it would give the wrong results if there are properties with null as a value (don't know of orientdb works that way). Is there some way to check for the existence of properties via sql? 回答1: try : select from Foo where bar is defined 回答2: in case if you want to

OrientDB Gremlin - Retrieve Vertex for a class in gremlin not hitting indexes

妖精的绣舞 提交于 2019-12-22 17:54:21
问题 I'm using OrientDB 2.1.11 and rexster 2.6 and gremlin is the main query language. I use via rexpro (and rexster REST). My issue is: how to get the indexes to hit from gremlin (I must use gremlin not orient sql). I have a vertex class zipcode, which has 1 property zip_code defined in schema and indexed as dictionary: zipcode.zip_code DICTIONARY ["zip_code"] SBTREE But when I query it using gremlin, its slow when records are around >25k (haven't tested with lower numbers). To give proper

OrientDB Gremlin - Retrieve Vertex for a class in gremlin not hitting indexes

我只是一个虾纸丫 提交于 2019-12-22 17:53:15
问题 I'm using OrientDB 2.1.11 and rexster 2.6 and gremlin is the main query language. I use via rexpro (and rexster REST). My issue is: how to get the indexes to hit from gremlin (I must use gremlin not orient sql). I have a vertex class zipcode, which has 1 property zip_code defined in schema and indexed as dictionary: zipcode.zip_code DICTIONARY ["zip_code"] SBTREE But when I query it using gremlin, its slow when records are around >25k (haven't tested with lower numbers). To give proper

OrientDB Performance

半城伤御伤魂 提交于 2019-12-22 09:51:51
问题 I have been reading posts about OrientDB performance benchmarks: http://technet.weblineindia.com/web/introduction-to-orientdb-a-nosql-dbms/ is one example. It suggests "It can store upto 150,000 records per second on common hardware" I might be doing something wrong, but i haven't been able to achieve this performance trying to UPSERT in orientDB: Java API (check if a vertex is present, if not - create one) - Processed data in around 5 minutes for 20k records ETL did process insert very

OrientDB get Edges with shortestPath()

落花浮王杯 提交于 2019-12-22 08:49:53
问题 I have a Question about the shortestPath() Function of OrientDB. If I Query select shortestPath('#9:1', '#15:1', 'BOTH') against a OrientDB I just get the Vertex of the Path. But I also want the Edges between them. How can I SELECT both, the Vertex and the Edges? 回答1: You can use a javascript function. I used these records I used this code var g=orient.getGraph(); var b=g.command("sql","select expand(shortestPath(" + start + "," + end + ", 'BOTH'))"); var list=[]; for(i=0;i<b.length-1;i++){