Database File Saving System

My question is about file saving system. I have heard that SQLite and MySQL are faster than a simple file saving system in the format of ".ini" or other... is there any way to make a database kind of file saving system.
closed account (o3hC5Di1)
Hi there,

Could you please clarify a little bit more what you mean by "file saving system"?
What kind of information are you trying to store and how often does it change / need to be retrieved?

For instance, program settings change rather infrequently and are loaded once at program start, so it doesn't need to be a blazingly fast system. If you're building a media player containing a list of songs and movies which is frequently searched and accessed, you are probably better off using an actual database.

All the best,
NwN
Well actually like file login and registration system as file reading takes a lots of time to get / append things in the file.

Sqlite has query system right?
closed account (o3hC5Di1)
Hi there,

Well again, it depends: will the program have a lot of users registering, or just a few? If it's just a few users that are created when the program is first started, using a database will actually bring overhead.

Also, if you choose to go with a database, you need to determine what kind of database. If you're just storing unrelated data (for example, a table of users and their settings) you may opt for a NoSQL database. If the data you are storing is related and can be "normalized" (for example, a table of artists and a table of songs which contain a reference to the appropriate record in the artist-table), you are better off with a relational database, like Sqlite.

The advantage of Sqlite over the other main RDBM's is that it is a "flat-file" database. That means the database and its data are stored in one single file which you can move around if needed and which can be connected to. As that saves you from the need of an actual sql server, it is usually a good choice when your program's data just needs to be stored on the local machine, as opposed to being stored on a central server. For instance, a media player may store data on the local machine and thus use sqlite, an mmorpg game will want to store data on one or more central servers.

If you determine you need a database, you will probably first need to install the necessary database and its management tools as well as find a third party C++ library to connect to that database: https://www.google.com/search?q=c%2B%2B%20sql%20library


All the best,
NwN
Well actually i want a registration system which can store as much users get registered.... as C++ is a program that can be accessed by every single individual so he / she will create a account which will be stored in the database and actually what you said above , i didnt get it to the point , but understood that there are 2 types of sql like SQLite and MySQL , SQLite is of the type .db extention and mysql is a database stored on a server right?
Topic archived. No new replies allowed.