JDBC or JPA for NoSQL

855 views Asked by At

I am currently working with MongoDB in Java and do not want to use the mongo-java driver which is very time consuming to code and also hard to maintain. I thought developing my own mongo-JDBC driver (since the one available is commercial). Am I on the right track.?

Also should I use some framework instead of pure jdbc .?
I am not sure about such frameworks for NoSQL databases. Kindly guide?
2

There are 2 answers

2
Dev On

Edit: Kundera is no longer maintained


You can use Kundera for this. It's an open-source object mapper for NoSQL databases supporting MongoDB, Cassandra, HBase, ONS, etc. It takes query in JPA format.

1
Sezin Karli On

You can use Spring JDBC instead of pure JDBC and Spring Data MongoDB for MongoDB. They are quite easy to use.