Search code examples
javadatabaseblobderby

Adding Java Objects to database


For a university assignment I have been assigned I have a Prize object which contains either text, image, or video content. I would like to persist this information into a BLOB field within an Apache Derby database (which will be running on a low powered PDA). How can I add this data to the database?

Thanks in advance.


Solution

  • In this article Five Steps to Managing Unstructured Data with Derby you can read how to do this.

    It describes how to insert binary data into a column with the BLOB datatype in Apache Derby using JDBC.