开发者

DataNucleus: Write to two storages (RDBMS & file system) at once?

I'm currently implementing a map application. Part of the data is stored in a database, part in the file system. As the amount of model objects has grown and I could additionally benefit from Lazy Loading, I've decided to ei开发者_开发知识库ther use Hibernate or DataNucleus.

As I've already read, DataNucleus supports data storages beyond RDBMS, but does it also support a "mixed" storage? I'd like to store all my data in a SQLite database, except of the images, which should be stored in the file system. Is this possible? And if so, do you know any resources that would give a more detailed explanation of this?


DataNucleus obviously handles multiple datastore persistence. Currently you would create two PersistenceManagerFactory(PMF) (in JDO) or EntityManagerFactory(EMF) (in JPA) and have one for primary data and one for secondary data.

DataNucleus doesn't provide an adapter for SQLite, but you could easily write one (based on the default RDBMS capabilities) and contribute it. It doesn't support filestore, but supports many other storage types.

DataNucleus v3 when complete/released will allow you to have a single PMF/EMF and have it configured to put some data in the primary store and some data in the secondary store ("Data Federation"). This is in SVN.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜