File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes MongoDB and the fly likes MongoDB in conjuction with JPA Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » MongoDB
Bookmark "MongoDB in conjuction with JPA" Watch "MongoDB in conjuction with JPA" New topic

MongoDB in conjuction with JPA

Sai Hegde
security forum advocate
Ranch Hand

Joined: Oct 26, 2010
Posts: 204

For a project that I am working on, we have requirements where we are supposed to replicate data from DB2 to mongo. Now the object that is returned back from DB2 is about 70M (an eagerly loaded object) with multiple clobs and blobs. While I am looking into GridFS for sharding it before I'd save it to mongo, I wonder if there were any suggested ways of doing this?
Rick Copeland

Joined: Apr 09, 2013
Posts: 17
I suppose it depends on how you want to use the object once it's in MongoDB. You certainly can choose to just shove everything into a GridFS "file", but you lose query-ability (a GridFS file should be treated like a BLOB would be in a RDBMS).

If the object is over 70MB and you don't want to decompose it structurally, you are going to need to store it in GridFS, since MongoDB documents are limited to 16MB each.

Hope that helps!
I agree. Here's the link:
subject: MongoDB in conjuction with JPA
It's not a secret anymore!