Searching is a good difference to note.  Editing could be as well, but the
same could be said about text data.  No doubt it's something you want to be
careful about.  But the point is that just as there are some reasons to
consider not storing images in a DB, there are reasons to consider doing it.
As with most things, your needs and priorities will dictate your choice.
 
Josh

  _____  

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mischa
Uppelschoten ext 10
Sent: Thursday, January 18, 2007 3:38 PM
To: Web Site
Subject: re[2]: [ACFUG Discuss] Image from DB


I beg to differ. Text may need to be searched and edited, images cannot
(easily) be searched or edited when placed in a db. Also, almost all my
images happen to be larger than 8k, the limit for what fits in a record for
SQL server, so they are placed in a different area, slowing retrieval down.
I realize that's just my personal situation.
/m
 
 
: Sure  it's data management.  You could keep text data on the file system
too
:  but  you typically don't--unless maybe it's a lot of text, right?  Images
are
:  no  different--if they're not that big, why complicate matters by storing
:  them on  the file system?  You're already having to do a DB lookup to
know
:  what to  retrieve--that's the crucial difference between "page furniture"
and
:  data.   But whatever. 
:   
: Josh
:  
:  From:  <mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED]  <mailto:[EMAIL 
PROTECTED]>
[mailto:[EMAIL PROTECTED]  On Behalf Of John Mason
: Sent: Thursday, January 18, 2007 2:50  PM
: To:  <mailto:discussion@acfug.org> discussion@acfug.org
: Subject: RE: [ACFUG Discuss]  Image from DB

:  
:  
: I agree that with strict image security it is an option.  Give an image
only
:  to particular people, etc. But data management? I don't think  so, but
let's
:  just my opinion. Image security is probably the only  practical example I
can
:  think of for doing this, but there again Derrick isn't  going for that.
As
:  far as having html text and the image binary on the same  'page'...I've
never
:  send that before. 
:   
: John 
:  <mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED] 
:   
:   
:   
:  
:  
:  From:  <mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED]  <mailto:[EMAIL 
PROTECTED]>
[mailto:[EMAIL PROTECTED]  On Behalf Of Josh Adams
: Sent: Thursday, January 18, 2007 2:42  PM
: To:  <mailto:discussion@acfug.org> discussion@acfug.org
: Subject: RE: [ACFUG Discuss]  Image from DB

:  
:  
: Not  true--there can be a benefits:  data management & security.   Derrick
:  started this whole discussion on the BlueDragon Interest list.  I  guess
he
:  brought it here because no one could tell him a technique for doing  what
he
:  wanted on that list.  But over there just as here, people asked the  "why
:  would you do that?" question about storing images in the DB.  An good
rule
:  of thumb was put forth:  if it's "page furniture," keep it in the file 
:  system; if it's data, keep it in the DB.  If it's data, use your data 
:  management tool (a.k.a. your database) to manage it--why reinvent the
wheel?
:   On the security side of things, note that by using <img 
:  src=".../myheaderimage.cfm">, you can implement all the same security you

:  would for any other resource your app serves up. 
:   
: Josh
:  
:  From:  <mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED]  <mailto:[EMAIL 
PROTECTED]>
[mailto:[EMAIL PROTECTED]  On Behalf Of John Mason
: Sent: Thursday, January 18, 2007 10:27  AM
: To:  <mailto:discussion@acfug.org> discussion@acfug.org
: Subject: RE: [ACFUG Discuss]  Image from DB

:  
:  
: Honestly, there's not really a benefit per se. There might  be a rare case
now
:  and then for doing this, but really you should probably just  use the
:  filesystem for what it's design for, storing files. 
:   
: John 
:  
:  
:  From:  <mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED]  <mailto:[EMAIL 
PROTECTED]>
[mailto:[EMAIL PROTECTED]  On Behalf Of Fennell, Mark P.
: Sent: Thursday, January 18, 2007  10:22 AM
: To:  <mailto:discussion@acfug.org> discussion@acfug.org
: Subject: RE: [ACFUG  Discuss] Image from DB

:  
:  
: I'm  just curious. What are the benefits of storing the image in the db
rather
:  than  storing the file on the filesystem and the path in the db? I mean,
for
:  a web  page, all you need is the <img> and the path. I can understand how
it 
:  might be useful in some VB or C or Java app where the client doesn't
display 
:  images with such ease, but for a web app...? Thanks. 
: mf 
: -----Original Message-----
: From:  <mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> [mailto:[EMAIL PROTECTED] Behalf Of John Mason
: Sent:  Thursday, January 18, 2007 10:16 AM
: To:   <mailto:discussion@acfug.org> discussion@acfug.org
: Subject: RE: [ACFUG Discuss] Image from  DB

:  
: I believe there would still be three http requests here.  The images would
:  still be called up in the html like <img src="">  right? Sorry but in
http
:  that would still create seperate http  requests. 
:  
: John 
:  <mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED] 
:   
:  
:  
:  From:  <mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED]  <mailto:[EMAIL 
PROTECTED]>
[mailto:[EMAIL PROTECTED]  On Behalf Of Derrick Peavy
: Sent: Thursday, January 18, 2007  9:35 AM
: To:  <mailto:discussion@acfug.org> discussion@acfug.org
: Subject: [ACFUG Discuss]  Image from DB

:  
: Probably an easy problem for someone...  

:  
: I want to put two small images in my database and then output them in my
app,
:  so that they do not constitute additional http requests. Consider it an 
:  experiment - I know that it may seem a bit silly. The goal is for the
entire 
:  page to be delivered to the browser in one http request, instead of 3
(two 
:  images and one cf page) without doing any Apache tinkering. I have looked

:  around the net for answers and cannot seem to make this work.  

:  
: Database field is "imageFile" of type BLOB in MySQL 4.1.13. What is the 
:  proper way to insert the image?  

:  
: Example: INSERT into Images (imageFile) values ('#base64(image)#') 
: -Or- 
: Example: INSERT into Images (imageFile) values ('#image#') 

:  
: And then of course, how do you retrieve it? Example: SELECT imageFile
FROM
:  Images WHERE imageID=1 

:  
: <cfoutput> 
: #toString(imageFile)# 
: </cfoutput> 
: -OR- 
: <cfoutput> 
: #toBinary(imageFile)# 
: </cfoutput> 

:  
: As I say, I've not been able to make this work. If I use toString(), I
simply
:  get the raw data. If I use toBinary(), I get an error that the data
cannot
:  be converted to a string. Also, using CFCONTENT is fine to output the
image,
:  but then any code after that is ignored. So, short of saving the entire
page
:  and then outputting, it, I don't see a way to use CFCONTENT. 
:  
:  

:  
: _____________  
: Derrick Peavy 
: Sales and Web Services  
: Universal Advertising 
: Phone: 404-786-5036 
: Fax: 404-370-0470  
:  <http://www.universaladvertising.com> http://www.universaladvertising.com

:  <http://www.collegeadvertising.com> http://www.collegeadvertising.com  
:  <http://www.collegeclassifieds.com> http://www.collegeclassifieds.com  
: ___________________________________ 




: -------------------------------------------------------------  
: To unsubscribe from this list, manage your profile @ 
:  <http://www.acfug.org?fa=login.edituserform>
http://www.acfug.org?fa=login.edituserform  

: For more info, see  <http://www.acfug.org/mailinglists>
http://www.acfug.org/mailinglists  
: Archive @  <http://www.mail-archive.com/discussion%40acfug.org/>
http://www.mail-archive.com/discussion%40acfug.org/  
: List hosted by FusionLink  
: -------------------------------------------------------------  
: -------------------------------------------------------------  
: To unsubscribe from this list, manage your profile @ 
:  <http://www.acfug.org?fa=login.edituserform>
http://www.acfug.org?fa=login.edituserform  

: For more info, see  <http://www.acfug.org/mailinglists>
http://www.acfug.org/mailinglists  
: Archive @  <http://www.mail-archive.com/discussion%40acfug.org/>
http://www.mail-archive.com/discussion%40acfug.org/  
: List hosted by FusionLink  
: -------------------------------------------------------------  
: ------------------------------------------------------------- 
: To  unsubscribe from this list, manage your profile @ 
:  <http://www.acfug.org?fa=login.edituserform>
http://www.acfug.org?fa=login.edituserform  

: For more info, see  <http://www.acfug.org/mailinglists>
http://www.acfug.org/mailinglists  
: Archive @  <http://www.mail-archive.com/discussion%40acfug.org/>
http://www.mail-archive.com/discussion%40acfug.org/  
: List hosted by FusionLink  
: -------------------------------------------------------------  
: ------------------------------------------------------------- 
: To  unsubscribe from this list, manage your profile @ 
:  <http://www.acfug.org?fa=login.edituserform>
http://www.acfug.org?fa=login.edituserform  

: For more info, see  <http://www.acfug.org/mailinglists>
http://www.acfug.org/mailinglists  
: Archive @  <http://www.mail-archive.com/discussion%40acfug.org/>
http://www.mail-archive.com/discussion%40acfug.org/  
: List hosted by FusionLink  
: -------------------------------------------------------------  
: ------------------------------------------------------------- 
: To  unsubscribe from this list, manage your profile @ 
:  <http://www.acfug.org?fa=login.edituserform>
http://www.acfug.org?fa=login.edituserform  

: For more info, see  <http://www.acfug.org/mailinglists>
http://www.acfug.org/mailinglists  
: Archive @  <http://www.mail-archive.com/discussion%40acfug.org/>
http://www.mail-archive.com/discussion%40acfug.org/  
: List hosted by FusionLink  
: -------------------------------------------------------------




Mischa Uppelschoten
The Banker's Exchange, Inc.
2020 Hills Avenue NW
Atlanta, GA  30318

Phone:    (404) 605-0100 ext. 10
Fax:    (404) 355-7930
Web:     <http://www.BankersX.com> www.BankersX.com
Follow this link for Instant Web Chat:
 <http://www.bankersx.com/Contact/chat.cfm?Queue=MUPPELSCHOTEN>
http://www.bankersx.com/Contact/chat.cfm?Queue=MUPPELSCHOTEN
----------------------- Original Message -----------------------
  
From: "Josh Adams"  <mailto:[EMAIL PROTECTED]>
<[EMAIL PROTECTED]>
To:  <mailto:discussion@acfug.org> <discussion@acfug.org>
Date: Thu, 18 Jan 2007 15:29:24 -0500
Subject: RE: [ACFUG Discuss] Image from DB
  
Sure it's data management.  You could keep text data on the file system too
but you typically don't--unless maybe it's a lot of text, right?  Images are
no different--if they're not that big, why complicate matters by storing
them on the file system?  You're already having to do a DB lookup to know
what to retrieve--that's the crucial difference between "page furniture" and
data.  But whatever.
 
Josh

  _____  

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of John Mason
Sent: Thursday, January 18, 2007 2:50 PM
To: discussion@acfug.org
Subject: RE: [ACFUG Discuss] Image from DB


I agree that with strict image security it is an option. Give an image only
to particular people, etc. But data management? I don't think so, but let's
just my opinion. Image security is probably the only practical example I can
think of for doing this, but there again Derrick isn't going for that. As
far as having html text and the image binary on the same 'page'...I've never
send that before.
 
John
[EMAIL PROTECTED]
 
 
 
 

  _____  

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Josh Adams
Sent: Thursday, January 18, 2007 2:42 PM
To: discussion@acfug.org
Subject: RE: [ACFUG Discuss] Image from DB


Not true--there can be a benefits:  data management & security.  Derrick
started this whole discussion on the BlueDragon Interest list.  I guess he
brought it here because no one could tell him a technique for doing what he
wanted on that list.  But over there just as here, people asked the "why
would you do that?" question about storing images in the DB.  An good rule
of thumb was put forth:  if it's "page furniture," keep it in the file
system; if it's data, keep it in the DB.  If it's data, use your data
management tool (a.k.a. your database) to manage it--why reinvent the wheel?
On the security side of things, note that by using <img
src=".../myheaderimage.cfm">, you can implement all the same security you
would for any other resource your app serves up.
 
Josh

  _____  

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of John Mason
Sent: Thursday, January 18, 2007 10:27 AM
To: discussion@acfug.org
Subject: RE: [ACFUG Discuss] Image from DB


Honestly, there's not really a benefit per se. There might be a rare case
now and then for doing this, but really you should probably just use the
filesystem for what it's design for, storing files.
 
John
 

  _____  

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Fennell, Mark P.
Sent: Thursday, January 18, 2007 10:22 AM
To: discussion@acfug.org
Subject: RE: [ACFUG Discuss] Image from DB


I'm just curious. What are the benefits of storing the image in the db
rather than storing the file on the filesystem and the path in the db? I
mean, for a web page, all you need is the <img> and the path. I can
understand how it might be useful in some VB or C or Java app where the
client doesn't display images with such ease, but for a web app...? Thanks.
mf

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of John Mason
Sent: Thursday, January 18, 2007 10:16 AM
To: discussion@acfug.org
Subject: RE: [ACFUG Discuss] Image from DB


I believe there would still be three http requests here. The images would
still be called up in the html like <img src=""> right? Sorry but in http
that would still create seperate http requests.
 
John
[EMAIL PROTECTED]
 
 

  _____  

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Derrick Peavy
Sent: Thursday, January 18, 2007 9:35 AM
To: discussion@acfug.org
Subject: [ACFUG Discuss] Image from DB


Probably an easy problem for someone... 

I want to put two small images in my database and then output them in my
app, so that they do not constitute additional http requests. Consider it an
experiment - I know that it may seem a bit silly. The goal is for the entire
page to be delivered to the browser in one http request, instead of 3 (two
images and one cf page) without doing any Apache tinkering. I have looked
around the net for answers and cannot seem to make this work. 

Database field is "imageFile" of type BLOB in MySQL 4.1.13. What is the
proper way to insert the image? 

Example: INSERT into Images (imageFile) values ('#base64(image)#')
-Or-
Example: INSERT into Images (imageFile) values ('#image#')

And then of course, how do you retrieve it? Example: SELECT imageFile FROM
Images WHERE imageID=1

<cfoutput>
#toString(imageFile)#
</cfoutput>
-OR-
<cfoutput>
#toBinary(imageFile)#
</cfoutput>

As I say, I've not been able to make this work. If I use toString(), I
simply get the raw data. If I use toBinary(), I get an error that the data
cannot be converted to a string. Also, using CFCONTENT is fine to output the
image, but then any code after that is ignored. So, short of saving the
entire page and then outputting, it, I don't see a way to use CFCONTENT.




_____________ 

Derrick Peavy

Sales and Web Services 

Universal Advertising

Phone: 404-786-5036

Fax: 404-370-0470 

http://www.universaladvertising.com 

http://www.collegeadvertising.com 

http://www.collegeclassifieds.com 

___________________________________





------------------------------------------------------------- 
To unsubscribe from this list, manage your profile @ 
http://www.acfug.org?fa=login.edituserform 

For more info, see http://www.acfug.org/mailinglists 
Archive @ http://www.mail-archive.com/discussion%40acfug.org/ 
List hosted by FusionLink <http://www.fusionlink.com>  
------------------------------------------------------------- 


------------------------------------------------------------- 
To unsubscribe from this list, manage your profile @ 
http://www.acfug.org?fa=login.edituserform 

For more info, see http://www.acfug.org/mailinglists 
Archive @ http://www.mail-archive.com/discussion%40acfug.org/ 
List hosted by FusionLink <http://www.fusionlink.com>  
------------------------------------------------------------- 
------------------------------------------------------------- 
To unsubscribe from this list, manage your profile @ 
http://www.acfug.org?fa=login.edituserform 

For more info, see http://www.acfug.org/mailinglists 
Archive @ http://www.mail-archive.com/discussion%40acfug.org/ 
List hosted by FusionLink <http://www.fusionlink.com>  
------------------------------------------------------------- 
------------------------------------------------------------- 
To unsubscribe from this list, manage your profile @ 
http://www.acfug.org?fa=login.edituserform 

For more info, see http://www.acfug.org/mailinglists 
Archive @ http://www.mail-archive.com/discussion%40acfug.org/ 
List hosted by FusionLink <http://www.fusionlink.com>  
------------------------------------------------------------- 
------------------------------------------------------------- 
To unsubscribe from this list, manage your profile @ 
http://www.acfug.org?fa=login.edituserform 

For more info, see http://www.acfug.org/mailinglists 
Archive @ http://www.mail-archive.com/discussion%40acfug.org/ 
List hosted by FusionLink <http://www.fusionlink.com>  
------------------------------------------------------------- 
------------------------------------------------------------- 
To unsubscribe from this list, manage your profile @ 
http://www.acfug.org?fa=login.edituserform 

For more info, see http://www.acfug.org/mailinglists 
Archive @ http://www.mail-archive.com/discussion%40acfug.org/ 
List hosted by FusionLink <http://www.fusionlink.com>  
-------------------------------------------------------------
------------------------------------------------------------- To unsubscribe
from this list, manage your profile @
http://www.acfug.org?fa=login.edituserform For more info, see
http://www.acfug.org/mailinglists Archive @
http://www.mail-archive.com/discussion%40acfug.org/ List hosted by
http://www.fusionlink.com
------------------------------------------------------------- 



-------------------------------------------------------------
To unsubscribe from this list, manage your profile @ 
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by http://www.fusionlink.com
-------------------------------------------------------------

Reply via email to