So I am looking to create some sort of table or database in a program to store important information. It is not important to keep the information once that program has been terminated. I know that it is easy to use mysql to accomplish this goal, or even save the data to a file. However, I would prefer to use native c++ methods if possible. My question is (in your opinion) what is the best way to accomplish this in terms of difficulty, efficiency and practicality?
As always thank you very much for taking the time to respond, all input is much appreciated.
depends how much of a full SQL style database you require
you can make simple data structures using combinations of vector, map etc.
if you need SQL style features have a look at sqlite3 http://www.sqlite.org/
this db is used as a data store for many big projects such as firefox etc. you do not need to install a heavy thing like mysql to use it.
It is not important to keep the information once that program has been terminated.
Well, do you want to save it or not? The two cases call for very different preferred solutions.
If you do want to save it, SQLite is probably the way to go.
If you don't, it'll depend on what kind of data you want to store, how you want to access it, etc.
Well essentially I will be making a table of device ID's and their IP address's. I was looking to avoid sql just because its more of a hassel but if you think sql is the way to go I will definitely explore sqlite as an option.
helios: I do not want nor need to save the data. I need to be able to have it searched by either device ID or ip and have it return the other