Advertisement
Advertisement


How important is a database in managing information?


Question

I have been hired to help write an application that manages certain information for the end user. It is intended to manage a few megabytes of information, but also manage scanned images in full resolution. Should this project use a database, and why or why not?

2008/09/16
1
2
9/16/2008 8:52:24 PM


If the amount of data is small, or installed on many client machines, you might not want the overhead of a database.

Is it intended to be installed on many users machines? Adding the overhead of ensuring you can run whatever database engine you choose on a client installed app is not optimal. Since the amount of data is small, I think XML would be adequate here. You could Base64 encode the images and store them as CDATA.

Will the application be run on a server? If you have concurrent users, then databases have concepts for handling these scenarios (transactions), and that can be helpful. And the scanned image data would be appropriate for a BLOB.

2008/09/16

The database won't help you much in dealing with the image data itself, but anything that manages a bunch of images is going to have meta-data about the images that you'll be dealing with. Depending on the meta-data and what you want to do with it, a database can be quite helpful indeed with that.

And just because the database doesn't help you much with the image data, that doesn't mean you can't store the images in the database. You would store them in a BLOB column of a SQL database.

2008/09/16

You shouldn't store images in the database, as is the general consensus here.

The file system is just much better at storing images than your database is.

You should use a database to store meta information about those images, such as a title, description, etc, and just store a URL or path to the images.

2017/05/23

When it comes to storing images in a database I try to avoid it. In your case from what I can gather of your question there is a possibilty for a subsantial number of fairly large images, so I would probably strong oppose it.

If this is a web application I would use a database for quick searching and indexing of images using keywords and other parameters. Then have a column pointing to the location of the image in a filesystem if possible with some kind of folder structure to help further decrease the image load time.

If you need greater security due to the directory being available (network share) and the application is local then you should probably bite the bullet and store the images in the database.

2008/09/16

My gut reaction is "why not?" A database is going to provide a framework for storing information, with all of the input/output/optimization functions provided in a documented format. You can go with a server-side solution, or a local database such as SQLite or the local version of SQL Server. Either way you have a robust, documented data management framework.

2008/09/16

Source: https://stackoverflow.com/questions/76934
Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow
Email: [email protected]