Unix Technical Forum

Storing photos - I'm looking for advice.

This is a discussion on Storing photos - I'm looking for advice. within the Informix forums, part of the Database Server Software category; --> We have a need to store photos with our application. While I know I can use a blob for ...


Go Back   Unix Technical Forum > Database Server Software > Informix

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-19-2008, 08:28 PM
Fred Prose
 
Posts: n/a
Default Storing photos - I'm looking for advice.

We have a need to store photos with our application. While I know I
can use a blob for this data type I'm looking for alternative
suggestions for folks who have similar applications.

We are a "fat client", Powerbuilder application, with AIX as the
Informix Server.

One concept I had kicked around was to store a path (or hyperlink)
within a table and physically store the photo outside the actual
Informix database as a standard JPG file. We do a lot of database
exports and imports and blobs don't behave all that well - nor are
they performant in this scenario.

One choice would be to use a NT server accessable to the clients and
have PowerBuilder access the NT system directly.

A second choice would be to store the JPG on an AIX file system. I'm
not sure if PowerBuilder could touch this directly, but I had thought
you could shell the program to FTP the file?

A third choice might be to have the client program call a database
stored procedure, passing the AIX path to the JPG, and have the stored
procedure return the blob. However, I'm not sure how I would "read"
the JPG into the Stored Procedure. How feasible do you think this is?

Thanks for your consideration.

Fred Prose
AZ Supreme Court
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-19-2008, 08:29 PM
Richard Spitz
 
Posts: n/a
Default Re: Storing photos - I'm looking for advice.

fprose@hotmail.com (Fred Prose) schrieb:

>We have a need to store photos with our application. While I know I
>can use a blob for this data type I'm looking for alternative
>suggestions for folks who have similar applications.


That sounds very familiar.

>One choice would be to use a NT server accessable to the clients and
>have PowerBuilder access the NT system directly.
>
>A second choice would be to store the JPG on an AIX file system. I'm
>not sure if PowerBuilder could touch this directly, but I had thought
>you could shell the program to FTP the file?


Out of the same considerations about BLOBs, we decided against them.
Our solution is to store the photos in a network folder that is
by default accessible to all our Windows clients. The network
share is mounted by all clients upon logon via a startup script,
so the path is always the same. The photos are stored with a file
name that contains the primary key (employee id in this case), so
it is easy to identify the file name from within the application.

It doesn't really matter where you store your files, Windows server
or AIX server. If you use the latter, you need Samba on the AIX
machine or an NTFS client for Windows.

HTH, Richard

--
+-------------------------------+-------------------------------+
| Dr. med Richard Spitz | Tel : +49-89-7095-6110 |
| Klinik für Anaesthesiologie | FAX : +49-89-7095-6420 |
| Klinikum der Univ. München | Page: +49-89-7095-789-2116 |
| 81366 München, Germany | |
+-------------------------------+-------------------------------+
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-19-2008, 08:37 PM
Alejandro
 
Posts: n/a
Default Re: Storing photos - I'm looking for advice.

Well, these day I've working with photos of students on my IDS 2000 on
Windows NT 4 and Power Builder 7.x.

You can store the images as blob data type in the database.
First you must to insert the row, and then, from power builder read
the archive which has the image (jpg, bmp, etc..) convert it to a blob
variable and then do the next sentence to store it:

blob lb_picture

......

UPDATEBLOB table_with_blob_column
set picture = :lb_picture
WHERE ....;

That's all!

I'm working with IDS 7.3x and IDS 2000 9.2x on Windows NT and W2000
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 11:11 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com