Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Save binary file in DB using entity EJB  RSS feed

 
Elizabeth King
Ranch Hand
Posts: 191
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to create an entity bean that will
store and retrieve binary file (such as, MS Word)
in DB (Oracle). How should I create the db table
and the bean? Does String work? Thanks.
 
Kyle Brown
author
Ranch Hand
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
DON'T do that. It's a terrible waste of database resources and a lousy performer to boot. Instead, just store the file on a file system and store the location of the file in the database as a String.
Kyle
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!