Some applications, be it desktop or web, require working
with images. Aptly speaking, the good paradigm is banking applications. Withdrawal
of an amount of money from a bank account requires signature verification of
the account holder. Normally, specimen signatures of customers are archived as
images in such applications.
There can be a couple of ways to work around to store
images. One is typically to tag each image with a unique identifier and save
the image at a physical location accessible by the application. Store that
unique identifier and the physical absolute/relative path in a database table. Now,
when the application looks in for a given identifier from database table then
the path against the identifier can be pulled from the table and uses that path
in any image control to display the image.
A little tweak in the approach renders more scalability,
dependability and boost application’s security with playing around images.
In the second approach, images can be stored in database in
bytes, assigning each image with a unique identifier. For a quick tour of this
approach we can use SQL Server database and a .NET application.
Let us discuss the advantages of the later approach than
that of the previous one.
Storing images in byte format in database enforce security
and let the application implement access privileges to users of the images.
The database administrator can manage read-only/write
permission to database table once images are stored.
This approach prevents users from interacting with physical
image files and does not require file read write permission to a specific
directory on the file system and reduce the burden on file I/O.