Reputation: 14883
I was thinking - let's take a look at a computer game of any kind, or any program in general. (Chrome, Skype, Warcraft,...) They need to save some things that a user wanted them to save. How do they do it? Do they save it in a simple text file, or do they pack a database system (like MySQL,...) with themselves?
Upvotes: 1
Views: 6892
Reputation: 179422
There is literally no end to the ways programs will store data. OTOH:
A single program might use multiple methods depending on what they're storing. There is no unified solution, and there is no one solution that is right for every task since every system has tradeoffs (human-readability vs. packing efficiency, random access vs. sequential archive, etc.)
Upvotes: 2
Reputation: 6606
A lot of programs use Sqlite to store data (http://www.sqlite.org). Sqlite is a very compact cross platform SQL database. Many programs do use text files.
Upvotes: 0
Reputation: 1009
That really depends on your needs. If you only need to store some key value pairs, an application can use a simple text file (e.g. an *.ini file) That however is a plain text file readable by everybody.
An application can of course also use a database like MySql, MS SQL. However, these are not very handy if you want to distribute your application as they run as a seperate service on a server and need to be installed seperately. Then, there are databases like Sqlite which is also a SQL database, but which stores everything inside a single file. Your application just needs a way to interact with this file.
Yet another way would be to serialize/deserialize an object which holds your data you want to store.
There are other ways to store data, like NoSQL databases. I personally haven't used one of those yet, but here is a listing of some of them: http://nosql-database.org/
XML could also be used.
There are endless way an application can store its data
Upvotes: 3