File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes Need some advice on designing a scanned document archive system. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Need some advice on designing a scanned document archive system." Watch "Need some advice on designing a scanned document archive system." New topic
Author

Need some advice on designing a scanned document archive system.

Masoud Kalali
Author
Ranch Hand

Joined: Jul 08, 2004
Posts: 531

Hi
I should design a scanned document archive .
Is it good to store images in database ? (100,000,000 scanned image)
or its better to store string which point to image in file system .
how about converting all images to SCV and storing them in database?

what is best practice for this situation.


thank you very much.


Masoud Kalali
Software Engineer - My Weblog - GlassFish Security
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30050
    
149

Masoud,
It depends on the requirements. I prefer to store the actual images in the db unless there is a compelling reason not to.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
Masoud,

Images sometimes associated with some record. For example, we have some patients in our DB and there are some x-ray images of each patient associated with the patient. So, there should be some parent-child kind of relationship between the patients and the x-ray images. Now suppose if some user deletes a record of patient then the images belongs to that patient should be deleted with that record, or if not then the patient should not get deleted at all.

Hence if we store images in file system instead of DB, then it would result in lack of integrity. Say, user deletes a patient record, all the image name strings, refering to that patient, are also get deleted, but the actual images are still there. One more case results in real bad. Suppose somebody deletes the image from the file system, but the image name is there in the DB, then the system will look for the actual image and an exception will occur.

Bottomline is store the images in DB, as Jeanne said.
[ February 23, 2005: Message edited by: Adeel Ansari ]
Masoud Kalali
Author
Ranch Hand

Joined: Jul 08, 2004
Posts: 531

Hi
Thank you very much for your help.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Need some advice on designing a scanned document archive system.
 
Similar Threads
image repository in DB
How Can I use web services for the following requirements?
Scan item code and store in the database
Image Storage Suggestions needed
Saving images in database from servlet