Search code examples
javajpacouchbase

JPA with Couchbase?


I will create an application that needs both structured and unstructured data. For the unstructured part a relational database will be clumsy. When looking for options, I stumbled over Couchbase which seems to happily store the unstructured documents while it has SQL92 compatibility with N1QL. So now I am thinking whether Couchbase could cover the structured data requirements as well.

Has anyone had success with the combination JPA and Couchbase?


Solution

  • Meanwhile I found Object-Relational Mapping with Couchbase Data Entities in Java:

    You can use Hibernate to map object-oriented domain models to a traditional relational database. The tutorial below shows how to use the CData JDBC Driver for Couchbase to generate an ORM of your Couchbase repository with Hibernate.

    The above claims to work on Hibernate, which itself is a JPA provider. If it works I will prefer this solution over non-JPA solutions.

    We found two commercially offered JDBC drivers for Couchbase: CDATA and Simba. Both of them did not cover our requirements so we dropped the idea of storing everything in Couchbase.