Subject | Re: does anybody know some source-code of a manager of images? |
---|---|
Author | Adam |
Post date | 2005-11-01T23:35:18Z |
Marcelo,
I was almost not going to answer ;)
(just kidding)
What connection components are you currently using to connect to
Firebird? If you have not yet selected any, check out www.fbtalk.net
and click Delphi. There is a list of some components you can use.
Basically you can create a BLOB field for the data. Most components
will support paramatised queries, so something like this:
insert into test (id, picture)
values (:id, :picture);
You can then define picture as a ftBLOBField or equivalent.
qry.ParamByName('Picture').LoadFromFile(....)
or LoadFromStream etc
and then run the query, pretty simple.
Make sure the database server can physically handle the increase in
size. You are adding at least 2.5 - 50MB worth of data per patient.
You will need to conduct appropriate load testing etc to make sure
you don't run into any issues.
You can put whatever you want in a BLOB field. It is a collection of
bytes, however you may need to store the type somewhere so the client
program can then know what to do with the data (or use the blob
subtype to define each field).
Compression will probably be very useful for bmp, all the other
formats you listed it is just a waste of time, save maybe 1% space
(if that).
Adam
--- In firebird-support@yahoogroups.com, Marcelo Machado
<machado6655@y...> wrote:
support Dell computer technical support
I was almost not going to answer ;)
(just kidding)
What connection components are you currently using to connect to
Firebird? If you have not yet selected any, check out www.fbtalk.net
and click Delphi. There is a list of some components you can use.
Basically you can create a BLOB field for the data. Most components
will support paramatised queries, so something like this:
insert into test (id, picture)
values (:id, :picture);
You can then define picture as a ftBLOBField or equivalent.
qry.ParamByName('Picture').LoadFromFile(....)
or LoadFromStream etc
and then run the query, pretty simple.
Make sure the database server can physically handle the increase in
size. You are adding at least 2.5 - 50MB worth of data per patient.
You will need to conduct appropriate load testing etc to make sure
you don't run into any issues.
You can put whatever you want in a BLOB field. It is a collection of
bytes, however you may need to store the type somewhere so the client
program can then know what to do with the data (or use the blob
subtype to define each field).
Compression will probably be very useful for bmp, all the other
formats you listed it is just a waste of time, save maybe 1% space
(if that).
Adam
--- In firebird-support@yahoogroups.com, Marcelo Machado
<machado6655@y...> wrote:
>possible
> Sorry,
>
> Adam (m)
>
> ;-}
>
>
>
>
>
>
> Marcelo Machado <machado6655@y...> wrote:and...
>
> I would like to store images in jpg, mpg (shorts movies) an bmp if
>50 images.
> ;-}
>
>
>
> Marcelo Machado <machado6655@y...> wrote:
> Thanks Adan for reply.
>
> My application this being developed in Delphi.
> I would like to store the images directly in the database.
> The same ones would have between 50kb and 1mb.
> Each registration (patient in that case) would have between 20 and
>Marcelo Machado
> best regards,
>
> Marcelo
>
> Ps.: (Excuse my terrible English!)
>
>
>
> Adam <s3057043@y...> wrote:--- In firebird-support@yahoogroups.com,
> <machado6655@y...> wrote:the
> >
> > Dear friends,
> >
> > Something simple that stores pictures in a bank firebird (already
> developed)
> >
> > I need to store some 50 pictures for registration in the bank
> >
>
> Marcello
>
> Giving your programming language would help people respond with
> something you can use. Also you need to say what expected formats
> pictures will be (.jpg / .png / .gif / .psd / .tif / etc). Is it 50,to
> or 50 per customer, and if 50 per customer, how many customers? What
> is the average file size of the pictures.
>
> You need to decide whether to store the pictures in the database or
> simply store a path to the pictures in the database, and manage theback
> pictures within the local file system.
>
> Both methods have pros and cons.
>
> If you store the pictures inside the database, you need to make sure
> that backups are not taking compromisingly longer. Firebird 2 will
> introduce incremental backups, but until then backup will have to
> everything up. You would use a BLOB field to store it, I wouldsuggest
> for jpg not to worry about compression. You will then have totrouble
> the database if you want to email someone a picture, whereas if itwas
> in the file system, you could just go to it directly.have
>
> If you go the other way, then you need to understand that many OS
> implementation limitations on the maximum pictures per folder, wheresimple.
> performance starts getting really bad if you have too many more.
>
> Once this has been decided, then either way the code is pretty
>Service.
> Adam
>
>
>
>
>
>
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Visit http://firebird.sourceforge.net and click the Resources item
> on the main (top) menu. Try Knowledgebase and FAQ links !
>
> Also search the knowledgebases at http://www.ibphoenix.com
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
>
>
>
> ---------------------------------
> YAHOO! GROUPS LINKS
>
>
> Visit your group "firebird-support" on the web.
>
> To unsubscribe from this group, send an email to:
> firebird-support-unsubscribe@yahoogroups.com
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of
>technical support Compaq technical support Microsoft technical
>
> ---------------------------------
>
>
>
>
>
> ---------------------------------
> Yahoo! FareChase - Search multiple travel sites in one click.
>
> [Non-text portions of this message have been removed]
>
>
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Visit http://firebird.sourceforge.net and click the Resources item
> on the main (top) menu. Try Knowledgebase and FAQ links !
>
> Also search the knowledgebases at http://www.ibphoenix.com
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
>
>
>
> SPONSORED LINKS
> Technical support Computer technical support Compaq computer
support Dell computer technical support
>Service.
> ---------------------------------
> YAHOO! GROUPS LINKS
>
>
> Visit your group "firebird-support" on the web.
>
> To unsubscribe from this group, send an email to:
> firebird-support-unsubscribe@yahoogroups.com
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of
>Service.
>
> ---------------------------------
>
>
>
>
> ---------------------------------
> Yahoo! FareChase - Search multiple travel sites in one click.
>
> [Non-text portions of this message have been removed]
>
>
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Visit http://firebird.sourceforge.net and click the Resources item
> on the main (top) menu. Try Knowledgebase and FAQ links !
>
> Also search the knowledgebases at http://www.ibphoenix.com
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
>
>
>
> ---------------------------------
> YAHOO! GROUPS LINKS
>
>
> Visit your group "firebird-support" on the web.
>
> To unsubscribe from this group, send an email to:
> firebird-support-unsubscribe@yahoogroups.com
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of
>
>
> ---------------------------------
>
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> [Non-text portions of this message have been removed]
>