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 ImageCreateFrom GIF, and
place them into another image with ImageCopy. if i were to place the
images in an sql server, using ImageCreateFrom Gif obviously wouldn't
work. so what will?
any help would be appreciated - thanks! :) 4 1818
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 ImageCreateFrom GIF, and place them into another image with ImageCopy. if i were to place the images in an sql server, using ImageCreateFrom Gif 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.n ews.prodigy.com >, ma*****@firstdb asource.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 ImageCreateFrom GIF, and place them into another image with ImageCopy. if i were to place the images in an sql server, using ImageCreateFrom Gif 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*****@firstd basource.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 ImageCreateFrom GIF, and place them into another image with ImageCopy. if i were to place the images in an sql server, using ImageCreateFrom Gif 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*******@yaho o.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 ImageCreateFrom GIF, and place them into another image with ImageCopy. if i were to place the images in an sql server, using ImageCreateFrom Gif obviously wouldn't work. so what will?
any help would be appreciated - thanks! :)
Look up imagecreatefrom string - 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 an admin page that allows me to browse to the file that I
want stored in SQL Server 2000 in an image field, have it uploaded to the
server, and then stored in the db. I see this done all the time, so I don't
think this part is too hard, but I'm...
|
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 help with coding such a thing. What I want to do
is include in the db the location (url) for the image so I can add it
a pserson's record set and then be able to have it called from the db
to post on a web page.
This is for an awards system.
|
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 images that represent almost any type of Accident.
Each crash record can be represented by one of those 50 images
(depending on the Crash Data).
I don't want to waste space by having each record have a BLOB field w/
|
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. That
is, images inline with the actual content of the blog itself. Is there
an example that I can be pointed to, where I can examine some code and
figure out how to do this? Frankly I haven't got a clue, aside from
breaking the content up into...
|
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 to use the command
mysql_query('SET NAMES big5');.
But when I do this, I'm not able to save the images to my DB. When I
attempt to, I recieve an SQL Error stating:
"You have an error in your SQL syntax; check the manual that
| |
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 from the db it uses an
aspx page similar to this <img src="image.aspx?imgid=1" />
I realise there are trade offs between performance security etc, but I
think this is going to be a bottleneck in the app going forward. Is
there anything I can do to...
|
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 called pictures and the data type is binary.From information i have gathered from this forum and the problems i see on ground, i have decided that the way to go is to store this images on the filesystem and refernce the path on a databse table field.
The...
|
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 a problem. I am using
chunk_split(data) and the base64_encode and base64_decode on the files.
I do a select from the database, and then echo the image (with
header(Content Type: image/jpeg)
and the decoded image displays fine. Yes, I have...
|
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, while width and
height is user specific - meaning user can change this on demand.
My question is, although this rendering images on the fly is cool, I
would like to implement some sort of mechanism/logic that it wont keep
rendering the thumbnail...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |