Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Attachments in distributed environment?

 
Pavel Kubal
Ranch Hand
Posts: 360
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I'm facing quite tough problem. I need to store attachments to a subject in a database. Firstly I tought, that I will use Oracle BFILE data type, but this data type doesn't work in a cluster. My database is required to be run in a cluster. How would you solve this problem?

There can be multiple attachments for each subject (1M+ subjects). These attachments will be usually small, but can exceed 10 MB. I don't want to store these attachments in a database, 'cause it will cause unwanted overhead.

Thanks in advance for all your replies.
 
Sumit Malik
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Pavel Kubal,

Well i think you can go for alternative approach.... Just create another child table pertain to the subject(which would be 1-M relation). There you can just store the static path of the files wherever you have stored them... Wherever you are showing the attachments just check whether they exist or not through IO API....

I think this way you dont have to store whole data in DB...

Let me know if i have got to your problem or not...

Cheers !!!
Sumit Malik
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic