Newbie question: _best_ way to store (and retrieve) picture data in a HSQLDB database?

View: New views
2 Messages — Rating Filter:   Alert me  

Newbie question: _best_ way to store (and retrieve) picture data in a HSQLDB database?

by Ken McDonald :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I'm confident from looking over the API that I can figure out _a_ way  
to do it, but it probably wouldn't be anywhere near ideal. A search of  
the mailing list archives revealed relatively old answers, so I  
thought that, especially with a pretty new release of HSQLDB out, this  
question was probably reasonable again.

This would be for a database that is integrated directly into the  
program (not using a server). Basically, it's a photo album. Yeah, I  
know, kinda boring, but something I've wanted to do for a while, and  
I'm using it to learn Scala, which is also cool.

Thanks,
Ken

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Hsqldb-user mailing list
Hsqldb-user@...
https://lists.sourceforge.net/lists/listinfo/hsqldb-user

Re: Newbie question: _best_ way to store (and retrieve)picture data in a HSQLDB database?

by Bayless Kirtley :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hey Ken,

I had a similar thing a few months ago. I wanted to include a photo album
as part of a larger project that also uses an embedded database. I decided
to maintain the photos out of the database and just use links or urls in the
database to point to the photos. The following were my reasons.

1. The project and its database can be fairly active while the photos tend
    to just get added and never or rarely changed or removed.
2. I wanted to keep pretty current backups and photos are generally much
    larger than their associated data records.
3. Since the photos just get added and not changed, it is only necessary to
    backup each one once as it is added to the system.
4. The database must be backed up as a whole each time.
5. By storing the photos separately, I reduced the daily backup from over
    125MB to under 20MB.
6. While it is true that the photos also have to be backed up, it is only
done
    one time instead of every day.

This saves a lot of time and media. In addition, it provides some other
benefits, particularly in updating the database, that are a little more
involved
than the above items.

Hope this helps.
Bayless

----- Original Message -----
From: "Kenneth McDonald" <kenneth.m.mcdonald@...>
To: <hsqldb-user@...>
Sent: Tuesday, May 06, 2008 9:47 PM
Subject: [Hsqldb-user] Newbie question: _best_ way to store (and
retrieve)picture data in a HSQLDB database?


> I'm confident from looking over the API that I can figure out _a_ way
> to do it, but it probably wouldn't be anywhere near ideal. A search of
> the mailing list archives revealed relatively old answers, so I
> thought that, especially with a pretty new release of HSQLDB out, this
> question was probably reasonable again.
>
> This would be for a database that is integrated directly into the
> program (not using a server). Basically, it's a photo album. Yeah, I
> know, kinda boring, but something I've wanted to do for a while, and
> I'm using it to learn Scala, which is also cool.
>
> Thanks,
> Ken
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
> Don't miss this year's exciting event. There's still time to save $100.
> Use priority code J8TL2D2.
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> _______________________________________________
> Hsqldb-user mailing list
> Hsqldb-user@...
> https://lists.sourceforge.net/lists/listinfo/hsqldb-user


--------------------------------------------------------------------------------



No virus found in this incoming message.
Checked by AVG.
Version: 8.0.100 / Virus Database: 269.23.9/1418 - Release Date: 5/6/2008
5:17 PM


-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Hsqldb-user mailing list
Hsqldb-user@...
https://lists.sourceforge.net/lists/listinfo/hsqldb-user
LightInTheBox - Buy quality products at wholesale price