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?
1 Answer 1
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).
-
Yes, I do the same with files (images, etc) in my own work. I have seen SQLite used in iOS apps. I didn't know it was used for desktop apps too. Thanks for the info. I will likely use something like SQLite.Burning Hippo– Burning Hippo2014年03月21日 02:50:41 +00:00Commented Mar 21, 2014 at 2:50
-
I agree with @Dan; for a MaxOS application I build some years ago with QT library I used the Firebird database.Andrea Girardi– Andrea Girardi2014年03月21日 09:02:51 +00:00Commented Mar 21, 2014 at 9:02