Results 1 to 8 of 8
Thread: Image Handling
- 04-17-2012, 10:28 AM #1
Member
- Join Date
- Apr 2012
- Posts
- 2
- Rep Power
- 0
Image Handling
Hi All
I am developing a small application in which I want to upload images first with small description and name. Later I want to put the name of the fie to retrieve it.
I want to know is it good to just store the address of the image in the database instead to storing the entire image?
Like, If I copy the image from one location and put it in a protected folder and in the database, just store the address of the image. Later, when I want to retrieve it, it can again use the address/path (stored in the database) of the image. It will save lot of space on database.
Is it a good approach? What can be pitfalls?
Also,I am trying Netbeans 7 for this... any suggestions???? Shall I continue using Netbeans (as I am not getting enough tutorial on this) or is there any better option like swings or Servlets or anythign else?
Regards
Yaigesh Mehra
- 04-17-2012, 10:35 AM #2
Moderator
- Join Date
- Apr 2009
- Posts
- 10,438
- Rep Power
- 16
Re: Image Handling
Since the database uses the file system to store its data (especially LOBs) you're not really saving anything much holding it on the file system.
One pitfall is the image is no longer tied to the entry in the database.
Move the image, change the directory name, whatever, and that entry is now no longer valid.
Netbeans is an IDE, so not sure what you think you;re asking with the last part.Please do not ask for code as refusal often offends.
- 04-17-2012, 10:48 AM #3
Member
- Join Date
- Feb 2012
- Location
- Queensland, Australia
- Posts
- 12
- Rep Power
- 0
Re: Image Handling
Storing the image in the filesystem may mean that it would be faster loading the image onto a form or processing it. But you have the issues that Tolls described which can potentially occur.
Their will always be some overhead in retrieving the image from a database in terms of speed, but the advantage is that you have both your data and images in a centralized repository.
In the end it is a trade-off.
Regards
- 04-17-2012, 11:36 AM #4
- 04-17-2012, 11:44 AM #5
Member
- Join Date
- Feb 2012
- Location
- Queensland, Australia
- Posts
- 12
- Rep Power
- 0
Re: Image Handling
What strategy you use depends on your situation and your requirements.
I am new to java but have had an asp.net background.
This article sums up my opinion.
To BLOB or Not To BLOB: Large Object Storage in a Database or a Filesystem - Microsoft Research
Regards
- 04-18-2012, 10:02 AM #6
Moderator
- Join Date
- Apr 2009
- Posts
- 10,438
- Rep Power
- 16
Re: Image Handling
This did used to be the case, but I'm not sure it still applies.
It could be quite marked, if I remember the metrics from several years ago.
However things have changed, driven simply by more people wanting to keep their data in synch.
I know Oracles LOB reading performance is more than sufficient, and has been for a while now.
Filesystem storage also has another problem, depending on the FS you might encounter a restriction on the number of images a folder can contain, so you need a mechanism for monitoring that.Please do not ask for code as refusal often offends.
- 04-19-2012, 09:38 AM #7
Member
- Join Date
- Apr 2012
- Posts
- 2
- Rep Power
- 0
- 04-19-2012, 09:45 AM #8
Moderator
- Join Date
- Apr 2009
- Posts
- 10,438
- Rep Power
- 16
Re: Image Handling
Netbeans is not your app.
You write your app in Netbeans in the same way you write your DOC in Word.
So asking whether it should be in Netbeans or Servlets is meaningless.
So. What are you attempting to do?
Where are these images?
Is this going to be a webapp or desktop app, or simply a command line tool?
Only you can answer these questions since it's your requirements.Please do not ask for code as refusal often offends.
Similar Threads
-
How to import image, draw circles/text on it, and save a new image to disk
By InTheEndo in forum Java 2DReplies: 1Last Post: 07-28-2011, 08:48 AM -
Java Applet loading image; render as you get image?
By ea25 in forum New To JavaReplies: 12Last Post: 04-14-2011, 01:58 PM -
[SOLVED] manipulating the pixel values of an image and constructinf a new image from
By sruthi_2009 in forum AWT / SwingReplies: 14Last Post: 04-10-2009, 08:46 AM -
CropperImage-Image Handling
By Alex_K in forum Advanced JavaReplies: 0Last Post: 02-26-2009, 01:15 PM -
Converting multiple banded image into single banded image... Image enhancement
By archanajathan in forum Advanced JavaReplies: 0Last Post: 01-08-2008, 05:29 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks