Mixed Graph and relational environment

40 views Asked by At

I'm sure this has been asked elsewhere, but I have a database that has elements that lends itself to a Graph database and elements that lends itself to a SQL database.

Social elements such as relationships lend themselves to the Graph, but things like my User table, and various other "log" tables (not database logging but my own system generated logs) tend to lend themselves to the SQL/flat scenario.

How would I do the logging concept in a Graph (I'm using OrientDB so could just create a class and add vertexes - but that doesn't feel the right approach) - do I create Nodes for each log entry and have them scattered across the ether or would a dual-DB environment be normal for systems anyway?

Is it in fact that I need to re-wire my brain from thinking of lists to thinking of documents and that they're all in the same pool together anyway?

1

There are 1 answers

1
AudioBubble On

I would recommend you to use databases specialized for the job you want to do.

Use time series / logging databases for logs, graph databases for graphs and relational databases for highly structured data which doesn't have many relations (or where you don't need to query many relations at a time).

You can also use multiple databases in parallel, however segregated data and data synchronization is more tricky to get right. If you want to go this route, using UUIDs as identifiers makes many things easier :)