How can I save and retrieve images in Blob field in Oracle using C#?
Is it a good choice to use database to store image?
How can I save and retrieve images in Blob field in Oracle using C#?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Since you’re using C#, you probably want to start with Microsoft’s Working with Oracle LOBs. That has a number of examples of reading and writing LOBs to an Oracle database using the OracleLob class.
As to whether it is a good idea to use the database to store images, as with all things, it depends. Storing images in the database ensures that images are protected by transactional integrity. It provides a single place where all the images can reside that will, by definition, be accessible to all the middle tier servers. It makes it much easier to ensure that all the data is backed up and can be recovered. It ensures that no one accidentally moves an image without remembering to update the database.
On the other hand, it means that the size of the database may grow substantially and thus be harder to back up. Presumably, this is just trading database backup size for file system backup size, but this may involve shifting headaches from one group in the organization to another. It means that you can’t manage the images on the file system using file system scripts. It may make it more difficult to cache the images on the middle tier.