This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I would like to create a database where i can store my video files.. After creation, i want to upload and download these video files from my database from a jsp page... How do i implement this procedure?
Maybe the term "URL" threw you off a bit. What Devaka meant was that you'd store the videos in the file system, and keep only the path to each file in the DB, along with any other metadata about the video in question. Storing actual video data in the DB is probably not the right way to do it.
Anyway, databases don't store huge objects such as video files inside the database table structure, that would render table manipulation very very very slow - instead, large objects are stored as separate files with references in the actual database tables.
Its as simple as this:
Step 1: The end-user submits his file to your system (for how to upload a file in Java you can find lots of examples on Google).
Step 2: You can use your File Api to store/refer/delete that file on your server at the same time store the path of the file in your database column.
and when the user want to retrieve it you are now referring to the file in your server not in the end user machine.
As Tim and William said it is not advisable to store entire file in the database.