Couchbase as graph db/store

Any use cases/anyone used Couchbase as Graph DB ? , If yes what is the model design recommendation at least for

basic connections - Followers, Following
models related to each other using relationship

Well, Couchbase Server is a document oriented database, where it has no idea about the relationships between documents.

What that means in your case is that your application needs to handle the idea of a relationship, whatever that may be. For the simple case it might work (like only one-hop connections), but for things like graph traversal and complex queries, you might be better off using something like Neo4j.

That said, if you more care about your documents and you only have basic uses cases, Couchbase may still be a good fit. Do you want to tell us what you have in mind?

Yes neo4j or orientDB for that matter is a better choice for processing graph . But lot of times it gets down to operational cost and manpower. since we are investing big in Couchbase , we would love to have all that data managed and stored in Couchbase itself. E.g. Titan graph DB works with Cassandra as a default back end data store. So if you think about that , its possible to have Couchbase also as another pluggable data store for Titan graph DB. It will be a huge win for Couchbase and its community.


Use case is not that complex. Here are the examples that we are thinking to build.

  • Users can follow each other, So maintaining vertices/edges for Follow and Following model
  • Users share relationship with each other via some reference model with each other ; so that is a connection with edge that has property of type of relationship . e.g. I was in paris with my friends . So user (me) connected another users (my friends) via Paris (reference city model) as a edge attribute,
  • All my updates should be shown to my connections - basically Facebook model or LinkedIn model where people whom I connected to see my updates and I see theirs when we all login into the service.

So these are the very basic use cases for a graph DB model , If I can get that modeled that will be awesome!.

1 Like

you can simply archive this via some application logic and n1ql querys. user:id { name: pass:}, following:user:id { ids: [12,435,643,4213,]} }, follows:user:id {ids: [12,435,643,4213,]}}’

Now you got your relations :slight_smile:

@rshetty were you able to use any graph database using couchbase?