OrientDB

How to make a ST_spatial query ST_Within Orientdb by selecting spatial classes

二次信任 提交于 2020-01-03 03:05:07
问题 I am trying to understand how to use the LUCENE Spatial queries in Orientdb 2.2.17 using pyorient. I have note yet figure it out how to select all the properties of a point vertex class that is within a polygon vertex from another class. Region Vertex Class has two properties: name coordinates (EMBEDDED OPolygon) LUCENE index CREATE CLASS Region EXTENDS V CREATE PROPERTY Region.name IF NOT EXISTS STRING CREATE PROPERTY Region.coordinates IF NOT EXISTS EMBEDDED OPolygon CREATE INDEX Region

Create Edges in OrientDB

旧街凉风 提交于 2020-01-02 10:33:29
问题 I have an Orient database with vertices for servers from different management tools. As a server can be monitored by multiple management tools, I would like to create edges between the vertices for the same server. The connected components would then be the individual servers. The problem I have, is that different systems will have different naming conventions - some use fully qualified domain names, some use internal domain names, and some only use the hostname. My Sample Data: orientdb {db

How to use OrientDB ETL to create edges only

天大地大妈咪最大 提交于 2020-01-02 04:01:06
问题 I have two CSV files: First containing ~ 500M records in the following format id,name 10000023432,Tom User 13943423235,Blah Person Second containing ~ 1.5B friend relationships in the following format fromId,toId 10000023432,13943423235 I used OrientDB ETL tool to create vertices from the first CSV file. Now, I just need to create edges to establish friendship connection between them. I have tried multiple configuration of the ETL json file so far, the latest being this one: { "config": {

How to write a select query or server-side function that will generate a neat time-flow graph from many data points?

僤鯓⒐⒋嵵緔 提交于 2020-01-02 02:59:24
问题 NOTE: I am using a graph database (OrientDB to be specific). This gives me the freedom to write a server-side function in javascript or groovy rather than limit myself to SQL for this issue.* NOTE 2: Since this is a graph database, the arrows below are simply describing the flow of data. I do not literally need the arrows to be returned in the query. The arrows represent relationships.* I have data that is represented in a time-flow manner; i.e. EventC occurs after EventB which occurs after

OrientDB Query by edge property

家住魔仙堡 提交于 2019-12-31 05:06:07
问题 I have two vertex classes: Location and User and I have two edges also: Friend and GoingTo. A User can be 'Friend' with another User and a User can also 'GoingTo' a Location. The edge GoingTo has a datetime property called going_date with the date the user is going to the Location. I want to return every ‘Location’ that has a in(“GoingTo”) edge from an ‘User’ that is a (“Friend”) of a specific starting ‘User’ (#12:11 as example). What I have here is all locations but without the date property

orientdb stop traverse with some condition

情到浓时终转凉″ 提交于 2019-12-25 12:23:13
问题 Given this graph: A third party may or not own a parameter. A Parameter is represented by a context , code and value (EX: CREATE VERTEX Parameter SET context='val1', code='val2', value='val3' ). A ThirdParty is represented by a type (Ex: CREATE VERTEX ThirdParty SET type=7 ) Starting from vertex #40:0, i would like to retrieve the value of a given parameter(example, parameter with context='val1' and code='val2') attached to this node (a node can have different parameters). If the node doesn't

How to use transactions on remote OrientDB

只谈情不闲聊 提交于 2019-12-25 09:16:57
问题 TL;DR How do I make SQL commands execute in a transaction when using a remote OrientDB database from a java server? Long version I have a remote OrientDB database that I connect to from a java server. I read in the OrientDB documentation that to start a transaction I call db.begin() and after the database updates I call db.commit() or db.rollback() . So this is initially what I was trying to do: try { db.begin(); db.command(new OCommandSQL('delete edge connected from #10:1')).execute(); db

Limit the number of edges can be added to a vertex in orientDB

∥☆過路亽.° 提交于 2019-12-25 08:34:04
问题 I am using orientDB 2.2.7 via Java API and have created the following vertexes: Vertex Car Vertex Driver Edge Co-Owner For each car it can only get a maximum of five owners, I have managed to do that by code in a trivial way, my question is there any mechanism in orientDB that can limit the number of edges of type co-owner can be added to vertex car? 回答1: I made this little test case using Dynamic Hooks, I hope is similar to yours. create class Car extends V create class Driver extends V

Transitive Clousure in OrientDB query language

杀马特。学长 韩版系。学妹 提交于 2019-12-25 03:36:18
问题 Suppose I have a vertex class called PERSON and and an edge Class called father: CREATE CLASS PERSON EXTENDS V CREATE CLASS father EXTENDS E Suppose that I populated PERSON with some records. I also populated father with some records that connect certain records in PERSON to some others records of PERSON (this simply model who is father of who) I would like to know how the following query would look like in OrientDB? Find all ancestors of the Person, say p1 (with rid=#10:1)? 回答1: create class

Get all used fieldnames of schema-hybrid Class in Orientdb

我只是一个虾纸丫 提交于 2019-12-25 03:33:06
问题 I started to look at OrientDB and try to code a simple webapp with OrientDB as Database. I have a schema-hybrid database schema, which includes the class Server. Is there any possibility to get all used fields, even the one that are not defined in the schema? So that in the webapp frontend a list of fields existing in the other Servers can be shown to the user. So with following Situation: CREATE CLASS Server EXTENDS V CREATE PROPERTY Server.name string CREATE PROPERTY Server.hostnames