473,401 Members | 2,127 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,401 software developers and data experts.

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], [PictureDescription]
-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 2303
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********@gmail.com wrote in news:1146545611.590503.309340
@v46g2000cwv.googlegroups.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...@gmail.com wrote in news:1146545611.590503.309340
@v46g2000cwv.googlegroups.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?


No, why?

May 2 '06 #4

<ar********@gmail.com> wrote in message
news:11**********************@j33g2000cwa.googlegr oups.com...
arthurj...@gmail.com wrote in news:1146545611.590503.309340
@v46g2000cwv.googlegroups.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?


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********@gmail.com wrote in news:1146551249.018991.184210
@j33g2000cwa.googlegroups.com:
arthurj...@gmail.com wrote in news:1146545611.590503.309340
@v46g2000cwv.googlegroups.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?


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 Expert 8TB
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], [PictureDescription]
-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
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...
8
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)...
0
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...
3
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,...
10
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....
9
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...
10
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...
3
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...
7
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
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,...
0
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...
0
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,...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
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,...
0
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...

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.