Database – graph or relational database

databasedatabase-design

I'm starting to think that a lot of my tables could be replaced by only a graph db:

For example:
I have 4 tables: accounts, votes, posts, relationships

but I can represent all these in a graph table with different edges,

NODE1 -> type of relation -> NODE2
account -> vote_+1 -> post
account -> wrote -> post
account -> friend -> account2

is there a difference of performance or other between them?

Best Answer

you can always represent relational data in graph form

the key is how are you using the data - mostly transactional updates, mostly graph-traversal queries?

if you have the time, do the conversion and profile your most common operations on both DBs

Related Topic