i have a script that accesses images on a fairly frequent basis,
however, i'm thinking that it would be better to have them in an sql
database, instead, for the same reason that it is generally preferable
to access data in an sql database over a text file. the images are
small (i don't think any exceed 350 bytes), so i don't expect it'll
put a lot of strain on the sql server.
anyway, i currently load the images using ImageCreateFromGIF, and
place them into another image with ImageCopy. if i were to place the
images in an sql server, using ImageCreateFromGif obviously wouldn't
work. so what will?
any help would be appreciated - thanks! :) 4 1792
yawnmoth wrote: i have a script that accesses images on a fairly frequent basis, however, i'm thinking that it would be better to have them in an sql database, instead, for the same reason that it is generally preferable to access data in an sql database over a text file. the images are small (i don't think any exceed 350 bytes), so i don't expect it'll put a lot of strain on the sql server.
anyway, i currently load the images using ImageCreateFromGIF, and place them into another image with ImageCopy. if i were to place the images in an sql server, using ImageCreateFromGif obviously wouldn't work. so what will?
any help would be appreciated - thanks! :)
actually, from a DBA point of view, I would just store a pointer to the
file in the database and read it when necessary... doing BLOBS, CLOBS
etc in a db is nice, but can get real messy when trying to manage that
space -- especially if you are not a "real" dba and you are not real
sure what you are doing or how to do it...
Michael Austin.
In article <iq***************@newssvr24.news.prodigy.com>, ma*****@firstdbasource.com says... yawnmoth wrote: i have a script that accesses images on a fairly frequent basis, however, i'm thinking that it would be better to have them in an sql database, instead, for the same reason that it is generally preferable to access data in an sql database over a text file. the images are small (i don't think any exceed 350 bytes), so i don't expect it'll put a lot of strain on the sql server.
anyway, i currently load the images using ImageCreateFromGIF, and place them into another image with ImageCopy. if i were to place the images in an sql server, using ImageCreateFromGif obviously wouldn't work. so what will?
any help would be appreciated - thanks! :)
actually, from a DBA point of view, I would just store a pointer to the file in the database and read it when necessary... doing BLOBS, CLOBS etc in a db is nice, but can get real messy when trying to manage that space -- especially if you are not a "real" dba and you are not real sure what you are doing or how to do it...
Indeed - blobs and globs are space wasters. You're better of pointing to
a file that contains the image. But again, it would take the pointer
size + file size whereas with a blob/glob you eliminate the need for
that pointer.
On Sun, 30 May 2004 02:12:30 GMT, Michael Austin <ma*****@firstdbasource.com>
wrote: yawnmoth wrote: i have a script that accesses images on a fairly frequent basis, however, i'm thinking that it would be better to have them in an sql database, instead, for the same reason that it is generally preferable to access data in an sql database over a text file. the images are small (i don't think any exceed 350 bytes), so i don't expect it'll put a lot of strain on the sql server.
anyway, i currently load the images using ImageCreateFromGIF, and place them into another image with ImageCopy. if i were to place the images in an sql server, using ImageCreateFromGif obviously wouldn't work. so what will?
any help would be appreciated - thanks! :)
actually, from a DBA point of view, I would just store a pointer to the file in the database and read it when necessary... doing BLOBS, CLOBS etc in a db is nice, but can get real messy when trying to manage that space -- especially if you are not a "real" dba and you are not real sure what you are doing or how to do it...
Whilst that's often true, just to put the other side of the argument across -
if you do store images in the database, then you only have one thing to backup,
and so it greatly simplifies the problems of the database and the filesystem
getting out of sync. Also, your images then have the same transactional
guarantees as your data.
Depends how important your images are, and whether your database can handle
the volume. A cache on the filesystem (with the database as the master) can
alleviate some of the load if you did store in the database.
You're right that for most websites storing the path to the image is the way
to go.
--
Andy Hassall <an**@andyh.co.uk> / Space: disk usage analysis tool http://www.andyh.co.uk / http://www.andyhsoftware.co.uk/space
On Fri, 28 May 2004 23:55:03 GMT, yawnmoth <te*******@yahoo.com> wrote: i have a script that accesses images on a fairly frequent basis, however, i'm thinking that it would be better to have them in an sql database, instead, for the same reason that it is generally preferable to access data in an sql database over a text file. the images are small (i don't think any exceed 350 bytes), so i don't expect it'll put a lot of strain on the sql server.
anyway, i currently load the images using ImageCreateFromGIF, and place them into another image with ImageCopy. if i were to place the images in an sql server, using ImageCreateFromGif obviously wouldn't work. so what will?
any help would be appreciated - thanks! :)
Look up imagecreatefromstring - creates GD image resources from binary data
stored in strings.
--
Andy Hassall <an**@andyh.co.uk> / Space: disk usage analysis tool http://www.andyh.co.uk / http://www.andyhsoftware.co.uk/space This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Michael Walton |
last post by:
I need some help, because I am utterly confused with how to do this. I have
2 things that I need to figure out, and could use some sample code or just
some general direction:
1) I need to build...
|
by: davestrike |
last post by:
I have seen many postings regarding asp. sql and images. One posting
on another group stated that images (jpg, etc) can be called by a db
instead of being stored on the db.
I am asking for some...
|
by: meyvn77 |
last post by:
Hello -
I am looking for the best way to store images in a Access DB.
My Idea -
I have a table with 150,000 records. These recoreds represent a Crash
(Traffic Accident).
I have 50 different...
|
by: Neo Geshel |
last post by:
I am seeking to hand-roll my own blog in ASP.NET 2.0 and SQLExpress
2005. Why? Because I can. Because I will gain experience.
The one thing that has me stumped at square one is inline images....
|
by: steelghost |
last post by:
I'm currently trying to store images into my DB. But the collation used
on my DB is big5, since my client wants this default encoding on their
webpage.
So to be able read the retreived data I have...
|
by: Spondishy |
last post by:
Hi,
I've taken over a publishing application that stores images in a sql
server db. The architecture is basically many load balanced web servers
connecting to the db. When an image is pulled...
|
by: charlesg |
last post by:
I am seriously i need for a solution to this problem fast.I have just inherited an SQL server DB where the images were stored in the database using a table mandatepictures.The images column is...
|
by: eholz1 |
last post by:
Hello Members,
I am setting up a photo website. I have decided to use PHP and MySQL.
I can load jpeg files into the table (medium blob, or even longtext)
and get the image(s) to display without...
|
by: wardemon |
last post by:
Hi All,
I have a aspx page named: ImageProcess.aspx that creates a thumbnail
version of an image by passing the ImagePath, width, and height. The
ImagePath is taken from a table from a database,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |