Joining a DB diagram to an RDBMS?

I was not sure if this question was more appropriate here or on dba.stackexchange.com, so let me know and I can move it if necessary.

I start a new project from scratch and study the relevance of the graph database (in this case, probably neo4j). However, it is expected that the system will have data suitable for the graph database (for example, the HR hierarchy), as well as data that will be better in the DBMS (for example, orders, invoices, products, etc.).

My question is about the best way to combine these two databases. Here is a simplified example in which we have a hierarchy of HR sales companies in the database of graphs, and we have products and orders in the DBMS:

Hierarchy (graph database)

Hierarchy (graph database)

Orders / Products (rdbms)

Orders / Products (rdbms)

, , UNDER "state1".

2 - 1, , - :

()

MATCH (closers:employee)-[member_of]->(:group)<-[parent_of]-(parent:group)
WHERE parent.name = 'state 1'
RETURN closers;

:

()

SELECT * FROM orders WHERE salesEmployeeId IN ( <resultId1>, <resultId2>, ... <resultIdN> );

, . , , - rdbms. - ?

()

MATCH (closers:employee)-[member_of]->(:group)<-[parent_of]-(parent:group)
WHERE parent.name = 'state 1'
JOIN rdbms.orders ON orders.salesEmployeeId = closers.id
RETURN orders;

EDIT: , , . , , , . , : " , // ?"

+4
1

, , DB.

, DB, ( ):

(e:Employee {id: 123, name: "Foo"})-->(o:Order {id: 234, frozenPrice: 10.99})
(o)-->(c:Customer {id: 345})
(o)-->(i:Item {desc:"Bar", currentPrice:12.99})

:

MATCH (o:Order)<--(closers:Employee)-[member_of]->(:Group)<-[parent_of]-(parent:Group)
WHERE parent.name = 'state 1'
RETURN orders;

, , ( ), .

+3

All Articles