• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

can we store data in files using hibernate?

 
sajjad ahmad
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI !
We have a requirement our client wants us to persist the data in to a persistent storage using hibernate obviously if backend storage system is a database it is very easy to do in hibernate.
But our client�s requirement is to persist the data in a file system using hibernate so that in future if they decide to change the storage layer to a database it wont be any problem for them .
It looks pity confusing  but we really need to do that .
Can anyone please guide me is there any open source SDK for hibernate available which can do such thing for us .Or even can hibernate itself do that because we couldn�t find anything like that as a hibernate facility.
Any links to the pages which can help me solve this problem will be appreciated.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In theory this is possible. You would have to write a dialect, plus implement a JDBC driver for the file system so you can access it in the same way you might access a database. However, the big stumbling block is the file system is not a transactional resource, and a database is.

Personally though, I'd question the client's requirement before trying this.
 
sajjad ahmad
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI !
I have found one open source text/csv JDBC driver on sourceforge i think i also need the dialect in hibernate to communicate with this "text/csv JDBC driver" do you know about any open source dialect available for this purpose.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No. You'll have to write your own.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic