5 Replies - 8639 Views - Last Post: 20 August 2010 - 10:59 AM Rate Topic: -----

#1 Guest_gg*


Reputation:

how to retrieve and store video using java in SQL database

Posted 12 May 2010 - 12:02 AM

how to retrieve and store vidieo usinf java from/to SQL database
could you help me how to retrieve and store vidieo usinf java from/to SQL database. i need code related to this, very thank you.
Is This A Good Question/Topic? 0

Replies To: how to retrieve and store video using java in SQL database

#2 rgfirefly24  Icon User is offline

  • D.I.C Lover
  • member icon


Reputation: 267
  • View blog
  • Posts: 1,470
  • Joined: 07-April 08

Re: how to retrieve and store video using java in SQL database

Posted 12 May 2010 - 11:29 AM

I would suggest that you keep the video files in a location on the local machine to where your java application is going to be run from and then store the path to the files in the database. You can then retrieve the path and map your program to it.
Was This Post Helpful? 1
  • +
  • -

#3 Amityadav2010  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 19-August 10

Re: how to retrieve and store video using java in SQL database

Posted 19 August 2010 - 10:45 PM

how to store video in my sql database
Was This Post Helpful? 0
  • +
  • -

#4 Martyr2  Icon User is offline

  • Programming Theoretician
  • member icon

Reputation: 4332
  • View blog
  • Posts: 12,127
  • Joined: 18-April 07

Re: how to retrieve and store video using java in SQL database

Posted 19 August 2010 - 10:53 PM

I believe the answer rgfirefly24 just answered your question. You don't store large binary objects in your database. Yes they have BLOB etc, but you really shouldn't use it to store images or videos. Instead, store them locally on the machine and then put the path into the database table. This makes the database lean and mean, allows for searching on those paths and helps with making record manipulation quick and easy.

So say "NO" to storing binary in the database and say "YES" to storing a path to it in the database instead. :)
Was This Post Helpful? 0
  • +
  • -

#5 aamir.ramzan  Icon User is offline

  • New D.I.C Head

Reputation: 3
  • View blog
  • Posts: 28
  • Joined: 12-January 10

Re: how to retrieve and store video using java in SQL database

Posted 19 August 2010 - 10:55 PM

You should learn about SQL data types like BLOB, CLOB etc. Then you will be able to store videos, images, files etc in the database.
Was This Post Helpful? 0
  • +
  • -

#6 keakTheGEEK  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 107
  • View blog
  • Posts: 344
  • Joined: 23-February 10

Re: how to retrieve and store video using java in SQL database

Posted 20 August 2010 - 10:59 AM

Quote

Don't store binary data in the database. Store a path to it in the database instead


This seems to be the most popular answer to the question "How do I store files in my database?" However, I believe that this actually answers the question "Should I store binary data in my database?"

The advice given on this topic is definitely good advice and common best practices, but it isn't always the best solution in every situation. With that being said, to help in answering the original question asked Here is an article that provides examples with reading and writing binary data to a MySQL Server database using BLOB.

Also, it's not very clear to me the exact database management system that you are using. So here is some more information on the new FileStream data type in MS SQL Server 2008. The FILESTREAM data type integrates the Database Engine with an NTFS file system and stores varbinary(max) binary large object (BLOB) data as files on the file system. Only a pointer to the file in the file system is stored in the table. Every thing is managed for you within MS SQL Server once you configure it and the column behaves just like your traditional varbinary(max) data type.

We use this new data type in our application that we support which provides file versioning functionality. Seems to work very well.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1