Database – Does a data-driven application need a database

databasedesktop application

This may be a terribly stupid question, but I can't find anything even related on Google (maybe I am not searching properly). I've been a developer for around a year now. I do desktop and web apps using Visual Studio at my day job and use a WAMP setup for freelancing. For storing data I have either used a database or not. What I mean is that if the program stores data for longer than the app runs then I use a database; that's all I know. Here's the thing, I have always worked with existing databases for desktop apps. I have never made a desktop app from scratch (the programming part yes, but the database has just always been there and on a local server somewhere for the app to pull from).

I want to develop a desktop application that would need a database. My question is how does that process work? In providing the application do I supply the database, say SQLserver, or is there another way in which that works?

To be clear: The application would need to store your typical customer information, files, possibly images, payment information – which I know a database would provide, but I do not know how that works once you sell and install the application. I know other applications do these sorts of things – quickbooks, email clients, etc. How do they do it with just an install?

Best Answer

There are lots of ways to persist data in a desktop application.

A database is one choice. You would probably have to provide an installer unless you're using a file based database such as SQLite.

You might also just write to a file - either a text file, an XML file, serializing objects, etc.

On a side note, while it is possible to store images in a database, it's been my experience that it's more trouble than it's worth. I tend to write them as files to a folder then track them some other way (database, etc).

Related Topic