473,549 Members | 2,715 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Handling images in a database

I am creating a database that will have a large number of images in it and I
would like some input as to the best way to handle them.

Each record in my database will have a one-to-many relationship with a
Pictures table, i.e. there will be several pictures for each record in my
main table.

There are several things that I would like to be able to do with this setup,
and this is what I am thinking:

I create the table 'Pictures' with the following fields...[PictureID],
[MainTableID], [PictureFile], [PictureDescript ion]
-PictureID is an autonumber, primary key
-MainTableID links the pictures to the Main Table
-PictureFile would be the name of the picture file that is stored in a set
directory on the hard drive. Ideally, I would like this to be only the name
of the file, i.e. picture1.jpg, picture2.jpg, etc., and not an actual path.
-Picture Description would be a text field with the pictures description in
it

There would be a form where the Main Table is the record source. On this
form would be a subform for Pictures.

The Pictures subform would have 3 item on it. The first would be a text box
for [PictureFile] where users would enter the filename. Once they leave this
field, the image that corresponds to that filename would appear in another
control. The third item would be a text box for the pictures description.
Obviously I would need some code in the OnExit event for the [PictureFile]
text box that would somehow read the image from the hard drive and show it
on the form.

I hope that I have explained this clearly, if not, just holler. Otherwise,
does this sound like an acceptable, efficient way to handle a large number
of pictures in a database? Does it sound like it can be done? Any other
thoughts or suggestions, either on doing it this way, or another way that
may be eisier or better?

Thanks,
Robert

Apr 30 '06 #1
8 2325
In my opinion, it is better if you will save
the picture to the database and not the filename
only.

May 2 '06 #2
ar********@gmai l.com wrote in news:1146545611 .590503.309340
@v46g2000cwv.go oglegroups.com:
In my opinion, it is better if you will save
the picture to the database and not the filename
only.


Are you with Maxtor or Western Digital?

--
Lyle Fairfield
May 2 '06 #3
>>arthurj...@gm ail.com wrote in news:1146545611 .590503.309340
@v46g2000cwv. googlegroups.co m:
In my opinion, it is better if you will save
the picture to the database and not the filename
only.

Are you with Maxtor or Western Digital?


No, why?

May 2 '06 #4

<ar********@gma il.com> wrote in message
news:11******** **************@ j33g2000cwa.goo glegroups.com.. .
arthurj...@g mail.com wrote in news:1146545611 .590503.309340
@v46g2000cwv .googlegroups.c om:
In my opinion, it is better if you will save
the picture to the database and not the filename
only.


Are you with Maxtor or Western Digital?


No, why?

Create an Access database, import a picture into it and see how much it
grows.

Are you with Segate instead?
May 2 '06 #5
ar********@gmai l.com wrote in news:1146551249 .018991.184210
@j33g2000cwa.go oglegroups.com:
arthurj...@g mail.com wrote in news:1146545611 .590503.309340
@v46g2000cwv .googlegroups.c om: In my opinion, it is better if you will save
the picture to the database and not the filename
only.

Are you with Maxtor or Western Digital?


No, why?


Just a guess!

--
Lyle Fairfield
May 2 '06 #6
>> In my opinion, it is better if you will save
the picture to the database and not the filename
only.
Are you with Maxtor or Western Digital?


ROTFL :-)

--
PBsoft di Gabriele Bertolucci
www.pbsoft.it
skype: pbsoftsolution
May 2 '06 #7
with 100 records of 50K images stored in BLOB fields,
the database grew to more than 4 MB.
The same database using file pointers instead was under 100K.

Access has 2G capacity, so, you can save 50,000 images using BLOB
and 2,000,000 images with file pointer.

Each method has advantages and disadvantages
http://msdn.microsoft.com/library/de...tml/gs0102.asp

I guess i give up my opinion.

May 2 '06 #8
ADezii
8,834 Recognized Expert Expert
I am creating a database that will have a large number of images in it and I
would like some input as to the best way to handle them.

Each record in my database will have a one-to-many relationship with a
Pictures table, i.e. there will be several pictures for each record in my
main table.

There are several things that I would like to be able to do with this setup,
and this is what I am thinking:

I create the table 'Pictures' with the following fields...[PictureID],
[MainTableID], [PictureFile], [PictureDescript ion]
-PictureID is an autonumber, primary key
-MainTableID links the pictures to the Main Table
-PictureFile would be the name of the picture file that is stored in a set
directory on the hard drive. Ideally, I would like this to be only the name
of the file, i.e. picture1.jpg, picture2.jpg, etc., and not an actual path.
-Picture Description would be a text field with the pictures description in
it

There would be a form where the Main Table is the record source. On this
form would be a subform for Pictures.

The Pictures subform would have 3 item on it. The first would be a text box
for [PictureFile] where users would enter the filename. Once they leave this
field, the image that corresponds to that filename would appear in another
control. The third item would be a text box for the pictures description.
Obviously I would need some code in the OnExit event for the [PictureFile]
text box that would somehow read the image from the hard drive and show it
on the form.

I hope that I have explained this clearly, if not, just holler. Otherwise,
does this sound like an acceptable, efficient way to handle a large number
of pictures in a database? Does it sound like it can be done? Any other
thoughts or suggestions, either on doing it this way, or another way that
may be eisier or better?

Thanks,
Robert
I've had a situation very similiar to yours in that I created an Inventory System that displays a Graphic Image for almost every item in Inventory. I initially stored the images internally in the form of *.jpgs but in a relatively short period of time I had to take a 360 degree shift in logic because the size of the database was getting out of hand. Within the Current() Event of the Main Inventory Form, I now load the graphic images dynamically into an Image Control using a system of Global Variables and LoadPicture(). The result was a drastic incease in efficiency and a phenomenal decrease in the size of the DB. Hope this helps....
May 3 '06 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
4204
by: Ulrike | last post by:
I need to bind in (thumbnail-sized) pictures into an Access Database in such a way that there is one picture for each record (abt. 3000 records on the whole). Ideally, the pictures should show on the Form. Until now, I have embedded OLE-objects and have inserted each picture manually in the records - but the pictures do not show in the Forms....
8
2311
by: Tim Geiges | last post by:
Since I am being challenged with learning c# I figured I could pass some of the pain on to you guys :-) I have another question(this one is important for me to fix before I can get my app to Beta) My app (an image viewer) opens with a Main form with a file explorer if you open the program with the exe, but opens with the ImageView form if...
0
881
by: Liddle Feesh | last post by:
Good afternoon m.p.d.l.vb :) I'm looking for some sound system design ideas. I'm planning to build an application in VB.NET that interfaces with MSDE for a local estate agency (realtor in the US!). I have about one month to create this application. Has anyone created a client-server application interfacing images as BLOBS to an MSDE...
3
2248
by: rangermccoy | last post by:
Hello there, What are the best php/c libraries for handling media including images, video, and music? I would like to manipulate media dfiles, including watermarking, thumbnailing, truncating, etc. I know there's the GD llibrary for images.
10
2300
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 ...
9
3818
by: Wayne Smith | last post by:
I've come up against a major headache that I can't seem to find a solution for but I'm sure there must be a workaround and I would really be grateful of any help. I'm currently building a web site for a small club I belong to and one of the features I would like to include is the ability to allow users to upload image files. ...
10
13389
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...
3
2457
by: najimou | last post by:
Hi everyone I will be having a split database, running on 2 computers via mapped drive. computer "A" will have one front end and the back end located in c: \mydatabse 2 tables have links to many images stored as c:\mydatabse\images \images.jpg so computer A has no problem accessing the picture
7
1977
by: Keith Hughitt | last post by:
Hi all, I am having trouble preloading images in a javascript application, and was wondering if anyone had any suggestions. Basically I have a bunch of images stored in a database as BLOBs. At any given point in time a subset of those images is displayed on- screen. At certains times I want to swap out those on screen with new ones from...
0
7446
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...
0
7715
Oralloy
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. ...
1
7469
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...
1
5368
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3498
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...
0
3480
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1935
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
1
1057
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
757
bsmnconsultancy
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.