Question

I want to create the following schema User <-> Tag <-> Content -> SubContent <-> User

There are many-to-many connections between user and tag

There are many-to-many connections between tag and content

There is one-to-many connections between content and subcontent

There are many-to-many connections between subcontent and user

So there is a lot of connections here, Thats why I thought that neo4j would be a right choice.

My main queries would be to get the relationships of certain tags and access subcontent that is connected to certain users.

What do you think?

Was it helpful?

Solution

I think a graph db, and neo4j in particular, would be ideally suited. Having the multiple many-to-many relationships, and given how you are planning on 'browsing' the data are really in the graphdb sweet spot.

OTHER TIPS

Fully agree with Dan G. A Graph db and Neo4j makes sense here. I have a very similar domain model and it feels like "cheating" everytime i query for something (coming from SQL). Also adding properties to the relationship themselfs can add extra info, like "stength" or "amount" on the content CONTAINS subcontent relationship.

Also "future proof" architecture if you would like to add something else in the future like SIMILARTY relationship between tags.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top