Forum     

Go Back   Digit Technology Discussion Forum > Software > Programming
Register FAQ Calendar Mark Forums Read

Programming The destination for developers - C, C++, Java, Python and the lot


Reply
 
LinkBack Thread Tools Display Modes
Old 29-06-2011, 04:39 PM   #1 (permalink)
Wise Old Owl
 
speedyguy's Avatar
 
Join Date: Aug 2004
Location: Bangalore/Jamshedpur
Posts: 1,173
Default Help: Store video/image files in database


not comfortable with blob datatype and its use... im doing a dynamic web project in j2ee so need to store and access images and videos from database to my web page (html/jsp). can anyone help me out with that.

ps : im using sql querries for database (DB2)

Enjoy~!
__________________
No Pain...No Gain
speedyguy is offline   Reply With Quote
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 29-06-2011, 05:05 PM   #2 (permalink)
Excessive happiness
 
furious_gamer's Avatar
 
Join Date: Jun 2008
Location: Bangalore
Posts: 2,974
Default Re: Help: Store video/image files in database

^^ Storing images in DB is not good idea unless it's the photo of employee or anything similar to that. get the image using normal File input and use BLOB. Otherwise store images under a folder and name it with your primary_key . filename. very easy to pick the file instead of retrieve it from DB and way easy to store.
__________________
My First Android phone : Samsung Galaxy SL i9003 - Rooted & Gingerbread XXKPQ
Updated : superteekz_V2 ROM for XXKPQ.

PS Request
furious_gamer is online now   Reply With Quote
Old 30-06-2011, 12:59 AM   #3 (permalink)
Wise Old Owl
 
speedyguy's Avatar
 
Join Date: Aug 2004
Location: Bangalore/Jamshedpur
Posts: 1,173
Default Re: Help: Store video/image files in database

ok not very clear to me still. but im more concerned with storing video files rather than images. ya images might also come into picture.

Enjoy~!
__________________
No Pain...No Gain
speedyguy is offline   Reply With Quote
Old 30-06-2011, 10:05 AM   #4 (permalink)
Excessive happiness
 
furious_gamer's Avatar
 
Join Date: Jun 2008
Location: Bangalore
Posts: 2,974
Default Re: Help: Store video/image files in database

^^ See if video files, i would not suggest you to store it in DB and no way you can store it in DB. Yes, create a folder in server and create folders according to whatever criteria you need to store them.

Ex. If facebook like app, i would store images like server_path/user_images/user_id/

under this folder three subfolder named profie_pic, gallery(again sub-folders) and video.

Under this video folder i'll store whatever video he uploaded.

This is the fastest and correct way to do. In the meanwhile, refer the video name in some tables, so that user can search for the video name and play it. This way, you can fetch the video names from DB and when user click on link, retrieve the video from folder.
__________________
My First Android phone : Samsung Galaxy SL i9003 - Rooted & Gingerbread XXKPQ
Updated : superteekz_V2 ROM for XXKPQ.

PS Request
furious_gamer is online now   Reply With Quote
Old 01-07-2011, 12:25 AM   #5 (permalink)
Wise Old Owl
 
speedyguy's Avatar
 
Join Date: Aug 2004
Location: Bangalore/Jamshedpur
Posts: 1,173
Default Re: Help: Store video/image files in database

alright...im deploying my project websphere tomcat. so can i get that folder automatically exported into some subfolder or manually i do it?

Enjoy~!
__________________
No Pain...No Gain
speedyguy is offline   Reply With Quote
Old 01-07-2011, 10:35 AM   #6 (permalink)
Excessive happiness
 
furious_gamer's Avatar
 
Join Date: Jun 2008
Location: Bangalore
Posts: 2,974
Default Re: Help: Store video/image files in database

^^

Write the code in such a way that if that folder doesn't exists, create one. In this way no need to export things.
__________________
My First Android phone : Samsung Galaxy SL i9003 - Rooted & Gingerbread XXKPQ
Updated : superteekz_V2 ROM for XXKPQ.

PS Request
furious_gamer is online now   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


 
Latest Threads
- by Charan
- by Sarath
- by clmlbx

Advertisement




All times are GMT +5.5. The time now is 12:31 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2