Introduction

Sometimes we have a requirement to insert file into database rather then storing it in the file system. For a developer, it is always hard to decide this. You can find good discussion in different forums on web over storing the file either in database or file system. I believe choosing the same depends on the project requirement rather than preferences. You can choose database over file system when file size is small and user’s file needs to be more tightly coupled, secured and confidential. Since this discussion is out of scope of this article, here is a good resource, Which is Better ? Saving Files in Database or File System for your reference.

Well, today we will see how to insert image file into MySQL database using JDBC. We will use BLOB datatype of MySQL for storing files....

( Read More )

#database #mysql #java

1 Likes10.25 GEEK